summaryrefslogtreecommitdiff
path: root/storage/mroonga/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'storage/mroonga/mysql-test')
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_lz4.inc20
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zlib.inc20
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc4
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_57.inc21
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_100_or_later.inc24
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_57.inc24
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_lz4.inc22
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zlib.inc22
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_lz4.inc22
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zlib.inc22
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/disabled.def1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_flags.result4
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_type.result6
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_token_filters_one_token_filter.result10
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_unique_multiple_column_duplicated.result19
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_primary_key.result17
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_token_filter.result24
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_table.result31
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_primary_key.result16
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_table.result32
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/alter_table_spatial.result76
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_520_ci_french.result11
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_520_ci_japanese.result12
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_other_table.result58
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_vector_other_table.result33
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_int_other_table.result21
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_lz4.result10
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_zlib.result10
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_lz4.result12
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_zlib.result12
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_default_tokenizer.result4
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_none.result9
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_with_position_and_with_weight.result9
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index_comment.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index_no_utf8_charset_with_utf8_normalizer.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_no_utf8_charset_with_utf8_normalizer.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index_none.result16
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_primary_key_table_comment.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_table_comment.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_primary_key_table_comment_with_using_hash.result19
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_reference_type.result6
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_index_comment_multiple_token_filters.result6
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_index_comment_one_token_filter.result6
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_table_comment_multiple_token_filters.result6
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_table_comment_one_token_filter.result6
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/create_table_vector.result4
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_all.result21
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_select.result20
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_boolean_mode_different_against.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_different_against.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_boolean_mode_different_match.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_different_match.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_boolean_mode_no_where.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_no_where.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_boolean_mode_same_match_against.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_same_match_against.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_asc.result34
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_desc.result34
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_different_against.result34
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_different_match.result36
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_no_where.result37
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_same_match_against.result34
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result4
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null_57.result14
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result78
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_asc.result18
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_desc.result18
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_or_equal_asc.result18
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_or_equal_desc.result18
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_asc.result18
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_desc.result18
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_or_equal_asc.result18
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_or_equal_desc.result18
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_greater_than_asc.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_asc.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_greater_than_desc.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_desc.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_greater_than_or_equal_asc.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_or_equal_asc.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_greater_than_or_equal_desc.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_or_equal_desc.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_less_than_asc.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_asc.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_less_than_desc.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_desc.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_less_than_or_equal_asc.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_or_equal_asc.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_less_than_or_equal_desc.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_or_equal_desc.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_unique_search_after_duplicated.result18
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result4
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_unique_key.result15
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_TODO_SPLIT_ME.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_TODO_SPLIT_ME.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_after_insert_multithread.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_after_insert_multithread.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_after_insert_single_thread.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_after_insert_single_thread.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_disabled.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_disabled.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_view.result (renamed from storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_index_view.result)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_duplicated_order_by_columns.result19
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/partition_insert.result42
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/partition_update.result43
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/repair_table_no_index_file.result40
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/replace_geometry.result16
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/replace_without_key.result10
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_allow_column.result18
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_allow_leading_not.result16
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_allow_update.result18
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_syntax_query.result15
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_syntax_script.result16
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/variable_database_path_prefix.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_global.result20
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_session.result20
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result3
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/suite.pm5
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_flags.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_type.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test4
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_multiple_column_duplicated.test39
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_primary_key.test37
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test9
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test46
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_primary_key.test37
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test47
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/alter_table_spatial.test77
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_french.test (renamed from storage/mroonga/mysql-test/mroonga/wrapper/t/version_55_performance_schema.test)19
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_japanese.test37
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_other_table.test32
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_vector_other_table.test54
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_lz4.test37
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zlib.test37
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_lz4.test37
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zlib.test37
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_none.test38
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_with_position_and_with_weight.test38
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index_comment.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index_no_utf8_charset_with_utf8_normalizer.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_no_utf8_charset_with_utf8_normalizer.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index_none.test42
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_primary_key_table_comment.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_table_comment.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_primary_key_table_comment_with_using_hash.test47
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_reference_type.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_index_comment_multiple_token_filters.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_index_comment_one_token_filter.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_table_comment_multiple_token_filters.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_table_comment_one_token_filter.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/create_table_vector.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_all.test44
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_select.test4
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_against.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_different_against.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_match.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_different_match.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_no_where.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_no_where.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_same_match_against.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_same_match_against.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_asc.test47
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_desc.test47
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_against.test47
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_match.test49
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_no_where.test46
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_same_match_against.test47
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test4
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null_57.test38
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test79
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_asc.test41
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_desc.test41
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_asc.test41
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_desc.test41
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_asc.test41
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_desc.test41
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_asc.test41
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_desc.test41
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_asc.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_asc.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_desc.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_desc.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_asc.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_or_equal_asc.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_desc.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_or_equal_desc.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_asc.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_asc.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_desc.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_desc.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_asc.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_or_equal_asc.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_desc.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_or_equal_desc.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_unique_search_after_duplicated.test40
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_unique_key.test11
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_TODO_SPLIT_ME.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_TODO_SPLIT_ME.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_after_insert_multithread.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_after_insert_single_thread.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_disabled.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_view.test (renamed from storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_index_view.test)0
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_duplicated_order_by_columns.test45
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/partition_insert.test51
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/partition_update.test53
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/repair_table_no_index_file.test57
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test10
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/replace_without_key.test35
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_column.test46
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_leading_not.test44
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_update.test46
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_query.test43
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_script.test44
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_database_path_prefix.test6
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.result20
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.test55
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_session.test46
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_spatial.result76
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_with_index.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_none.result9
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_with_position_and_with_weight.result9
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_comment_multiple_token_filters.result6
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_comment_one_token_filter.result6
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_grn_id.result17
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result78
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result14
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result20
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_TODO_SPLIT_ME.result14
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_no_direction.result27
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_order_by_primary_key.result27
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/performance_schema.result (renamed from storage/mroonga/mysql-test/mroonga/wrapper/r/version_55_performance_schema.result)20
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_files.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_index_file.result4
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_global.result14
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/r/version_56_or_later_performance_schema.result73
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/suite.pm5
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test77
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test11
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_none.test39
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_with_position_and_with_weight.test39
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_multiple_token_filters.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_one_token_filter.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test79
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test15
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test21
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test8
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test (renamed from storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_grn_id.test)46
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test50
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema-master.opt1
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test (renamed from storage/mroonga/mysql-test/mroonga/wrapper/t/version_56_or_later_performance_schema.test)5
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test11
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test7
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test24
-rw-r--r--storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test2
222 files changed, 3860 insertions, 742 deletions
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_lz4.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_lz4.inc
new file mode 100644
index 00000000000..1c74cbffc46
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_lz4.inc
@@ -0,0 +1,20 @@
+# Copyright(C) 2014 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--disable_query_log
+let $libgroonga_support_lz4 =
+ `SELECT @@mroonga_libgroonga_support_lz4;`;
+--enable_query_log
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zlib.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zlib.inc
new file mode 100644
index 00000000000..5ab5fcd2fb8
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zlib.inc
@@ -0,0 +1,20 @@
+# Copyright(C) 2014 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--disable_query_log
+let $libgroonga_support_zlib =
+ `SELECT @@mroonga_libgroonga_support_zlib;`;
+--enable_query_log
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc
index b59a981d822..b78e79558d7 100644
--- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc
@@ -1,4 +1,4 @@
-# Copyright(C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
+# Copyright(C) 2012-2015 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -20,9 +20,11 @@ let $version_major_minor =
let $version_55 = `SELECT $version_major_minor = 5.5`;
let $version_56 = `SELECT $version_major_minor = 5.6`;
+let $version_57 = `SELECT $version_major_minor = 5.7`;
let $version_100 = `SELECT $version_major_minor = 10.0`;
let $version_55_or_later = `SELECT $version_major_minor >= 5.5`;
let $version_56_or_later = `SELECT $version_major_minor >= 5.6`;
+let $version_57_or_later = `SELECT $version_major_minor >= 5.7`;
let $version_100_or_later = `SELECT $version_major_minor >= 10.0`;
--enable_query_log
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_57.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_57.inc
new file mode 100644
index 00000000000..1ab664ed6a8
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_57.inc
@@ -0,0 +1,21 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/check_version.inc
+
+if (!$version_57) {
+ skip This test is for MySQL version 5.7.x;
+}
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_100_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_100_or_later.inc
new file mode 100644
index 00000000000..8c9f76cd45f
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_100_or_later.inc
@@ -0,0 +1,24 @@
+# Copyright(C) 2012-2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/check_version.inc
+--source ../../include/mroonga/check_mariadb.inc
+
+if ($version_100_or_later) {
+ if ($mariadb) {
+ skip This test is not for MariaDB 10.x;
+ }
+}
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_57.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_57.inc
new file mode 100644
index 00000000000..f1b1651a0b1
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_57.inc
@@ -0,0 +1,24 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/check_version.inc
+--source ../../include/mroonga/check_mariadb.inc
+
+if ($version_57) {
+ if (!$mariadb) {
+ skip This test is not for MySQL 5.7.x;
+ }
+}
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_lz4.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_lz4.inc
new file mode 100644
index 00000000000..e67f826b0ce
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_lz4.inc
@@ -0,0 +1,22 @@
+# Copyright(C) 2014 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/check_libgroonga_support_lz4.inc
+
+if (!$libgroonga_support_lz4) {
+ --source ../../include/mroonga/have_mroonga_deinit.inc
+ skip "This test is for libgroonga supports lz4";
+}
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zlib.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zlib.inc
new file mode 100644
index 00000000000..9f5196f742b
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zlib.inc
@@ -0,0 +1,22 @@
+# Copyright(C) 2014 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/check_libgroonga_support_zlib.inc
+
+if (!$libgroonga_support_zlib) {
+ --source ../../include/mroonga/have_mroonga_deinit.inc
+ skip "This test is for libgroonga supports zlib";
+}
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_lz4.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_lz4.inc
new file mode 100644
index 00000000000..80874a7a50b
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_lz4.inc
@@ -0,0 +1,22 @@
+# Copyright(C) 2014 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/check_libgroonga_support_lz4.inc
+
+if ($libgroonga_support_lz4) {
+ --source ../../include/mroonga/have_mroonga_deinit.inc
+ skip "This test is for libgroonga doesn't support lz4";
+}
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zlib.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zlib.inc
new file mode 100644
index 00000000000..d6c3f6dbeda
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zlib.inc
@@ -0,0 +1,22 @@
+# Copyright(C) 2014 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/check_libgroonga_support_zlib.inc
+
+if ($libgroonga_support_zlib) {
+ --source ../../include/mroonga/have_mroonga_deinit.inc
+ skip "This test is for libgroonga doesn't support zlib";
+}
diff --git a/storage/mroonga/mysql-test/mroonga/storage/disabled.def b/storage/mroonga/mysql-test/mroonga/storage/disabled.def
index 3f546dad2a4..6866adc1e35 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/disabled.def
+++ b/storage/mroonga/mysql-test/mroonga/storage/disabled.def
@@ -6,4 +6,5 @@ create_table_token_filters_index_comment_one_token_filter : Bundled Mroonga does
create_table_token_filters_table_comment_multiple_token_filters : Bundled Mroonga does not support token filter yet.
create_table_token_filters_table_comment_one_token_filter : Bundled Mroonga does not support token filter yet.
foreign_key_create : Bundled Mroonga does not support this test yet.
+partition_insert : Bundled Mroonga does not support this test yet.
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_flags.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_flags.result
index 1bc15c6efe2..e441df32c92 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_flags.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_flags.result
@@ -2,8 +2,8 @@ CREATE TABLE tags (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
) DEFAULT CHARSET=utf8;
ALTER TABLE tags ADD COLUMN name VARCHAR(64) COMMENT 'flags "COLUMN_VECTOR"';
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create tags TABLE_PAT_KEY UInt32
column_create tags id COLUMN_SCALAR UInt32
column_create tags name COLUMN_VECTOR ShortText
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_type.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_type.result
index 6ff92ec8e99..b4c3044c7d5 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_type.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_with_type.result
@@ -5,12 +5,14 @@ CREATE TABLE bugs (
id INT UNSIGNED PRIMARY KEY
) DEFAULT CHARSET=utf8;
ALTER TABLE bugs ADD COLUMN name VARCHAR(64) COMMENT 'type "tags"';
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create tags TABLE_PAT_KEY UInt32
column_create tags id COLUMN_SCALAR UInt32
+
table_create bugs TABLE_PAT_KEY UInt32
column_create bugs id COLUMN_SCALAR UInt32
+
column_create bugs name COLUMN_SCALAR tags
DROP TABLE bugs;
DROP TABLE tags;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_token_filters_one_token_filter.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_token_filters_one_token_filter.result
index e0449e3e54b..21784decb88 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_token_filters_one_token_filter.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_token_filters_one_token_filter.result
@@ -5,15 +5,13 @@ SET NAMES utf8;
CREATE TABLE memos (
content VARCHAR(64) NOT NULL
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
-mroonga_command("dump")
-table_create memos TABLE_NO_KEY
-column_create memos content COLUMN_SCALAR ShortText
ALTER TABLE memos ADD FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord"';
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create memos TABLE_NO_KEY
column_create memos content COLUMN_SCALAR ShortText
+
table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord
+
column_create memos-content index COLUMN_INDEX|WITH_POSITION memos content
DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_unique_multiple_column_duplicated.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_unique_multiple_column_duplicated.result
new file mode 100644
index 00000000000..8ab7ef22aca
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_unique_multiple_column_duplicated.result
@@ -0,0 +1,19 @@
+DROP TABLE IF EXISTS ids;
+CREATE TABLE ids (
+id1 INT,
+id2 INT
+) DEFAULT CHARSET=utf8mb4;
+INSERT INTO ids (id1, id2) values (1, 2), (1, 2);
+ALTER TABLE ids ADD UNIQUE INDEX (id1, id2);
+ERROR 23000: Can't write, because of unique constraint, to table 'ids'
+SHOW CREATE TABLE ids;
+Table Create Table
+ids CREATE TABLE `ids` (
+ `id1` int(11) DEFAULT NULL,
+ `id2` int(11) DEFAULT NULL
+) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4
+SELECT * FROM ids;
+id1 id2
+1 2
+1 2
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_primary_key.result
new file mode 100644
index 00000000000..439684ac5d6
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_primary_key.result
@@ -0,0 +1,17 @@
+DROP TABLE IF EXISTS ids;
+CREATE TABLE ids (
+id INT NOT NULL
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+INSERT INTO ids VALUES (1);
+INSERT INTO ids VALUES (2);
+ALTER TABLE ids ADD PRIMARY KEY (id);
+SHOW CREATE TABLE ids;
+Table Create Table
+ids CREATE TABLE `ids` (
+ `id` int(11) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8
+SELECT * FROM ids WHERE id = 2;
+id
+2
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_token_filter.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_token_filter.result
index 5046dc8e142..1c96236230b 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_token_filter.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_token_filter.result
@@ -10,23 +10,39 @@ id INT NOT NULL PRIMARY KEY,
content TEXT NOT NULL,
FULLTEXT INDEX (content) COMMENT 'table "terms"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI
column_create terms is_stop_word COLUMN_SCALAR Int8
column_create terms term COLUMN_SCALAR ShortText
+
table_create memos TABLE_PAT_KEY Int32
column_create memos content COLUMN_SCALAR LongText
column_create memos id COLUMN_SCALAR Int32
+
column_create terms content COLUMN_INDEX|WITH_POSITION memos content
ALTER TABLE terms COMMENT='default_tokenizer "TokenBigram", token_filters "TokenFilterStopWord"';
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create memos TABLE_PAT_KEY Int32
column_create memos content COLUMN_SCALAR LongText
column_create memos id COLUMN_SCALAR Int32
+
table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord
column_create terms is_stop_word COLUMN_SCALAR Int8
column_create terms term COLUMN_SCALAR ShortText
+ALTER TABLE memos DISABLE KEYS;
+ALTER TABLE memos ENABLE KEYS;
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
+table_create memos TABLE_PAT_KEY Int32
+column_create memos content COLUMN_SCALAR LongText
+column_create memos id COLUMN_SCALAR Int32
+
+table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord
+column_create terms is_stop_word COLUMN_SCALAR Int8
+column_create terms term COLUMN_SCALAR ShortText
+
+column_create terms content COLUMN_INDEX|WITH_POSITION memos content
DROP TABLE memos;
DROP TABLE terms;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_table.result
new file mode 100644
index 00000000000..ba6cf6c24ed
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_table.result
@@ -0,0 +1,31 @@
+SET NAMES utf8;
+CREATE TABLE terms (
+term varchar(256) NOT NULL PRIMARY KEY
+) COMMENT='default_tokenizer "TokenBigram", normalizer "NormalizerAuto"'
+ DEFAULT CHARSET=utf8;
+CREATE TABLE memos (
+id int PRIMARY KEY,
+content text NOT NULL,
+FULLTEXT INDEX content_index (content) COMMENT 'table "terms"'
+) DEFAULT CHARSET=utf8;
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
+table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
+column_create terms term COLUMN_SCALAR ShortText
+
+table_create memos TABLE_PAT_KEY Int32
+column_create memos content COLUMN_SCALAR LongText
+column_create memos id COLUMN_SCALAR Int32
+
+column_create terms content_index COLUMN_INDEX|WITH_POSITION memos content
+ALTER TABLE memos DISABLE KEYS;
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
+table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
+column_create terms term COLUMN_SCALAR ShortText
+
+table_create memos TABLE_PAT_KEY Int32
+column_create memos content COLUMN_SCALAR LongText
+column_create memos id COLUMN_SCALAR Int32
+DROP TABLE memos;
+DROP TABLE terms;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_primary_key.result
new file mode 100644
index 00000000000..cbcf9a69b56
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_primary_key.result
@@ -0,0 +1,16 @@
+DROP TABLE IF EXISTS ids;
+CREATE TABLE ids (
+id INT PRIMARY KEY
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+INSERT INTO ids VALUES (1);
+INSERT INTO ids VALUES (2);
+ALTER TABLE ids DROP PRIMARY KEY;
+SHOW CREATE TABLE ids;
+Table Create Table
+ids CREATE TABLE `ids` (
+ `id` int(11) NOT NULL
+) ENGINE=Mroonga DEFAULT CHARSET=utf8
+SELECT * FROM ids WHERE id = 2;
+id
+2
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_table.result
new file mode 100644
index 00000000000..452caa574f9
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_table.result
@@ -0,0 +1,32 @@
+SET NAMES utf8;
+CREATE TABLE terms (
+term varchar(256) NOT NULL PRIMARY KEY
+) COMMENT='default_tokenizer "TokenBigram", normalizer "NormalizerAuto"'
+ DEFAULT CHARSET=utf8;
+CREATE TABLE memos (
+id int PRIMARY KEY,
+content text NOT NULL,
+FULLTEXT INDEX content_index (content) COMMENT 'table "terms"'
+) DEFAULT CHARSET=utf8;
+ALTER TABLE memos DISABLE KEYS;
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
+table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
+column_create terms term COLUMN_SCALAR ShortText
+
+table_create memos TABLE_PAT_KEY Int32
+column_create memos content COLUMN_SCALAR LongText
+column_create memos id COLUMN_SCALAR Int32
+ALTER TABLE memos ENABLE KEYS;
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
+table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
+column_create terms term COLUMN_SCALAR ShortText
+
+table_create memos TABLE_PAT_KEY Int32
+column_create memos content COLUMN_SCALAR LongText
+column_create memos id COLUMN_SCALAR Int32
+
+column_create terms content_index COLUMN_INDEX|WITH_POSITION memos content
+DROP TABLE memos;
+DROP TABLE terms;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_spatial.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_spatial.result
index d8ed80a157d..ed36927e7b9 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_spatial.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_spatial.result
@@ -6,115 +6,115 @@ location GEOMETRY NOT NULL
);
INSERT INTO shops (name, location)
VALUES ('nezu-no-taiyaki',
-GeomFromText('POINT(139.762573 35.720253)'));
+ST_GeomFromText('POINT(139.762573 35.720253)'));
INSERT INTO shops (name, location)
VALUES ('taiyaki-kataoka',
-GeomFromText('POINT(139.715591 35.712521)'));
+ST_GeomFromText('POINT(139.715591 35.712521)'));
INSERT INTO shops (name, location)
VALUES ('soba-taiyaki-ku',
-GeomFromText('POINT(139.659088 35.683712)'));
+ST_GeomFromText('POINT(139.659088 35.683712)'));
INSERT INTO shops (name, location)
VALUES ('kuruma',
-GeomFromText('POINT(139.706207 35.721516)'));
+ST_GeomFromText('POINT(139.706207 35.721516)'));
INSERT INTO shops (name, location)
VALUES ('hirose-ya',
-GeomFromText('POINT(139.685608 35.714844)'));
+ST_GeomFromText('POINT(139.685608 35.714844)'));
INSERT INTO shops (name, location)
VALUES ('sazare',
-GeomFromText('POINT(139.685043 35.714653)'));
+ST_GeomFromText('POINT(139.685043 35.714653)'));
INSERT INTO shops (name, location)
VALUES ('omede-taiyaki',
-GeomFromText('POINT(139.817154 35.700516)'));
+ST_GeomFromText('POINT(139.817154 35.700516)'));
INSERT INTO shops (name, location)
VALUES ('onaga-ya',
-GeomFromText('POINT(139.81105 35.698254)'));
+ST_GeomFromText('POINT(139.81105 35.698254)'));
INSERT INTO shops (name, location)
VALUES ('shiro-ya',
-GeomFromText('POINT(139.638611 35.705517)'));
+ST_GeomFromText('POINT(139.638611 35.705517)'));
INSERT INTO shops (name, location)
VALUES ('fuji-ya',
-GeomFromText('POINT(139.637115 35.703938)'));
+ST_GeomFromText('POINT(139.637115 35.703938)'));
INSERT INTO shops (name, location)
VALUES ('miyoshi',
-GeomFromText('POINT(139.537323 35.644539)'));
+ST_GeomFromText('POINT(139.537323 35.644539)'));
INSERT INTO shops (name, location)
VALUES ('juju-ya',
-GeomFromText('POINT(139.695755 35.628922)'));
+ST_GeomFromText('POINT(139.695755 35.628922)'));
INSERT INTO shops (name, location)
VALUES ('tatsumi-ya',
-GeomFromText('POINT(139.638657 35.665501)'));
+ST_GeomFromText('POINT(139.638657 35.665501)'));
INSERT INTO shops (name, location)
VALUES ('tetsuji',
-GeomFromText('POINT(139.76857 35.680912)'));
+ST_GeomFromText('POINT(139.76857 35.680912)'));
INSERT INTO shops (name, location)
VALUES ('gazuma-ya',
-GeomFromText('POINT(139.647598 35.700817)'));
+ST_GeomFromText('POINT(139.647598 35.700817)'));
INSERT INTO shops (name, location)
VALUES ('honma-mon',
-GeomFromText('POINT(139.652573 35.722736)'));
+ST_GeomFromText('POINT(139.652573 35.722736)'));
INSERT INTO shops (name, location)
VALUES ('naniwa-ya',
-GeomFromText('POINT(139.796234 35.730061)'));
+ST_GeomFromText('POINT(139.796234 35.730061)'));
INSERT INTO shops (name, location)
VALUES ('kuro-dai',
-GeomFromText('POINT(139.704834 35.650345)'));
+ST_GeomFromText('POINT(139.704834 35.650345)'));
INSERT INTO shops (name, location)
VALUES ('daruma',
-GeomFromText('POINT(139.770599 35.681461)'));
+ST_GeomFromText('POINT(139.770599 35.681461)'));
INSERT INTO shops (name, location)
VALUES ('yanagi-ya',
-GeomFromText('POINT(139.783981 35.685341)'));
+ST_GeomFromText('POINT(139.783981 35.685341)'));
INSERT INTO shops (name, location)
VALUES ('sharaku',
-GeomFromText('POINT(139.794846 35.716969)'));
+ST_GeomFromText('POINT(139.794846 35.716969)'));
INSERT INTO shops (name, location)
VALUES ('takane',
-GeomFromText('POINT(139.560913 35.698601)'));
+ST_GeomFromText('POINT(139.560913 35.698601)'));
INSERT INTO shops (name, location)
VALUES ('chiyoda',
-GeomFromText('POINT(139.652817 35.642601)'));
+ST_GeomFromText('POINT(139.652817 35.642601)'));
INSERT INTO shops (name, location)
VALUES ('da-ka-po',
-GeomFromText('POINT(139.727356 35.627346)'));
+ST_GeomFromText('POINT(139.727356 35.627346)'));
INSERT INTO shops (name, location)
VALUES ('matsushima-ya',
-GeomFromText('POINT(139.737381 35.640556)'));
+ST_GeomFromText('POINT(139.737381 35.640556)'));
INSERT INTO shops (name, location)
VALUES ('kazuya',
-GeomFromText('POINT(139.760895 35.673508)'));
+ST_GeomFromText('POINT(139.760895 35.673508)'));
INSERT INTO shops (name, location)
VALUES ('furuya-kogane-an',
-GeomFromText('POINT(139.676071 35.680603)'));
+ST_GeomFromText('POINT(139.676071 35.680603)'));
INSERT INTO shops (name, location)
VALUES ('hachi-no-ie',
-GeomFromText('POINT(139.668106 35.608021)'));
+ST_GeomFromText('POINT(139.668106 35.608021)'));
INSERT INTO shops (name, location)
VALUES ('azuki-chan',
-GeomFromText('POINT(139.673203 35.64151)'));
+ST_GeomFromText('POINT(139.673203 35.64151)'));
INSERT INTO shops (name, location)
VALUES ('kuriko-an',
-GeomFromText('POINT(139.796829 35.712013)'));
+ST_GeomFromText('POINT(139.796829 35.712013)'));
INSERT INTO shops (name, location)
VALUES ('yume-no-aru-machi-no-taiyaki-ya-san',
-GeomFromText('POINT(139.712524 35.616199)'));
+ST_GeomFromText('POINT(139.712524 35.616199)'));
INSERT INTO shops (name, location)
VALUES ('naze-ya',
-GeomFromText('POINT(139.665833 35.609039)'));
+ST_GeomFromText('POINT(139.665833 35.609039)'));
INSERT INTO shops (name, location)
VALUES ('sanoki-ya',
-GeomFromText('POINT(139.770721 35.66592)'));
+ST_GeomFromText('POINT(139.770721 35.66592)'));
INSERT INTO shops (name, location)
VALUES ('shigeta',
-GeomFromText('POINT(139.780273 35.672626)'));
+ST_GeomFromText('POINT(139.780273 35.672626)'));
INSERT INTO shops (name, location)
VALUES ('nishimi-ya',
-GeomFromText('POINT(139.774628 35.671825)'));
+ST_GeomFromText('POINT(139.774628 35.671825)'));
INSERT INTO shops (name, location)
VALUES ('hiiragi',
-GeomFromText('POINT(139.711517 35.647701)'));
+ST_GeomFromText('POINT(139.711517 35.647701)'));
ALTER TABLE shops ADD SPATIAL KEY location_index (location);
-SELECT id, name, AsText(location) AS location_text FROM shops
-WHERE MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location)
+SELECT id, name, ST_AsText(location) AS location_text FROM shops
+WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location)
ORDER BY id;
id name location_text
14 tetsuji POINT(139.76857 35.680911944444446)
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_520_ci_french.result b/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_520_ci_french.result
new file mode 100644
index 00000000000..b9e22da4e2d
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_520_ci_french.result
@@ -0,0 +1,11 @@
+DROP TABLE IF EXISTS diaries;
+SET NAMES utf8mb4;
+CREATE TABLE diaries (
+content varchar(256) COLLATE utf8mb4_unicode_520_ci,
+FULLTEXT INDEX (content)
+) DEFAULT CHARSET=utf8mb4;
+INSERT INTO diaries VALUES ("Je suis un garçon.");
+SELECT * FROM diaries WHERE MATCH (content) AGAINST ("+garcon" IN BOOLEAN MODE);
+content
+Je suis un garçon.
+DROP TABLE diaries;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_520_ci_japanese.result b/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_520_ci_japanese.result
new file mode 100644
index 00000000000..29e55b7d9d5
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/collation_utf8_unicode_520_ci_japanese.result
@@ -0,0 +1,12 @@
+DROP TABLE IF EXISTS diaries;
+SET NAMES utf8mb4;
+CREATE TABLE diaries (
+content varchar(256) COLLATE utf8mb4_unicode_520_ci,
+FULLTEXT INDEX (content)
+) DEFAULT CHARSET=utf8mb4;
+INSERT INTO diaries VALUES ("ひらがなとカタカナを覚えました。");
+SELECT * FROM diaries
+WHERE MATCH (content) AGAINST ("+かたかな" IN BOOLEAN MODE);
+content
+ひらがなとカタカナを覚えました。
+DROP TABLE diaries;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_other_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_other_table.result
index 87c14a98f15..767fe491e99 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_other_table.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_other_table.result
@@ -1,42 +1,30 @@
-DROP DATABASE IF EXISTS mroonga;
-CREATE DATABASE mroonga;
-USE mroonga;
-CREATE TABLE tags (
+CREATE TABLE terms (
name VARCHAR(64) PRIMARY KEY
) DEFAULT CHARSET=utf8
-COLLATE=utf8_bin
-COMMENT='default_tokenizer "TokenDelimit"';
+COMMENT='default_tokenizer "TokenBigram"';
CREATE TABLE bugs (
id INT UNSIGNED PRIMARY KEY,
-tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"',
-FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"'
+title TEXT,
+FULLTEXT INDEX (title) COMMENT 'table "terms"'
) DEFAULT CHARSET=utf8;
-INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga");
-SELECT mroonga_command("dump");
-mroonga_command("dump")
-table_create tags TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit
-column_create tags name COLUMN_SCALAR ShortText
-table_create bugs TABLE_PAT_KEY UInt32
-column_create bugs id COLUMN_SCALAR UInt32
-column_create bugs tags COLUMN_VECTOR tags
-column_create tags bugs_tags_index COLUMN_INDEX|WITH_POSITION bugs tags
-load --table tags
-[
-["_key","name"],
-["Linux",""],
-["MySQL",""],
-["groonga",""]
-]
-load --table bugs
-[
-["_key","id","tags"],
-[1,1,["Linux","MySQL","groonga"]]
-]
-SELECT *, MATCH (tags) AGAINST ("MySQL" IN BOOLEAN MODE) AS score
+INSERT INTO bugs (id, title) VALUES (1, "Mroonga can't build with MySQL X.Y.Z");
+SELECT * FROM terms ORDER BY name;
+name
+'
+.
+BUILD
+CAN
+MROONGA
+MYSQL
+T
+WITH
+X
+Y
+Z
+SELECT *, MATCH (title) AGAINST ("+MySQL" IN BOOLEAN MODE) AS score
FROM bugs
-WHERE MATCH (tags) AGAINST ("MySQL" IN BOOLEAN MODE);
-id tags score
-1 Linux MySQL groonga 1
+WHERE MATCH (title) AGAINST ("+MySQL" IN BOOLEAN MODE);
+id title score
+1 Mroonga can't build with MySQL X.Y.Z 1
DROP TABLE bugs;
-DROP TABLE tags;
-DROP DATABASE mroonga;
+DROP TABLE terms;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_vector_other_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_vector_other_table.result
new file mode 100644
index 00000000000..724d20edd62
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_vector_other_table.result
@@ -0,0 +1,33 @@
+DROP DATABASE IF EXISTS mroonga;
+CREATE DATABASE mroonga;
+USE mroonga;
+CREATE TABLE tags (
+name VARCHAR(64) PRIMARY KEY
+) DEFAULT CHARSET=utf8
+COLLATE=utf8_bin
+COMMENT='default_tokenizer "TokenDelimit"';
+CREATE TABLE bugs (
+id INT UNSIGNED PRIMARY KEY,
+tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"',
+FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"'
+) DEFAULT CHARSET=utf8;
+INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga");
+SELECT mroonga_command("dump --dump_plugins no --dump_records no");
+mroonga_command("dump --dump_plugins no --dump_records no")
+table_create tags TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit
+column_create tags name COLUMN_SCALAR ShortText
+
+table_create bugs TABLE_PAT_KEY UInt32
+column_create bugs id COLUMN_SCALAR UInt32
+
+column_create bugs tags COLUMN_VECTOR tags
+
+column_create tags bugs_tags_index COLUMN_INDEX|WITH_POSITION bugs tags
+SELECT *, MATCH (tags) AGAINST ("+MySQL" IN BOOLEAN MODE) AS score
+FROM bugs
+WHERE MATCH (tags) AGAINST ("+MySQL" IN BOOLEAN MODE);
+id tags score
+1 Linux MySQL groonga 1
+DROP TABLE bugs;
+DROP TABLE tags;
+DROP DATABASE mroonga;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_int_other_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_int_other_table.result
index e46ed71d0fe..aa7735ef780 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_int_other_table.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_int_other_table.result
@@ -13,28 +13,17 @@ INDEX bugs_priority_index (priority) COMMENT 'table "priorities"'
INSERT INTO bugs (id, priority) VALUES (1, 10);
INSERT INTO bugs (id, priority) VALUES (2, 3);
INSERT INTO bugs (id, priority) VALUES (3, -2);
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no --dump_records no");
+mroonga_command("dump --dump_plugins no --dump_records no")
table_create priorities TABLE_PAT_KEY Int32
column_create priorities id COLUMN_SCALAR Int32
+
table_create bugs TABLE_PAT_KEY UInt32
column_create bugs id COLUMN_SCALAR UInt32
+
column_create bugs priority COLUMN_SCALAR priorities
+
column_create priorities bugs_priority_index COLUMN_INDEX|WITH_POSITION bugs priority
-load --table priorities
-[
-["_key","id"],
-[-2,0],
-[3,0],
-[10,0]
-]
-load --table bugs
-[
-["_key","id","priority"],
-[1,1,10],
-[2,2,3],
-[3,3,-2]
-]
SELECT *
FROM bugs
WHERE priority = 3;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_lz4.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_lz4.result
new file mode 100644
index 00000000000..11875e15018
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_lz4.result
@@ -0,0 +1,10 @@
+DROP TABLE IF EXISTS entries;
+CREATE TABLE entries (
+id INT UNSIGNED PRIMARY KEY,
+content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_LZ4"'
+) DEFAULT CHARSET=utf8;
+INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!");
+SELECT * FROM entries;
+id content
+1 I found Mroonga that is a MySQL storage engine to use Groonga!
+DROP TABLE entries;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_zlib.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_zlib.result
new file mode 100644
index 00000000000..5d704e3ebec
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_zlib.result
@@ -0,0 +1,10 @@
+DROP TABLE IF EXISTS entries;
+CREATE TABLE entries (
+id INT UNSIGNED PRIMARY KEY,
+content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_ZLIB"'
+) DEFAULT CHARSET=utf8;
+INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!");
+SELECT * FROM entries;
+id content
+1 I found Mroonga that is a MySQL storage engine to use Groonga!
+DROP TABLE entries;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_lz4.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_lz4.result
new file mode 100644
index 00000000000..a9a5f55fd7f
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_lz4.result
@@ -0,0 +1,12 @@
+DROP TABLE IF EXISTS entries;
+CREATE TABLE entries (
+id INT UNSIGNED PRIMARY KEY,
+content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_LZ4"'
+) DEFAULT CHARSET=utf8;
+Warnings:
+Warning 16506 The column flag 'COMPRESS_LZ4' is unsupported. It is ignored
+INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!");
+SELECT * FROM entries;
+id content
+1 I found Mroonga that is a MySQL storage engine to use Groonga!
+DROP TABLE entries;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_zlib.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_zlib.result
new file mode 100644
index 00000000000..068ce58bf74
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_zlib.result
@@ -0,0 +1,12 @@
+DROP TABLE IF EXISTS entries;
+CREATE TABLE entries (
+id INT UNSIGNED PRIMARY KEY,
+content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_ZLIB"'
+) DEFAULT CHARSET=utf8;
+Warnings:
+Warning 16506 The column flag 'COMPRESS_ZLIB' is unsupported. It is ignored
+INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!");
+SELECT * FROM entries;
+id content
+1 I found Mroonga that is a MySQL storage engine to use Groonga!
+DROP TABLE entries;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_default_tokenizer.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_default_tokenizer.result
index e14c67291cd..9302037b7e1 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_default_tokenizer.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_default_tokenizer.result
@@ -3,8 +3,8 @@ name VARCHAR(64) PRIMARY KEY
) DEFAULT CHARSET=utf8
COLLATE=utf8_bin
COMMENT='default_tokenizer "TokenDelimit"';
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create tags TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit
column_create tags name COLUMN_SCALAR ShortText
DROP TABLE tags;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_none.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_none.result
new file mode 100644
index 00000000000..c9283db72bb
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_none.result
@@ -0,0 +1,9 @@
+SET NAMES utf8;
+CREATE TABLE memos (
+content VARCHAR(64) NOT NULL,
+FULLTEXT INDEX (content) COMMENT 'index_flags "NONE"'
+) DEFAULT CHARSET=utf8;
+SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
+mroonga_command("dump --dump_plugins no --dump_schema no")
+column_create memos-content index COLUMN_INDEX memos content
+DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_with_position_and_with_weight.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_with_position_and_with_weight.result
new file mode 100644
index 00000000000..853845d5c15
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_with_position_and_with_weight.result
@@ -0,0 +1,9 @@
+SET NAMES utf8;
+CREATE TABLE memos (
+content VARCHAR(64) NOT NULL,
+FULLTEXT INDEX (content) COMMENT 'index_flags "WITH_POSITION|WITH_WEIGHT"'
+) DEFAULT CHARSET=utf8;
+SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
+mroonga_command("dump --dump_plugins no --dump_schema no")
+column_create memos-content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos content
+DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index_comment.result
index e2d405a1e35..e2d405a1e35 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index_comment.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_no_utf8_charset_with_utf8_normalizer.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index_no_utf8_charset_with_utf8_normalizer.result
index 9d12e2d0e39..9d12e2d0e39 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_no_utf8_charset_with_utf8_normalizer.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index_no_utf8_charset_with_utf8_normalizer.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index_none.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index_none.result
new file mode 100644
index 00000000000..52c6f055e88
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_fulltext_index_none.result
@@ -0,0 +1,16 @@
+DROP TABLE IF EXISTS diaries;
+SET NAMES utf8;
+CREATE TABLE diaries (
+day DATE PRIMARY KEY,
+content VARCHAR(64) NOT NULL,
+FULLTEXT INDEX (content) COMMENT 'normalizer "none"'
+) DEFAULT CHARSET=utf8;
+INSERT INTO diaries VALUES ("2013-04-23", "Mroonga");
+SELECT * FROM diaries
+WHERE MATCH (content) AGAINST ("+Mroonga" IN BOOLEAN MODE);
+day content
+2013-04-23 Mroonga
+SELECT * FROM diaries
+WHERE MATCH (content) AGAINST ("+mroonga" IN BOOLEAN MODE);
+day content
+DROP TABLE diaries;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_table_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_primary_key_table_comment.result
index dbf69362ee7..dbf69362ee7 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_table_comment.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_primary_key_table_comment.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_primary_key_table_comment_with_using_hash.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_primary_key_table_comment_with_using_hash.result
new file mode 100644
index 00000000000..5e4f4afa377
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_normalizer_primary_key_table_comment_with_using_hash.result
@@ -0,0 +1,19 @@
+DROP TABLE IF EXISTS memos;
+DROP TABLE IF EXISTS terms;
+SET NAMES utf8;
+CREATE TABLE terms (
+term VARCHAR(64) NOT NULL,
+PRIMARY KEY (term) USING HASH
+) COMMENT='default_tokenizer "TokenBigram", normalizer "NormalizerAuto"' DEFAULT CHARSET=utf8;
+CREATE TABLE memos (
+id INT NOT NULL PRIMARY KEY,
+content TEXT NOT NULL,
+FULLTEXT INDEX (content) COMMENT 'table "terms"'
+) DEFAULT CHARSET=utf8;
+INSERT INTO memos VALUES (1, "1日の消費㌍は約2000㌔㌍");
+SELECT * FROM memos
+WHERE MATCH (content) AGAINST ("+カロリー" IN BOOLEAN MODE);
+id content
+1 1日の消費㌍は約2000㌔㌍
+DROP TABLE memos;
+DROP TABLE terms;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_reference_type.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_reference_type.result
index 68a6bc8012f..dc3f39d286e 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_reference_type.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_reference_type.result
@@ -5,12 +5,14 @@ CREATE TABLE bugs (
id INT UNSIGNED PRIMARY KEY,
tag VARCHAR(64) COMMENT 'type "tags"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create tags TABLE_PAT_KEY ShortText
column_create tags name COLUMN_SCALAR ShortText
+
table_create bugs TABLE_PAT_KEY UInt32
column_create bugs id COLUMN_SCALAR UInt32
+
column_create bugs tag COLUMN_SCALAR tags
DROP TABLE bugs;
DROP TABLE tags;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_index_comment_multiple_token_filters.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_index_comment_multiple_token_filters.result
index 7d762258e6f..785c5d785b9 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_index_comment_multiple_token_filters.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_index_comment_multiple_token_filters.result
@@ -6,10 +6,12 @@ CREATE TABLE memos (
content VARCHAR(64) NOT NULL,
FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord,TokenFilterStopWord"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create memos TABLE_NO_KEY
column_create memos content COLUMN_SCALAR ShortText
+
table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord
+
column_create memos-content index COLUMN_INDEX|WITH_POSITION memos content
DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_index_comment_one_token_filter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_index_comment_one_token_filter.result
index 6cc89a7b941..9ce60054300 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_index_comment_one_token_filter.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_index_comment_one_token_filter.result
@@ -6,10 +6,12 @@ CREATE TABLE memos (
content VARCHAR(64) NOT NULL,
FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create memos TABLE_NO_KEY
column_create memos content COLUMN_SCALAR ShortText
+
table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord
+
column_create memos-content index COLUMN_INDEX|WITH_POSITION memos content
DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_table_comment_multiple_token_filters.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_table_comment_multiple_token_filters.result
index fe7e0059250..de1946e9214 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_table_comment_multiple_token_filters.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_table_comment_multiple_token_filters.result
@@ -10,14 +10,16 @@ id INT NOT NULL PRIMARY KEY,
content TEXT NOT NULL,
FULLTEXT INDEX (content) COMMENT 'table "terms"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord
column_create terms is_stop_word COLUMN_SCALAR Int8
column_create terms term COLUMN_SCALAR ShortText
+
table_create memos TABLE_PAT_KEY Int32
column_create memos content COLUMN_SCALAR LongText
column_create memos id COLUMN_SCALAR Int32
+
column_create terms content COLUMN_INDEX|WITH_POSITION memos content
DROP TABLE memos;
DROP TABLE terms;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_table_comment_one_token_filter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_table_comment_one_token_filter.result
index fe855b60f38..f3349980db1 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_table_comment_one_token_filter.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_token_filters_table_comment_one_token_filter.result
@@ -10,14 +10,16 @@ id INT NOT NULL PRIMARY KEY,
content TEXT NOT NULL,
FULLTEXT INDEX (content) COMMENT 'table "terms"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord
column_create terms is_stop_word COLUMN_SCALAR Int8
column_create terms term COLUMN_SCALAR ShortText
+
table_create memos TABLE_PAT_KEY Int32
column_create memos content COLUMN_SCALAR LongText
column_create memos id COLUMN_SCALAR Int32
+
column_create terms content COLUMN_INDEX|WITH_POSITION memos content
DROP TABLE memos;
DROP TABLE terms;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_vector.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_vector.result
index 561a266598f..af3c19e9bb0 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_vector.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_vector.result
@@ -2,8 +2,8 @@ CREATE TABLE bugs (
id INT UNSIGNED PRIMARY KEY,
tags TEXT COMMENT 'flags "COLUMN_VECTOR"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create bugs TABLE_PAT_KEY UInt32
column_create bugs id COLUMN_SCALAR UInt32
column_create bugs tags COLUMN_VECTOR LongText
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_all.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_all.result
new file mode 100644
index 00000000000..c8270bc3dde
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_all.result
@@ -0,0 +1,21 @@
+DROP TABLE IF EXISTS memos;
+SET NAMES utf8;
+CREATE TABLE memos (
+id INT PRIMARY KEY,
+title VARCHAR(255),
+content TEXT,
+FULLTEXT INDEX (title, content)
+) DEFAULT CHARSET=utf8;
+INSERT INTO memos VALUES(1, "Groonga", "Groonga is fast.");
+INSERT INTO memos VALUES(2, "Mroonga", "Mroonga is also fast.");
+INSERT INTO memos VALUES(3, "Rroonga", "Rroonga is also fast.");
+SELECT *,
+MATCH(title, content)
+AGAINST("*W1:10,2:2DOR Groonga Mroonga" in BOOLEAN MODE) AS score
+FROM memos
+WHERE MATCH(title, content)
+AGAINST("*W1:10,2:2DOR Groonga Mroonga" in BOOLEAN MODE);
+id title content score
+1 Groonga Groonga is fast. 12
+2 Mroonga Mroonga is also fast. 12
+DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_select.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_select.result
index 6c268ff7641..c337bfcb8db 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_select.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_select.result
@@ -43,24 +43,4 @@ select * from t2 where c2>"s" order by c1 asc;
c1 c2
4 sa si su se so
5 ta ti ii ii to
-select * from t1 where match(c2) against("ii") order by match(c2) against("ii") desc;
-c1 c2
-3 aa ii ii ii oo
-5 ta ti ii ii to
-1 aa ii uu ee oo
-select * from t2 where match(c2) against("ii") order by match(c2) against("ii") asc;
-c1 c2
-1 aa ii uu ee oo
-5 ta ti ii ii to
-3 aa ii ii ii oo
-select c1,c2,match(c2) against("ii") from t1 where match(c2) against("ii");
-c1 c2 match(c2) against("ii")
-1 aa ii uu ee oo 174763
-3 aa ii ii ii oo 524289
-5 ta ti ii ii to 349526
-select c1,c2,match(c2) against("ii") from t2 where match(c2) against("ii");
-c1 c2 match(c2) against("ii")
-1 aa ii uu ee oo 174763
-3 aa ii ii ii oo 524289
-5 ta ti ii ii to 349526
drop table t1,t2;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_different_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_boolean_mode_different_against.result
index d1f0d6bc0ab..d1f0d6bc0ab 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_different_against.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_boolean_mode_different_against.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_different_match.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_boolean_mode_different_match.result
index b4a07cd0b66..b4a07cd0b66 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_different_match.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_boolean_mode_different_match.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_no_where.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_boolean_mode_no_where.result
index 125b35fb96e..125b35fb96e 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_no_where.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_boolean_mode_no_where.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_same_match_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_boolean_mode_same_match_against.result
index a3a668c4445..a3a668c4445 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_same_match_against.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_boolean_mode_same_match_against.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_asc.result
new file mode 100644
index 00000000000..7f0934d3094
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_asc.result
@@ -0,0 +1,34 @@
+DROP TABLE IF EXISTS logs;
+SET NAMES UTF8;
+CREATE TABLE logs(
+message TEXT,
+FULLTEXT KEY (message)
+) DEFAULT CHARSET=utf8;
+INSERT INTO logs VALUES("Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning");
+INSERT INTO logs VALUES("Error Error");
+INSERT INTO logs VALUES("Warning Warning");
+INSERT INTO logs VALUES("Error");
+INSERT INTO logs VALUES("Warning");
+INSERT INTO logs VALUES("Error Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning Warning");
+SELECT * FROM logs;
+message
+Error Error Error
+Warning Warning Warning
+Error Error
+Warning Warning
+Error
+Warning
+Error Error Error Error
+Warning Warning Warning Warning
+SELECT *, MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) AS score
+FROM logs
+WHERE MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE)
+ORDER BY MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) ASC;
+message score
+Error 174763
+Error Error 349526
+Error Error Error 524289
+Error Error Error Error 699052
+DROP TABLE logs;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_desc.result
new file mode 100644
index 00000000000..fa577b17f83
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_desc.result
@@ -0,0 +1,34 @@
+DROP TABLE IF EXISTS logs;
+SET NAMES UTF8;
+CREATE TABLE logs(
+message TEXT,
+FULLTEXT KEY (message)
+) DEFAULT CHARSET=utf8;
+INSERT INTO logs VALUES("Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning");
+INSERT INTO logs VALUES("Error Error");
+INSERT INTO logs VALUES("Warning Warning");
+INSERT INTO logs VALUES("Error");
+INSERT INTO logs VALUES("Warning");
+INSERT INTO logs VALUES("Error Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning Warning");
+SELECT * FROM logs;
+message
+Error Error Error
+Warning Warning Warning
+Error Error
+Warning Warning
+Error
+Warning
+Error Error Error Error
+Warning Warning Warning Warning
+SELECT *, MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) AS score
+FROM logs
+WHERE MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE)
+ORDER BY MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) DESC;
+message score
+Error Error Error Error 699052
+Error Error Error 524289
+Error Error 349526
+Error 174763
+DROP TABLE logs;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_different_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_different_against.result
new file mode 100644
index 00000000000..958883e5841
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_different_against.result
@@ -0,0 +1,34 @@
+DROP TABLE IF EXISTS logs;
+SET NAMES UTF8;
+CREATE TABLE logs(
+message TEXT,
+FULLTEXT KEY (message)
+) DEFAULT CHARSET=utf8;
+INSERT INTO logs VALUES("Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning");
+INSERT INTO logs VALUES("Error Error");
+INSERT INTO logs VALUES("Warning Warning");
+INSERT INTO logs VALUES("Error");
+INSERT INTO logs VALUES("Warning");
+INSERT INTO logs VALUES("Error Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning Warning");
+SELECT * FROM logs;
+message
+Error Error Error
+Warning Warning Warning
+Error Error
+Warning Warning
+Error
+Warning
+Error Error Error Error
+Warning Warning Warning Warning
+SELECT *, MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) AS score
+FROM logs
+WHERE MATCH(message) AGAINST("Error Warning" IN NATURAL LANGUAGE MODE)
+ORDER BY MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE);
+message score
+Error 174763
+Error Error 349526
+Error Error Error 524289
+Error Error Error Error 699052
+DROP TABLE logs;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_different_match.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_different_match.result
new file mode 100644
index 00000000000..76abb660c19
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_different_match.result
@@ -0,0 +1,36 @@
+DROP TABLE IF EXISTS logs;
+SET NAMES UTF8;
+CREATE TABLE logs(
+message TEXT,
+host TEXT,
+FULLTEXT KEY (message),
+FULLTEXT KEY (host)
+) DEFAULT CHARSET=utf8;
+INSERT INTO logs VALUES("Error Error Error", "host1");
+INSERT INTO logs VALUES("Warning Warning Warning", "host1");
+INSERT INTO logs VALUES("Error Error", "host2");
+INSERT INTO logs VALUES("Warning Warning", "host2");
+INSERT INTO logs VALUES("Error", "host2");
+INSERT INTO logs VALUES("Warning", "host2");
+INSERT INTO logs VALUES("Error Error Error Error", "host2");
+INSERT INTO logs VALUES("Warning Warning Warning Warning", "host2");
+SELECT * FROM logs;
+message host
+Error Error Error host1
+Warning Warning Warning host1
+Error Error host2
+Warning Warning host2
+Error host2
+Warning host2
+Error Error Error Error host2
+Warning Warning Warning Warning host2
+SELECT *, MATCH(host) AGAINST("host2" IN NATURAL LANGUAGE MODE) AS score
+FROM logs
+WHERE MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE)
+ORDER BY MATCH(host) AGAINST("host2" IN NATURAL LANGUAGE MODE);
+message host score
+Error Error Error host1 0
+Error Error host2 116509
+Error host2 116509
+Error Error Error Error host2 116509
+DROP TABLE logs;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_no_where.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_no_where.result
new file mode 100644
index 00000000000..30130e6c85b
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_no_where.result
@@ -0,0 +1,37 @@
+DROP TABLE IF EXISTS logs;
+SET NAMES UTF8;
+CREATE TABLE logs(
+message TEXT,
+FULLTEXT KEY (message)
+) DEFAULT CHARSET=utf8;
+INSERT INTO logs VALUES("Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning");
+INSERT INTO logs VALUES("Error Error");
+INSERT INTO logs VALUES("Warning Warning");
+INSERT INTO logs VALUES("Error");
+INSERT INTO logs VALUES("Warning");
+INSERT INTO logs VALUES("Error Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning Warning");
+SELECT * FROM logs;
+message
+Error Error Error
+Warning Warning Warning
+Error Error
+Warning Warning
+Error
+Warning
+Error Error Error Error
+Warning Warning Warning Warning
+SELECT *, MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) AS score
+FROM logs
+ORDER BY MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE);
+message score
+Warning Warning Warning 0
+Warning Warning 0
+Warning 0
+Warning Warning Warning Warning 0
+Error 174763
+Error Error 349526
+Error Error Error 524289
+Error Error Error Error 699052
+DROP TABLE logs;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_same_match_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_same_match_against.result
new file mode 100644
index 00000000000..ac2e7522db7
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_order_natural_language_mode_same_match_against.result
@@ -0,0 +1,34 @@
+DROP TABLE IF EXISTS logs;
+SET NAMES UTF8;
+CREATE TABLE logs(
+message TEXT,
+FULLTEXT KEY (message)
+) DEFAULT CHARSET=utf8;
+INSERT INTO logs VALUES("Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning");
+INSERT INTO logs VALUES("Error Error");
+INSERT INTO logs VALUES("Warning Warning");
+INSERT INTO logs VALUES("Error");
+INSERT INTO logs VALUES("Warning");
+INSERT INTO logs VALUES("Error Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning Warning");
+SELECT * FROM logs;
+message
+Error Error Error
+Warning Warning Warning
+Error Error
+Warning Warning
+Error
+Warning
+Error Error Error Error
+Warning Warning Warning Warning
+SELECT *, MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) AS score
+FROM logs
+WHERE MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE)
+ORDER BY MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE);
+message score
+Error 174763
+Error Error 349526
+Error Error Error 524289
+Error Error Error Error 699052
+DROP TABLE logs;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result
index 2e9314db109..5e831860c5e 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result
@@ -6,8 +6,8 @@ INSERT INTO shops VALUES (NULL), (NULL);
Warnings:
Warning 1048 Column 'location' cannot be null
Warning 1048 Column 'location' cannot be null
-SELECT AsText(location) FROM shops;
-AsText(location)
+SELECT ST_AsText(location) FROM shops;
+ST_AsText(location)
POINT(0 0)
POINT(0 0)
DROP TABLE shops;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null_57.result b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null_57.result
new file mode 100644
index 00000000000..271cf922fd5
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null_57.result
@@ -0,0 +1,14 @@
+DROP TABLE IF EXISTS shops;
+CREATE TABLE shops (
+location GEOMETRY NOT NULL
+);
+SET SESSION sql_mode = '';
+INSERT INTO shops VALUES (NULL), (NULL);
+Warnings:
+Warning 1048 Column 'location' cannot be null
+SET SESSION sql_mode = default;
+SELECT ST_AsText(location) FROM shops;
+ST_AsText(location)
+POINT(0 0)
+POINT(0 0)
+DROP TABLE shops;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result
index e88402a10b4..29fd989b4f4 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result
@@ -16,113 +16,113 @@ shops CREATE TABLE `shops` (
) ENGINE=Mroonga DEFAULT CHARSET=latin1
INSERT INTO shops (name, location)
VALUES ('nezu-no-taiyaki',
-GeomFromText('POINT(139.762573 35.720253)'));
+ST_GeomFromText('POINT(139.762573 35.720253)'));
INSERT INTO shops (name, location)
VALUES ('taiyaki-kataoka',
-GeomFromText('POINT(139.715591 35.712521)'));
+ST_GeomFromText('POINT(139.715591 35.712521)'));
INSERT INTO shops (name, location)
VALUES ('soba-taiyaki-ku',
-GeomFromText('POINT(139.659088 35.683712)'));
+ST_GeomFromText('POINT(139.659088 35.683712)'));
INSERT INTO shops (name, location)
VALUES ('kuruma',
-GeomFromText('POINT(139.706207 35.721516)'));
+ST_GeomFromText('POINT(139.706207 35.721516)'));
INSERT INTO shops (name, location)
VALUES ('hirose-ya',
-GeomFromText('POINT(139.685608 35.714844)'));
+ST_GeomFromText('POINT(139.685608 35.714844)'));
INSERT INTO shops (name, location)
VALUES ('sazare',
-GeomFromText('POINT(139.685043 35.714653)'));
+ST_GeomFromText('POINT(139.685043 35.714653)'));
INSERT INTO shops (name, location)
VALUES ('omede-taiyaki',
-GeomFromText('POINT(139.817154 35.700516)'));
+ST_GeomFromText('POINT(139.817154 35.700516)'));
INSERT INTO shops (name, location)
VALUES ('onaga-ya',
-GeomFromText('POINT(139.81105 35.698254)'));
+ST_GeomFromText('POINT(139.81105 35.698254)'));
INSERT INTO shops (name, location)
VALUES ('shiro-ya',
-GeomFromText('POINT(139.638611 35.705517)'));
+ST_GeomFromText('POINT(139.638611 35.705517)'));
INSERT INTO shops (name, location)
VALUES ('fuji-ya',
-GeomFromText('POINT(139.637115 35.703938)'));
+ST_GeomFromText('POINT(139.637115 35.703938)'));
INSERT INTO shops (name, location)
VALUES ('miyoshi',
-GeomFromText('POINT(139.537323 35.644539)'));
+ST_GeomFromText('POINT(139.537323 35.644539)'));
INSERT INTO shops (name, location)
VALUES ('juju-ya',
-GeomFromText('POINT(139.695755 35.628922)'));
+ST_GeomFromText('POINT(139.695755 35.628922)'));
INSERT INTO shops (name, location)
VALUES ('tatsumi-ya',
-GeomFromText('POINT(139.638657 35.665501)'));
+ST_GeomFromText('POINT(139.638657 35.665501)'));
INSERT INTO shops (name, location)
VALUES ('tetsuji',
-GeomFromText('POINT(139.76857 35.680912)'));
+ST_GeomFromText('POINT(139.76857 35.680912)'));
INSERT INTO shops (name, location)
VALUES ('gazuma-ya',
-GeomFromText('POINT(139.647598 35.700817)'));
+ST_GeomFromText('POINT(139.647598 35.700817)'));
INSERT INTO shops (name, location)
VALUES ('honma-mon',
-GeomFromText('POINT(139.652573 35.722736)'));
+ST_GeomFromText('POINT(139.652573 35.722736)'));
INSERT INTO shops (name, location)
VALUES ('naniwa-ya',
-GeomFromText('POINT(139.796234 35.730061)'));
+ST_GeomFromText('POINT(139.796234 35.730061)'));
INSERT INTO shops (name, location)
VALUES ('kuro-dai',
-GeomFromText('POINT(139.704834 35.650345)'));
+ST_GeomFromText('POINT(139.704834 35.650345)'));
INSERT INTO shops (name, location)
VALUES ('daruma',
-GeomFromText('POINT(139.770599 35.681461)'));
+ST_GeomFromText('POINT(139.770599 35.681461)'));
INSERT INTO shops (name, location)
VALUES ('yanagi-ya',
-GeomFromText('POINT(139.783981 35.685341)'));
+ST_GeomFromText('POINT(139.783981 35.685341)'));
INSERT INTO shops (name, location)
VALUES ('sharaku',
-GeomFromText('POINT(139.794846 35.716969)'));
+ST_GeomFromText('POINT(139.794846 35.716969)'));
INSERT INTO shops (name, location)
VALUES ('takane',
-GeomFromText('POINT(139.560913 35.698601)'));
+ST_GeomFromText('POINT(139.560913 35.698601)'));
INSERT INTO shops (name, location)
VALUES ('chiyoda',
-GeomFromText('POINT(139.652817 35.642601)'));
+ST_GeomFromText('POINT(139.652817 35.642601)'));
INSERT INTO shops (name, location)
VALUES ('da-ka-po',
-GeomFromText('POINT(139.727356 35.627346)'));
+ST_GeomFromText('POINT(139.727356 35.627346)'));
INSERT INTO shops (name, location)
VALUES ('matsushima-ya',
-GeomFromText('POINT(139.737381 35.640556)'));
+ST_GeomFromText('POINT(139.737381 35.640556)'));
INSERT INTO shops (name, location)
VALUES ('kazuya',
-GeomFromText('POINT(139.760895 35.673508)'));
+ST_GeomFromText('POINT(139.760895 35.673508)'));
INSERT INTO shops (name, location)
VALUES ('furuya-kogane-an',
-GeomFromText('POINT(139.676071 35.680603)'));
+ST_GeomFromText('POINT(139.676071 35.680603)'));
INSERT INTO shops (name, location)
VALUES ('hachi-no-ie',
-GeomFromText('POINT(139.668106 35.608021)'));
+ST_GeomFromText('POINT(139.668106 35.608021)'));
INSERT INTO shops (name, location)
VALUES ('azuki-chan',
-GeomFromText('POINT(139.673203 35.64151)'));
+ST_GeomFromText('POINT(139.673203 35.64151)'));
INSERT INTO shops (name, location)
VALUES ('kuriko-an',
-GeomFromText('POINT(139.796829 35.712013)'));
+ST_GeomFromText('POINT(139.796829 35.712013)'));
INSERT INTO shops (name, location)
VALUES ('yume-no-aru-machi-no-taiyaki-ya-san',
-GeomFromText('POINT(139.712524 35.616199)'));
+ST_GeomFromText('POINT(139.712524 35.616199)'));
INSERT INTO shops (name, location)
VALUES ('naze-ya',
-GeomFromText('POINT(139.665833 35.609039)'));
+ST_GeomFromText('POINT(139.665833 35.609039)'));
INSERT INTO shops (name, location)
VALUES ('sanoki-ya',
-GeomFromText('POINT(139.770721 35.66592)'));
+ST_GeomFromText('POINT(139.770721 35.66592)'));
INSERT INTO shops (name, location)
VALUES ('shigeta',
-GeomFromText('POINT(139.780273 35.672626)'));
+ST_GeomFromText('POINT(139.780273 35.672626)'));
INSERT INTO shops (name, location)
VALUES ('nishimi-ya',
-GeomFromText('POINT(139.774628 35.671825)'));
+ST_GeomFromText('POINT(139.774628 35.671825)'));
INSERT INTO shops (name, location)
VALUES ('hiiragi',
-GeomFromText('POINT(139.711517 35.647701)'));
-SELECT id, name, AsText(location) AS location_text FROM shops;
+ST_GeomFromText('POINT(139.711517 35.647701)'));
+SELECT id, name, ST_AsText(location) AS location_text FROM shops;
id name location_text
1 nezu-no-taiyaki POINT(139.76257305555555 35.72025305555556)
2 taiyaki-kataoka POINT(139.7155911111111 35.712521111111116)
@@ -160,8 +160,8 @@ id name location_text
34 shigeta POINT(139.78027305555557 35.67262611111111)
35 nishimi-ya POINT(139.77462805555555 35.671825)
36 hiiragi POINT(139.71151694444444 35.64770111111111)
-SELECT id, name, AsText(location) AS location_text FROM shops
-WHERE MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location)
+SELECT id, name, ST_AsText(location) AS location_text FROM shops
+WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location)
ORDER BY id;
id name location_text
14 tetsuji POINT(139.76857 35.680911944444446)
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_asc.result
new file mode 100644
index 00000000000..c2adc1cde2d
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_asc.result
@@ -0,0 +1,18 @@
+DROP TABLE IF EXISTS ids;
+SET NAMES UTF8;
+CREATE TABLE ids (
+id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+value INT(10),
+INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+SELECT id, value FROM ids WHERE value > 10 ORDER BY value ASC LIMIT 3;
+id value
+3 30
+1 50
+2 70
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_desc.result
new file mode 100644
index 00000000000..715d299d608
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_desc.result
@@ -0,0 +1,18 @@
+DROP TABLE IF EXISTS ids;
+SET NAMES UTF8;
+CREATE TABLE ids (
+id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+value INT(10),
+INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+SELECT id, value FROM ids WHERE value > 10 ORDER BY value DESC LIMIT 3;
+id value
+4 90
+2 70
+1 50
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_or_equal_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_or_equal_asc.result
new file mode 100644
index 00000000000..d562fbbb644
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_or_equal_asc.result
@@ -0,0 +1,18 @@
+DROP TABLE IF EXISTS ids;
+SET NAMES UTF8;
+CREATE TABLE ids (
+id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+value INT(10),
+INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+SELECT id, value FROM ids WHERE value >= 30 ORDER BY value ASC LIMIT 3;
+id value
+3 30
+1 50
+2 70
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_or_equal_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_or_equal_desc.result
new file mode 100644
index 00000000000..5ecb4699fac
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_greater_than_or_equal_desc.result
@@ -0,0 +1,18 @@
+DROP TABLE IF EXISTS ids;
+SET NAMES UTF8;
+CREATE TABLE ids (
+id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+value INT(10),
+INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+SELECT id, value FROM ids WHERE value >= 30 ORDER BY value DESC LIMIT 3;
+id value
+4 90
+2 70
+1 50
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_asc.result
new file mode 100644
index 00000000000..45b3fbe122a
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_asc.result
@@ -0,0 +1,18 @@
+DROP TABLE IF EXISTS ids;
+SET NAMES UTF8;
+CREATE TABLE ids (
+id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+value INT(10),
+INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+SELECT id, value FROM ids WHERE value < 90 ORDER BY value ASC LIMIT 3;
+id value
+5 10
+3 30
+1 50
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_desc.result
new file mode 100644
index 00000000000..2e896e5e650
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_desc.result
@@ -0,0 +1,18 @@
+DROP TABLE IF EXISTS ids;
+SET NAMES UTF8;
+CREATE TABLE ids (
+id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+value INT(10),
+INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+SELECT id, value FROM ids WHERE value < 90 ORDER BY value DESC LIMIT 3;
+id value
+2 70
+1 50
+3 30
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_or_equal_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_or_equal_asc.result
new file mode 100644
index 00000000000..d5313c9d0f4
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_or_equal_asc.result
@@ -0,0 +1,18 @@
+DROP TABLE IF EXISTS ids;
+SET NAMES UTF8;
+CREATE TABLE ids (
+id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+value INT(10),
+INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+SELECT id, value FROM ids WHERE value <= 70 ORDER BY value ASC LIMIT 3;
+id value
+5 10
+3 30
+1 50
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_or_equal_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_or_equal_desc.result
new file mode 100644
index 00000000000..c56a4332f1f
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_normal_less_than_or_equal_desc.result
@@ -0,0 +1,18 @@
+DROP TABLE IF EXISTS ids;
+SET NAMES UTF8;
+CREATE TABLE ids (
+id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+value INT(10),
+INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+SELECT id, value FROM ids WHERE value <= 70 ORDER BY value DESC LIMIT 3;
+id value
+2 70
+1 50
+3 30
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_greater_than_asc.result
index 1ca4b145f54..1ca4b145f54 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_asc.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_greater_than_asc.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_greater_than_desc.result
index 80dcb25ffe6..80dcb25ffe6 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_desc.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_greater_than_desc.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_or_equal_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_greater_than_or_equal_asc.result
index 4c1ff997d79..4c1ff997d79 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_or_equal_asc.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_greater_than_or_equal_asc.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_or_equal_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_greater_than_or_equal_desc.result
index 4998725aef5..4998725aef5 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_greater_than_or_equal_desc.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_greater_than_or_equal_desc.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_less_than_asc.result
index 8b142f30610..8b142f30610 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_asc.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_less_than_asc.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_less_than_desc.result
index eaf5b87e62c..eaf5b87e62c 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_desc.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_less_than_desc.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_or_equal_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_less_than_or_equal_asc.result
index e1e96c9ca8b..e1e96c9ca8b 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_or_equal_asc.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_less_than_or_equal_asc.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_or_equal_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_less_than_or_equal_desc.result
index e8124ca14c0..e8124ca14c0 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_range_less_than_or_equal_desc.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_range_primary_less_than_or_equal_desc.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_search_after_duplicated.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_search_after_duplicated.result
new file mode 100644
index 00000000000..1d9d5fbbf51
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_search_after_duplicated.result
@@ -0,0 +1,18 @@
+DROP TABLE IF EXISTS users;
+CREATE TABLE users (
+id int PRIMARY KEY,
+name varchar(100) NOT NULL,
+UNIQUE KEY (name)
+) DEFAULT CHARSET=utf8;
+INSERT INTO users VALUES (1, "Alice");
+INSERT INTO users VALUES (2, "Bob");
+INSERT INTO users VALUES (3, "Bob");
+ERROR 23000: Duplicate entry 'Bob' for key 'name'
+SELECT * FROM users;
+id name
+1 Alice
+2 Bob
+SELECT * FROM users WHERE name = "Bob";
+id name
+2 Bob
+DROP TABLE users;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result
deleted file mode 100644
index 8d3decfa32a..00000000000
--- a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result
+++ /dev/null
@@ -1,4 +0,0 @@
-select PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_TYPE
-from information_schema.plugins where plugin_name = "Mroonga";
-PLUGIN_NAME PLUGIN_VERSION PLUGIN_TYPE
-Mroonga 4.6 STORAGE ENGINE
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_unique_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_unique_key.result
index 288e9e3a2c8..fbec44527f7 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_unique_key.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_unique_key.result
@@ -15,16 +15,19 @@ diaries CREATE TABLE `diaries` (
UNIQUE KEY `day` (`day`)
) ENGINE=Mroonga DEFAULT CHARSET=utf8
INSERT INTO diaries (day, title)
-VALUES ("2012-02-14", "clear day")
-ON DUPLICATE KEY UPDATE title = "clear day (duplicated)";
+VALUES ("2012-02-14", "clear day1")
+ON DUPLICATE KEY UPDATE title = "clear day1 (duplicated)";
INSERT INTO diaries (day, title)
-VALUES ("2012-02-14", "rainy day")
-ON DUPLICATE KEY UPDATE title = "rainy day (duplicated)";
+VALUES ("2012-02-14", "clear day2")
+ON DUPLICATE KEY UPDATE title = "clear day2 (duplicated)";
+INSERT INTO diaries (day, title)
+VALUES ("2012-02-14", "clear day3")
+ON DUPLICATE KEY UPDATE title = "clear day3 (duplicated)";
INSERT INTO diaries (day, title)
VALUES ("2012-02-15", "cloudy day")
ON DUPLICATE KEY UPDATE title = "cloudy day (duplicated)";
SELECT * FROM diaries;
id day title
-1 2012-02-14 rainy day (duplicated)
-3 2012-02-15 cloudy day
+1 2012-02-14 clear day3 (duplicated)
+4 2012-02-15 cloudy day
DROP TABLE diaries;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_TODO_SPLIT_ME.result
index b66801094bd..b66801094bd 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_TODO_SPLIT_ME.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_TODO_SPLIT_ME.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_after_insert_multithread.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_after_insert_multithread.result
index c09ec340ccb..c09ec340ccb 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_after_insert_multithread.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_after_insert_multithread.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_after_insert_single_thread.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_after_insert_single_thread.result
index c09ec340ccb..c09ec340ccb 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_after_insert_single_thread.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_after_insert_single_thread.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_disabled.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_disabled.result
index 9971d21e386..9971d21e386 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_disabled.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_disabled.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_index_view.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_view.result
index 407347a4fa2..407347a4fa2 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_skip_count_index_view.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_view.result
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_duplicated_order_by_columns.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_duplicated_order_by_columns.result
new file mode 100644
index 00000000000..9ea8ea40093
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_duplicated_order_by_columns.result
@@ -0,0 +1,19 @@
+DROP TABLE IF EXISTS ids;
+FLUSH STATUS;
+SET NAMES utf8mb4;
+CREATE TABLE ids (
+id int PRIMARY KEY,
+text varchar(32),
+FULLTEXT INDEX (text)
+) DEFAULT CHARSET=utf8mb4;
+INSERT INTO ids VALUES (1, 'first');
+SELECT * FROM ids
+WHERE MATCH(text) AGAINST('+first' IN BOOLEAN MODE)
+ORDER BY id, id
+LIMIT 1;
+id text
+1 first
+SHOW STATUS LIKE 'mroonga_fast_order_limit';
+Variable_name Value
+Mroonga_fast_order_limit 1
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/partition_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/partition_insert.result
new file mode 100644
index 00000000000..ea1e63e39d0
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/partition_insert.result
@@ -0,0 +1,42 @@
+DROP TABLE IF EXISTS logs;
+SET NAMES UTF8;
+CREATE TABLE logs (
+timestamp DATETIME,
+message TEXT
+) DEFAULT CHARSET=UTF8
+PARTITION BY RANGE (TO_DAYS(timestamp)) (
+PARTITION p201501 VALUES LESS THAN (TO_DAYS('2015-02-01')),
+PARTITION p201502 VALUES LESS THAN (TO_DAYS('2015-03-01')),
+PARTITION p201503 VALUES LESS THAN (TO_DAYS('2015-04-01')),
+PARTITION pfuture VALUES LESS THAN MAXVALUE
+);
+SHOW CREATE TABLE logs;
+Table Create Table
+logs CREATE TABLE `logs` (
+ `timestamp` datetime DEFAULT NULL,
+ `message` text
+) ENGINE=Mroonga DEFAULT CHARSET=utf8
+/*!50100 PARTITION BY RANGE (TO_DAYS(timestamp))
+(PARTITION p201501 VALUES LESS THAN (735995) ENGINE = Mroonga,
+ PARTITION p201502 VALUES LESS THAN (736023) ENGINE = Mroonga,
+ PARTITION p201503 VALUES LESS THAN (736054) ENGINE = Mroonga,
+ PARTITION pfuture VALUES LESS THAN MAXVALUE ENGINE = Mroonga) */
+INSERT INTO logs VALUES('2015-01-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-01-31 23:59:59', 'Shutdown');
+INSERT INTO logs VALUES('2015-02-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-02-28 23:59:59', 'Shutdown');
+INSERT INTO logs VALUES('2015-03-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-03-31 23:59:59', 'Shutdown');
+INSERT INTO logs VALUES('2015-04-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-04-30 23:59:59', 'Shutdown');
+SELECT * FROM logs ORDER BY timestamp;
+timestamp message
+2015-01-01 00:00:00 Start
+2015-01-31 23:59:59 Shutdown
+2015-02-01 00:00:00 Start
+2015-02-28 23:59:59 Shutdown
+2015-03-01 00:00:00 Start
+2015-03-31 23:59:59 Shutdown
+2015-04-01 00:00:00 Start
+2015-04-30 23:59:59 Shutdown
+DROP TABLE logs;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/partition_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/partition_update.result
new file mode 100644
index 00000000000..8d8208f81a9
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/partition_update.result
@@ -0,0 +1,43 @@
+DROP TABLE IF EXISTS logs;
+SET NAMES UTF8;
+CREATE TABLE logs (
+timestamp DATETIME,
+message TEXT
+) DEFAULT CHARSET=UTF8
+PARTITION BY RANGE (TO_DAYS(timestamp)) (
+PARTITION p201501 VALUES LESS THAN (TO_DAYS('2015-02-01')),
+PARTITION p201502 VALUES LESS THAN (TO_DAYS('2015-03-01')),
+PARTITION p201503 VALUES LESS THAN (TO_DAYS('2015-04-01')),
+PARTITION pfuture VALUES LESS THAN MAXVALUE
+);
+SHOW CREATE TABLE logs;
+Table Create Table
+logs CREATE TABLE `logs` (
+ `timestamp` datetime DEFAULT NULL,
+ `message` text
+) ENGINE=Mroonga DEFAULT CHARSET=utf8
+/*!50100 PARTITION BY RANGE (TO_DAYS(timestamp))
+(PARTITION p201501 VALUES LESS THAN (735995) ENGINE = Mroonga,
+ PARTITION p201502 VALUES LESS THAN (736023) ENGINE = Mroonga,
+ PARTITION p201503 VALUES LESS THAN (736054) ENGINE = Mroonga,
+ PARTITION pfuture VALUES LESS THAN MAXVALUE ENGINE = Mroonga) */
+INSERT INTO logs VALUES('2015-01-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-02-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-03-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-04-01 00:00:00', 'Start');
+SELECT * FROM logs ORDER BY timestamp;
+timestamp message
+2015-01-01 00:00:00 Start
+2015-02-01 00:00:00 Start
+2015-03-01 00:00:00 Start
+2015-04-01 00:00:00 Start
+UPDATE logs
+SET message = 'Started'
+ WHERE timestamp < '2015-03-01 00:00:00';
+SELECT * FROM logs ORDER BY timestamp;
+timestamp message
+2015-01-01 00:00:00 Started
+2015-02-01 00:00:00 Started
+2015-03-01 00:00:00 Start
+2015-04-01 00:00:00 Start
+DROP TABLE logs;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/repair_table_no_index_file.result b/storage/mroonga/mysql-test/mroonga/storage/r/repair_table_no_index_file.result
new file mode 100644
index 00000000000..0812fc1089b
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/repair_table_no_index_file.result
@@ -0,0 +1,40 @@
+CREATE DATABASE repair_test;
+USE repair_test;
+CREATE TABLE diaries (
+id INT PRIMARY KEY AUTO_INCREMENT,
+title TEXT,
+body TEXT,
+FULLTEXT INDEX body_index (body)
+) DEFAULT CHARSET UTF8;
+SHOW CREATE TABLE diaries;
+Table Create Table
+diaries CREATE TABLE `diaries` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `title` text,
+ `body` text,
+ PRIMARY KEY (`id`),
+ FULLTEXT KEY `body_index` (`body`)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8
+INSERT INTO diaries (title, body) VALUES ("survey", "will start Groonga!");
+INSERT INTO diaries (title, body) VALUES ("Groonga (1)", "starting Groonga...");
+INSERT INTO diaries (title, body) VALUES ("Groonga (2)", "started Groonga.");
+SELECT * FROM diaries WHERE MATCH(body) AGAINST("+starting" IN BOOLEAN MODE);
+id title body
+2 Groonga (1) starting Groonga...
+FLUSH TABLES;
+SELECT * FROM diaries WHERE MATCH(body) AGAINST("+starting" IN BOOLEAN MODE);
+ERROR HY000: syscall error 'repair_test.mrn.000010A.c' (No such file or directory)
+REPAIR TABLE diaries;
+Table Op Msg_type Msg_text
+repair_test.diaries repair status OK
+SELECT * FROM diaries;
+id title body
+1 survey will start Groonga!
+2 Groonga (1) starting Groonga...
+3 Groonga (2) started Groonga.
+SELECT * FROM diaries WHERE MATCH(body) AGAINST("+starting" IN BOOLEAN MODE);
+id title body
+2 Groonga (1) starting Groonga...
+DROP TABLE diaries;
+DROP DATABASE repair_test;
+USE test;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/replace_geometry.result b/storage/mroonga/mysql-test/mroonga/storage/r/replace_geometry.result
index 94bd5167dbc..e88a799fe2f 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/replace_geometry.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/replace_geometry.result
@@ -5,19 +5,19 @@ geo GEOMETRY NOT NULL,
PRIMARY KEY(id)
) DEFAULT CHARSET=utf8;
INSERT INTO geo_replace VALUES(1, POINT(100,100));
-SELECT id, ASTEXT(geo) FROM geo_replace;
-id ASTEXT(geo)
+SELECT id, ST_AsText(geo) FROM geo_replace;
+id ST_AsText(geo)
1 POINT(100 100)
REPLACE INTO geo_replace VALUES(1, POINT(100,200));
-SELECT id, ASTEXT(geo) FROM geo_replace;
-id ASTEXT(geo)
+SELECT id, ST_AsText(geo) FROM geo_replace;
+id ST_AsText(geo)
1 POINT(100 200)
INSERT INTO geo_replace VALUES(1, POINT(200,200)) ON DUPLICATE KEY UPDATE geo = POINT(200,200);
-SELECT id, ASTEXT(geo) FROM geo_replace;
-id ASTEXT(geo)
+SELECT id, ST_AsText(geo) FROM geo_replace;
+id ST_AsText(geo)
1 POINT(200 200)
UPDATE geo_replace SET geo = POINT(200,300);
-SELECT id, ASTEXT(geo) FROM geo_replace;
-id ASTEXT(geo)
+SELECT id, ST_AsText(geo) FROM geo_replace;
+id ST_AsText(geo)
1 POINT(200 300)
DROP TABLE geo_replace;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/replace_without_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/replace_without_key.result
new file mode 100644
index 00000000000..2c6c1cbc7e8
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/replace_without_key.result
@@ -0,0 +1,10 @@
+DROP TABLE IF EXISTS diaries;
+SET NAMES utf8;
+CREATE TABLE diaries (
+id varchar(32) NOT NULL PRIMARY KEY,
+content text,
+FULLTEXT INDEX (content)
+) DEFAULT CHARSET=utf8;
+REPLACE INTO diaries(content) VALUES("Hello");
+ERROR HY000: primary key is empty
+DROP TABLE diaries;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_allow_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_allow_column.result
new file mode 100644
index 00000000000..37826335b02
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_allow_column.result
@@ -0,0 +1,18 @@
+SET @mroonga_boolean_mode_syntax_flags_backup =
+@@mroonga_boolean_mode_syntax_flags;
+SET mroonga_boolean_mode_syntax_flags = "SYNTAX_QUERY,ALLOW_COLUMN";
+SET NAMES UTF8;
+CREATE TABLE diaries (
+title TEXT,
+content TEXT,
+FULLTEXT KEY (title),
+FULLTEXT KEY (content)
+) DEFAULT CHARSET=utf8;
+INSERT INTO diaries VALUES("Groonga", "Hello Groonga");
+SELECT * FROM diaries
+WHERE MATCH(title) AGAINST("content:@Hello" IN BOOLEAN MODE);
+title content
+Groonga Hello Groonga
+DROP TABLE diaries;
+SET mroonga_boolean_mode_syntax_flags =
+@mroonga_boolean_mode_syntax_flags_backup;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_allow_leading_not.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_allow_leading_not.result
new file mode 100644
index 00000000000..d3ccb150eab
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_allow_leading_not.result
@@ -0,0 +1,16 @@
+SET @mroonga_boolean_mode_syntax_flags_backup =
+@@mroonga_boolean_mode_syntax_flags;
+SET mroonga_boolean_mode_syntax_flags = "SYNTAX_QUERY,ALLOW_LEADING_NOT";
+SET NAMES UTF8;
+CREATE TABLE diaries (
+title TEXT,
+FULLTEXT KEY (title)
+) DEFAULT CHARSET=utf8;
+INSERT INTO diaries VALUES("Groonga");
+INSERT INTO diaries VALUES("Mroonga");
+SELECT * FROM diaries WHERE MATCH(title) AGAINST("-Groonga" IN BOOLEAN MODE);
+title
+Mroonga
+DROP TABLE diaries;
+SET mroonga_boolean_mode_syntax_flags =
+@mroonga_boolean_mode_syntax_flags_backup;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_allow_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_allow_update.result
new file mode 100644
index 00000000000..55cd8742758
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_allow_update.result
@@ -0,0 +1,18 @@
+SET @mroonga_boolean_mode_syntax_flags_backup =
+@@mroonga_boolean_mode_syntax_flags;
+SET mroonga_boolean_mode_syntax_flags = "SYNTAX_QUERY,ALLOW_COLUMN,ALLOW_UPDATE";
+SET NAMES UTF8;
+CREATE TABLE diaries (
+title TEXT,
+content TEXT,
+FULLTEXT KEY (title),
+FULLTEXT KEY (content)
+) DEFAULT CHARSET=utf8;
+INSERT INTO diaries VALUES("Groonga", "Hello Groonga");
+SELECT * FROM diaries
+WHERE MATCH(title) AGAINST('content:="Hello Mroonga"' IN BOOLEAN MODE);
+title content
+Groonga Hello Mroonga
+DROP TABLE diaries;
+SET mroonga_boolean_mode_syntax_flags =
+@mroonga_boolean_mode_syntax_flags_backup;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_syntax_query.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_syntax_query.result
new file mode 100644
index 00000000000..5736fd52c89
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_syntax_query.result
@@ -0,0 +1,15 @@
+SET @mroonga_boolean_mode_syntax_flags_backup =
+@@mroonga_boolean_mode_syntax_flags;
+SET mroonga_boolean_mode_syntax_flags = "SYNTAX_QUERY";
+SET NAMES UTF8;
+CREATE TABLE diaries (
+title TEXT,
+FULLTEXT KEY (title)
+) DEFAULT CHARSET=utf8;
+INSERT INTO diaries VALUES("Re:Mroonga");
+SELECT * FROM diaries WHERE MATCH(title) AGAINST("Re:Mroonga" IN BOOLEAN MODE);
+title
+Re:Mroonga
+DROP TABLE diaries;
+SET mroonga_boolean_mode_syntax_flags =
+@mroonga_boolean_mode_syntax_flags_backup;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_syntax_script.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_syntax_script.result
new file mode 100644
index 00000000000..e42fa259e4a
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_boolean_mode_syntax_flags_syntax_script.result
@@ -0,0 +1,16 @@
+SET @mroonga_boolean_mode_syntax_flags_backup =
+@@mroonga_boolean_mode_syntax_flags;
+SET mroonga_boolean_mode_syntax_flags = "SYNTAX_SCRIPT";
+SET NAMES UTF8;
+CREATE TABLE diaries (
+title TEXT,
+FULLTEXT KEY (title)
+) DEFAULT CHARSET=utf8;
+INSERT INTO diaries VALUES("Re:Mroonga");
+SELECT * FROM diaries
+WHERE MATCH(title) AGAINST("title @ 'Re:Mroonga'" IN BOOLEAN MODE);
+title
+Re:Mroonga
+DROP TABLE diaries;
+SET mroonga_boolean_mode_syntax_flags =
+@mroonga_boolean_mode_syntax_flags_backup;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_database_path_prefix.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_database_path_prefix.result
index 4536dded9d7..beca93b62ad 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_database_path_prefix.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_database_path_prefix.result
@@ -13,5 +13,5 @@ id
1
DROP TABLE counts;
DROP DATABASE clean_test;
-USE test;
SET GLOBAL mroonga_database_path_prefix = NULL;
+USE test;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_global.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_global.result
new file mode 100644
index 00000000000..0181fe02d84
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_global.result
@@ -0,0 +1,20 @@
+DROP TABLE IF EXISTS ids;
+CREATE TABLE ids (
+id INT PRIMARY KEY AUTO_INCREMENT
+) DEFAULT CHARSET=UTF8;
+INSERT INTO ids VALUES (1);
+INSERT INTO ids VALUES (2);
+INSERT INTO ids VALUES (3);
+INSERT INTO ids VALUES (4);
+INSERT INTO ids VALUES (5);
+INSERT INTO ids VALUES (6);
+INSERT INTO ids VALUES (7);
+INSERT INTO ids VALUES (8);
+INSERT INTO ids VALUES (9);
+INSERT INTO ids VALUES (10);
+SET GLOBAL mroonga_max_n_records_for_estimate = 1;
+EXPLAIN SELECT * FROM ids WHERE id > 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE ids range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
+SET GLOBAL mroonga_max_n_records_for_estimate = DEFAULT;
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_session.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_session.result
new file mode 100644
index 00000000000..aca9d75c20f
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_session.result
@@ -0,0 +1,20 @@
+DROP TABLE IF EXISTS ids;
+CREATE TABLE ids (
+id INT PRIMARY KEY AUTO_INCREMENT
+) DEFAULT CHARSET=UTF8;
+INSERT INTO ids VALUES (1);
+INSERT INTO ids VALUES (2);
+INSERT INTO ids VALUES (3);
+INSERT INTO ids VALUES (4);
+INSERT INTO ids VALUES (5);
+INSERT INTO ids VALUES (6);
+INSERT INTO ids VALUES (7);
+INSERT INTO ids VALUES (8);
+INSERT INTO ids VALUES (9);
+INSERT INTO ids VALUES (10);
+SET mroonga_max_n_records_for_estimate = 1;
+EXPLAIN SELECT * FROM ids WHERE id > 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE ids range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
+SET mroonga_max_n_records_for_estimate = DEFAULT;
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result
deleted file mode 100644
index aae83fe2b38..00000000000
--- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result
+++ /dev/null
@@ -1,3 +0,0 @@
-show variables like 'mroonga_version';
-Variable_name Value
-mroonga_version 4.06
diff --git a/storage/mroonga/mysql-test/mroonga/storage/suite.pm b/storage/mroonga/mysql-test/mroonga/storage/suite.pm
index 528ccc5d693..6b345c0fd6f 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/suite.pm
+++ b/storage/mroonga/mysql-test/mroonga/storage/suite.pm
@@ -5,6 +5,11 @@ package My::Suite::Mroonga;
return "No Mroonga engine" unless $ENV{HA_MROONGA_SO} or
$::mysqld_variables{'mroonga'} eq "ON";
+# RECOMPILE_FOR_EMBEDDED also means that a plugin
+# cannot be dynamically loaded into embedded
+return "Not run for embedded server" if $::opt_embedded_server and
+ $ENV{HA_MROONGA_SO};
+
sub is_default { 1 }
my $groonga_normalizer_mysql_dir=$::basedir . '/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql';
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_flags.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_flags.test
index c93ae13a19e..96c99612190 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_flags.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_flags.test
@@ -30,7 +30,7 @@ CREATE TABLE tags (
ALTER TABLE tags ADD COLUMN name VARCHAR(64) COMMENT 'flags "COLUMN_VECTOR"';
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE tags;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_type.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_type.test
index 2f39d52777a..dd05765585d 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_type.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_with_type.test
@@ -34,7 +34,7 @@ CREATE TABLE bugs (
ALTER TABLE bugs ADD COLUMN name VARCHAR(64) COMMENT 'type "tags"';
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE bugs;
DROP TABLE tags;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test
index aee355fdfc1..9c01dc27e3e 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test
@@ -31,11 +31,9 @@ CREATE TABLE memos (
content VARCHAR(64) NOT NULL
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
-
ALTER TABLE memos ADD FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord"';
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_multiple_column_duplicated.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_multiple_column_duplicated.test
new file mode 100644
index 00000000000..72e0ebc14a4
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_multiple_column_duplicated.test
@@ -0,0 +1,39 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+CREATE TABLE ids (
+ id1 INT,
+ id2 INT
+) DEFAULT CHARSET=utf8mb4;
+
+INSERT INTO ids (id1, id2) values (1, 2), (1, 2);
+
+--error ER_DUP_UNIQUE
+ALTER TABLE ids ADD UNIQUE INDEX (id1, id2);
+SHOW CREATE TABLE ids;
+
+SELECT * FROM ids;
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_primary_key.test
new file mode 100644
index 00000000000..3dbfe5e24f0
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_primary_key.test
@@ -0,0 +1,37 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+CREATE TABLE ids (
+ id INT NOT NULL
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+
+INSERT INTO ids VALUES (1);
+INSERT INTO ids VALUES (2);
+
+ALTER TABLE ids ADD PRIMARY KEY (id);
+SHOW CREATE TABLE ids;
+
+SELECT * FROM ids WHERE id = 2;
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test
index fd47d2a60f0..7ec047818e3 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test
@@ -36,11 +36,16 @@ CREATE TABLE memos (
FULLTEXT INDEX (content) COMMENT 'table "terms"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
ALTER TABLE terms COMMENT='default_tokenizer "TokenBigram", token_filters "TokenFilterStopWord"';
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
+
+ALTER TABLE memos DISABLE KEYS;
+ALTER TABLE memos ENABLE KEYS;
+
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE memos;
DROP TABLE terms;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test
new file mode 100644
index 00000000000..97d2d2ed5ec
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test
@@ -0,0 +1,46 @@
+# Copyright(C) 2014 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_query_log
+DROP DATABASE test;
+CREATE DATABASE test;
+USE test;
+--enable_query_log
+
+SET NAMES utf8;
+CREATE TABLE terms (
+ term varchar(256) NOT NULL PRIMARY KEY
+) COMMENT='default_tokenizer "TokenBigram", normalizer "NormalizerAuto"'
+ DEFAULT CHARSET=utf8;
+
+CREATE TABLE memos (
+ id int PRIMARY KEY,
+ content text NOT NULL,
+ FULLTEXT INDEX content_index (content) COMMENT 'table "terms"'
+) DEFAULT CHARSET=utf8;
+
+SELECT mroonga_command("dump --dump_plugins no");
+ALTER TABLE memos DISABLE KEYS;
+SELECT mroonga_command("dump --dump_plugins no");
+
+DROP TABLE memos;
+DROP TABLE terms;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_primary_key.test
new file mode 100644
index 00000000000..87de166cbfd
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_primary_key.test
@@ -0,0 +1,37 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+CREATE TABLE ids (
+ id INT PRIMARY KEY
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+
+INSERT INTO ids VALUES (1);
+INSERT INTO ids VALUES (2);
+
+ALTER TABLE ids DROP PRIMARY KEY;
+SHOW CREATE TABLE ids;
+
+SELECT * FROM ids WHERE id = 2;
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test
new file mode 100644
index 00000000000..4ff4af63534
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test
@@ -0,0 +1,47 @@
+# Copyright(C) 2014 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_query_log
+DROP DATABASE test;
+CREATE DATABASE test;
+USE test;
+--enable_query_log
+
+SET NAMES utf8;
+CREATE TABLE terms (
+ term varchar(256) NOT NULL PRIMARY KEY
+) COMMENT='default_tokenizer "TokenBigram", normalizer "NormalizerAuto"'
+ DEFAULT CHARSET=utf8;
+
+CREATE TABLE memos (
+ id int PRIMARY KEY,
+ content text NOT NULL,
+ FULLTEXT INDEX content_index (content) COMMENT 'table "terms"'
+) DEFAULT CHARSET=utf8;
+
+ALTER TABLE memos DISABLE KEYS;
+SELECT mroonga_command("dump --dump_plugins no");
+ALTER TABLE memos ENABLE KEYS;
+SELECT mroonga_command("dump --dump_plugins no");
+
+DROP TABLE memos;
+DROP TABLE terms;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_spatial.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_spatial.test
index 8a41792bdae..9072d837a83 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_spatial.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_spatial.test
@@ -16,6 +16,7 @@
--source include/not_embedded.inc
--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
@@ -30,117 +31,117 @@ CREATE TABLE shops (
INSERT INTO shops (name, location)
VALUES ('nezu-no-taiyaki',
- GeomFromText('POINT(139.762573 35.720253)'));
+ ST_GeomFromText('POINT(139.762573 35.720253)'));
INSERT INTO shops (name, location)
VALUES ('taiyaki-kataoka',
- GeomFromText('POINT(139.715591 35.712521)'));
+ ST_GeomFromText('POINT(139.715591 35.712521)'));
INSERT INTO shops (name, location)
VALUES ('soba-taiyaki-ku',
- GeomFromText('POINT(139.659088 35.683712)'));
+ ST_GeomFromText('POINT(139.659088 35.683712)'));
INSERT INTO shops (name, location)
VALUES ('kuruma',
- GeomFromText('POINT(139.706207 35.721516)'));
+ ST_GeomFromText('POINT(139.706207 35.721516)'));
INSERT INTO shops (name, location)
VALUES ('hirose-ya',
- GeomFromText('POINT(139.685608 35.714844)'));
+ ST_GeomFromText('POINT(139.685608 35.714844)'));
INSERT INTO shops (name, location)
VALUES ('sazare',
- GeomFromText('POINT(139.685043 35.714653)'));
+ ST_GeomFromText('POINT(139.685043 35.714653)'));
INSERT INTO shops (name, location)
VALUES ('omede-taiyaki',
- GeomFromText('POINT(139.817154 35.700516)'));
+ ST_GeomFromText('POINT(139.817154 35.700516)'));
INSERT INTO shops (name, location)
VALUES ('onaga-ya',
- GeomFromText('POINT(139.81105 35.698254)'));
+ ST_GeomFromText('POINT(139.81105 35.698254)'));
INSERT INTO shops (name, location)
VALUES ('shiro-ya',
- GeomFromText('POINT(139.638611 35.705517)'));
+ ST_GeomFromText('POINT(139.638611 35.705517)'));
INSERT INTO shops (name, location)
VALUES ('fuji-ya',
- GeomFromText('POINT(139.637115 35.703938)'));
+ ST_GeomFromText('POINT(139.637115 35.703938)'));
INSERT INTO shops (name, location)
VALUES ('miyoshi',
- GeomFromText('POINT(139.537323 35.644539)'));
+ ST_GeomFromText('POINT(139.537323 35.644539)'));
INSERT INTO shops (name, location)
VALUES ('juju-ya',
- GeomFromText('POINT(139.695755 35.628922)'));
+ ST_GeomFromText('POINT(139.695755 35.628922)'));
INSERT INTO shops (name, location)
VALUES ('tatsumi-ya',
- GeomFromText('POINT(139.638657 35.665501)'));
+ ST_GeomFromText('POINT(139.638657 35.665501)'));
INSERT INTO shops (name, location)
VALUES ('tetsuji',
- GeomFromText('POINT(139.76857 35.680912)'));
+ ST_GeomFromText('POINT(139.76857 35.680912)'));
INSERT INTO shops (name, location)
VALUES ('gazuma-ya',
- GeomFromText('POINT(139.647598 35.700817)'));
+ ST_GeomFromText('POINT(139.647598 35.700817)'));
INSERT INTO shops (name, location)
VALUES ('honma-mon',
- GeomFromText('POINT(139.652573 35.722736)'));
+ ST_GeomFromText('POINT(139.652573 35.722736)'));
INSERT INTO shops (name, location)
VALUES ('naniwa-ya',
- GeomFromText('POINT(139.796234 35.730061)'));
+ ST_GeomFromText('POINT(139.796234 35.730061)'));
INSERT INTO shops (name, location)
VALUES ('kuro-dai',
- GeomFromText('POINT(139.704834 35.650345)'));
+ ST_GeomFromText('POINT(139.704834 35.650345)'));
INSERT INTO shops (name, location)
VALUES ('daruma',
- GeomFromText('POINT(139.770599 35.681461)'));
+ ST_GeomFromText('POINT(139.770599 35.681461)'));
INSERT INTO shops (name, location)
VALUES ('yanagi-ya',
- GeomFromText('POINT(139.783981 35.685341)'));
+ ST_GeomFromText('POINT(139.783981 35.685341)'));
INSERT INTO shops (name, location)
VALUES ('sharaku',
- GeomFromText('POINT(139.794846 35.716969)'));
+ ST_GeomFromText('POINT(139.794846 35.716969)'));
INSERT INTO shops (name, location)
VALUES ('takane',
- GeomFromText('POINT(139.560913 35.698601)'));
+ ST_GeomFromText('POINT(139.560913 35.698601)'));
INSERT INTO shops (name, location)
VALUES ('chiyoda',
- GeomFromText('POINT(139.652817 35.642601)'));
+ ST_GeomFromText('POINT(139.652817 35.642601)'));
INSERT INTO shops (name, location)
VALUES ('da-ka-po',
- GeomFromText('POINT(139.727356 35.627346)'));
+ ST_GeomFromText('POINT(139.727356 35.627346)'));
INSERT INTO shops (name, location)
VALUES ('matsushima-ya',
- GeomFromText('POINT(139.737381 35.640556)'));
+ ST_GeomFromText('POINT(139.737381 35.640556)'));
INSERT INTO shops (name, location)
VALUES ('kazuya',
- GeomFromText('POINT(139.760895 35.673508)'));
+ ST_GeomFromText('POINT(139.760895 35.673508)'));
INSERT INTO shops (name, location)
VALUES ('furuya-kogane-an',
- GeomFromText('POINT(139.676071 35.680603)'));
+ ST_GeomFromText('POINT(139.676071 35.680603)'));
INSERT INTO shops (name, location)
VALUES ('hachi-no-ie',
- GeomFromText('POINT(139.668106 35.608021)'));
+ ST_GeomFromText('POINT(139.668106 35.608021)'));
INSERT INTO shops (name, location)
VALUES ('azuki-chan',
- GeomFromText('POINT(139.673203 35.64151)'));
+ ST_GeomFromText('POINT(139.673203 35.64151)'));
INSERT INTO shops (name, location)
VALUES ('kuriko-an',
- GeomFromText('POINT(139.796829 35.712013)'));
+ ST_GeomFromText('POINT(139.796829 35.712013)'));
INSERT INTO shops (name, location)
VALUES ('yume-no-aru-machi-no-taiyaki-ya-san',
- GeomFromText('POINT(139.712524 35.616199)'));
+ ST_GeomFromText('POINT(139.712524 35.616199)'));
INSERT INTO shops (name, location)
VALUES ('naze-ya',
- GeomFromText('POINT(139.665833 35.609039)'));
+ ST_GeomFromText('POINT(139.665833 35.609039)'));
INSERT INTO shops (name, location)
VALUES ('sanoki-ya',
- GeomFromText('POINT(139.770721 35.66592)'));
+ ST_GeomFromText('POINT(139.770721 35.66592)'));
INSERT INTO shops (name, location)
VALUES ('shigeta',
- GeomFromText('POINT(139.780273 35.672626)'));
+ ST_GeomFromText('POINT(139.780273 35.672626)'));
INSERT INTO shops (name, location)
VALUES ('nishimi-ya',
- GeomFromText('POINT(139.774628 35.671825)'));
+ ST_GeomFromText('POINT(139.774628 35.671825)'));
INSERT INTO shops (name, location)
VALUES ('hiiragi',
- GeomFromText('POINT(139.711517 35.647701)'));
+ ST_GeomFromText('POINT(139.711517 35.647701)'));
ALTER TABLE shops ADD SPATIAL KEY location_index (location);
-SELECT id, name, AsText(location) AS location_text FROM shops
- WHERE MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location)
+SELECT id, name, ST_AsText(location) AS location_text FROM shops
+ WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location)
ORDER BY id;
SHOW CREATE TABLE shops;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/version_55_performance_schema.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_french.test
index 809b6fa29b1..204b1f416ad 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/version_55_performance_schema.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_french.test
@@ -1,4 +1,4 @@
-# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -14,27 +14,22 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---source ../../include/mroonga/have_version_55.inc
---source include/have_innodb.inc
---source include/not_embedded.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
DROP TABLE IF EXISTS diaries;
--enable_warnings
-SHOW VARIABLES LIKE 'performance_schema';
-
+SET NAMES utf8mb4;
CREATE TABLE diaries (
- id INT PRIMARY KEY AUTO_INCREMENT,
- content VARCHAR(255),
+ content varchar(256) COLLATE utf8mb4_unicode_520_ci,
FULLTEXT INDEX (content)
-) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"';
-SHOW CREATE TABLE diaries;
+) DEFAULT CHARSET=utf8mb4;
-INSERT INTO diaries (content) VALUES ("Tommorow will be shiny day!");
+INSERT INTO diaries VALUES ("Je suis un garçon.");
-SHOW TABLES FROM performance_schema;
+SELECT * FROM diaries WHERE MATCH (content) AGAINST ("+garcon" IN BOOLEAN MODE);
DROP TABLE diaries;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_japanese.test
new file mode 100644
index 00000000000..a6a18dc4846
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_japanese.test
@@ -0,0 +1,37 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_version_56_or_later.inc
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS diaries;
+--enable_warnings
+
+SET NAMES utf8mb4;
+CREATE TABLE diaries (
+ content varchar(256) COLLATE utf8mb4_unicode_520_ci,
+ FULLTEXT INDEX (content)
+) DEFAULT CHARSET=utf8mb4;
+
+INSERT INTO diaries VALUES ("ひらがなとカタカナを覚えました。");
+
+SELECT * FROM diaries
+ WHERE MATCH (content) AGAINST ("+かたかな" IN BOOLEAN MODE);
+
+DROP TABLE diaries;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_other_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_other_table.test
index 805c744236f..dbaf2fb429f 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_other_table.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_other_table.test
@@ -1,4 +1,4 @@
-# Copyright(C) 2013 Kouhei Sutou <kou@clear-code.com>
+# Copyright(C) 2014 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -16,39 +16,27 @@
--source include/not_embedded.inc
--source ../../include/mroonga/have_mroonga.inc
---source ../../include/mroonga/load_mroonga_functions.inc
---disable_warnings
-DROP DATABASE IF EXISTS mroonga;
---enable_warnings
-
-CREATE DATABASE mroonga;
-USE mroonga;
-
-CREATE TABLE tags (
+CREATE TABLE terms (
name VARCHAR(64) PRIMARY KEY
) DEFAULT CHARSET=utf8
- COLLATE=utf8_bin
- COMMENT='default_tokenizer "TokenDelimit"';
+ COMMENT='default_tokenizer "TokenBigram"';
CREATE TABLE bugs (
id INT UNSIGNED PRIMARY KEY,
- tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"',
- FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"'
+ title TEXT,
+ FULLTEXT INDEX (title) COMMENT 'table "terms"'
) DEFAULT CHARSET=utf8;
-INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga");
+INSERT INTO bugs (id, title) VALUES (1, "Mroonga can't build with MySQL X.Y.Z");
-SELECT mroonga_command("dump");
+SELECT * FROM terms ORDER BY name;
-SELECT *, MATCH (tags) AGAINST ("MySQL" IN BOOLEAN MODE) AS score
+SELECT *, MATCH (title) AGAINST ("+MySQL" IN BOOLEAN MODE) AS score
FROM bugs
- WHERE MATCH (tags) AGAINST ("MySQL" IN BOOLEAN MODE);
+ WHERE MATCH (title) AGAINST ("+MySQL" IN BOOLEAN MODE);
DROP TABLE bugs;
-DROP TABLE tags;
-
-DROP DATABASE mroonga;
+DROP TABLE terms;
---source ../../include/mroonga/unload_mroonga_functions.inc
--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_vector_other_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_vector_other_table.test
new file mode 100644
index 00000000000..e9c9bb9b5ee
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_vector_other_table.test
@@ -0,0 +1,54 @@
+# Copyright(C) 2013 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_warnings
+DROP DATABASE IF EXISTS mroonga;
+--enable_warnings
+
+CREATE DATABASE mroonga;
+USE mroonga;
+
+CREATE TABLE tags (
+ name VARCHAR(64) PRIMARY KEY
+) DEFAULT CHARSET=utf8
+ COLLATE=utf8_bin
+ COMMENT='default_tokenizer "TokenDelimit"';
+
+CREATE TABLE bugs (
+ id INT UNSIGNED PRIMARY KEY,
+ tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"',
+ FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"'
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga");
+
+SELECT mroonga_command("dump --dump_plugins no --dump_records no");
+
+SELECT *, MATCH (tags) AGAINST ("+MySQL" IN BOOLEAN MODE) AS score
+ FROM bugs
+ WHERE MATCH (tags) AGAINST ("+MySQL" IN BOOLEAN MODE);
+
+DROP TABLE bugs;
+DROP TABLE tags;
+
+DROP DATABASE mroonga;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test
index 91f204133dd..27cf85033cb 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test
@@ -40,7 +40,7 @@ INSERT INTO bugs (id, priority) VALUES (1, 10);
INSERT INTO bugs (id, priority) VALUES (2, 3);
INSERT INTO bugs (id, priority) VALUES (3, -2);
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no --dump_records no");
SELECT *
FROM bugs
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_lz4.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_lz4.test
new file mode 100644
index 00000000000..5de8f951d8f
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_lz4.test
@@ -0,0 +1,37 @@
+# Copyright(C) 2014 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/support_libgroonga_lz4.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS entries;
+--enable_warnings
+
+CREATE TABLE entries (
+ id INT UNSIGNED PRIMARY KEY,
+ content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_LZ4"'
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!");
+
+SELECT * FROM entries;
+
+DROP TABLE entries;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zlib.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zlib.test
new file mode 100644
index 00000000000..3ec14ebef76
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zlib.test
@@ -0,0 +1,37 @@
+# Copyright(C) 2014 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/support_libgroonga_zlib.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS entries;
+--enable_warnings
+
+CREATE TABLE entries (
+ id INT UNSIGNED PRIMARY KEY,
+ content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_ZLIB"'
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!");
+
+SELECT * FROM entries;
+
+DROP TABLE entries;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_lz4.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_lz4.test
new file mode 100644
index 00000000000..324b7ac89f5
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_lz4.test
@@ -0,0 +1,37 @@
+# Copyright(C) 2014 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/unsupport_libgroonga_lz4.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS entries;
+--enable_warnings
+
+CREATE TABLE entries (
+ id INT UNSIGNED PRIMARY KEY,
+ content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_LZ4"'
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!");
+
+SELECT * FROM entries;
+
+DROP TABLE entries;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zlib.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zlib.test
new file mode 100644
index 00000000000..10e77e40e3d
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zlib.test
@@ -0,0 +1,37 @@
+# Copyright(C) 2014 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/unsupport_libgroonga_zlib.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS entries;
+--enable_warnings
+
+CREATE TABLE entries (
+ id INT UNSIGNED PRIMARY KEY,
+ content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_ZLIB"'
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!");
+
+SELECT * FROM entries;
+
+DROP TABLE entries;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test
index 7c8cd3f32a0..30b53f8eee0 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test
@@ -30,7 +30,7 @@ CREATE TABLE tags (
COLLATE=utf8_bin
COMMENT='default_tokenizer "TokenDelimit"';
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE tags;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_none.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_none.test
new file mode 100644
index 00000000000..039c518e673
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_none.test
@@ -0,0 +1,38 @@
+# Copyright(C) 2015 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_query_log
+DROP DATABASE test;
+CREATE DATABASE test;
+USE test;
+--enable_query_log
+
+SET NAMES utf8;
+
+CREATE TABLE memos (
+ content VARCHAR(64) NOT NULL,
+ FULLTEXT INDEX (content) COMMENT 'index_flags "NONE"'
+) DEFAULT CHARSET=utf8;
+
+SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
+
+DROP TABLE memos;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_with_position_and_with_weight.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_with_position_and_with_weight.test
new file mode 100644
index 00000000000..9a67644d2c5
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_with_position_and_with_weight.test
@@ -0,0 +1,38 @@
+# Copyright(C) 2015 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_query_log
+DROP DATABASE test;
+CREATE DATABASE test;
+USE test;
+--enable_query_log
+
+SET NAMES utf8;
+
+CREATE TABLE memos (
+ content VARCHAR(64) NOT NULL,
+ FULLTEXT INDEX (content) COMMENT 'index_flags "WITH_POSITION|WITH_WEIGHT"'
+) DEFAULT CHARSET=utf8;
+
+SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
+
+DROP TABLE memos;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index_comment.test
index 02e2cb9e81a..02e2cb9e81a 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index_comment.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_no_utf8_charset_with_utf8_normalizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index_no_utf8_charset_with_utf8_normalizer.test
index f28fb5b8695..f28fb5b8695 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_no_utf8_charset_with_utf8_normalizer.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index_no_utf8_charset_with_utf8_normalizer.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index_none.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index_none.test
new file mode 100644
index 00000000000..ae4d4cb9f1b
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_fulltext_index_none.test
@@ -0,0 +1,42 @@
+# Copyright(C) 2014 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS diaries;
+--enable_warnings
+
+SET NAMES utf8;
+
+CREATE TABLE diaries (
+ day DATE PRIMARY KEY,
+ content VARCHAR(64) NOT NULL,
+ FULLTEXT INDEX (content) COMMENT 'normalizer "none"'
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO diaries VALUES ("2013-04-23", "Mroonga");
+
+SELECT * FROM diaries
+ WHERE MATCH (content) AGAINST ("+Mroonga" IN BOOLEAN MODE);
+SELECT * FROM diaries
+ WHERE MATCH (content) AGAINST ("+mroonga" IN BOOLEAN MODE);
+
+DROP TABLE diaries;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_table_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_primary_key_table_comment.test
index 1da8026f56d..1da8026f56d 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_table_comment.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_primary_key_table_comment.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_primary_key_table_comment_with_using_hash.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_primary_key_table_comment_with_using_hash.test
new file mode 100644
index 00000000000..14b9ea9ab87
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_normalizer_primary_key_table_comment_with_using_hash.test
@@ -0,0 +1,47 @@
+# Copyright(C) 2015 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS memos;
+DROP TABLE IF EXISTS terms;
+--enable_warnings
+
+SET NAMES utf8;
+
+CREATE TABLE terms (
+ term VARCHAR(64) NOT NULL,
+ PRIMARY KEY (term) USING HASH
+) COMMENT='default_tokenizer "TokenBigram", normalizer "NormalizerAuto"' DEFAULT CHARSET=utf8;
+
+CREATE TABLE memos (
+ id INT NOT NULL PRIMARY KEY,
+ content TEXT NOT NULL,
+ FULLTEXT INDEX (content) COMMENT 'table "terms"'
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO memos VALUES (1, "1日の消費㌍は約2000㌔㌍");
+
+SELECT * FROM memos
+ WHERE MATCH (content) AGAINST ("+カロリー" IN BOOLEAN MODE);
+
+DROP TABLE memos;
+DROP TABLE terms;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_reference_type.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_reference_type.test
index eb1095e75a7..0a1340d24d1 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_reference_type.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_reference_type.test
@@ -33,7 +33,7 @@ CREATE TABLE bugs (
tag VARCHAR(64) COMMENT 'type "tags"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE bugs;
DROP TABLE tags;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_index_comment_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_index_comment_multiple_token_filters.test
index 66bf9cef699..18a2607fa0b 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_index_comment_multiple_token_filters.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_index_comment_multiple_token_filters.test
@@ -32,7 +32,7 @@ CREATE TABLE memos (
FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord,TokenFilterStopWord"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_index_comment_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_index_comment_one_token_filter.test
index 49a23ec6b74..20df762d31b 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_index_comment_one_token_filter.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_index_comment_one_token_filter.test
@@ -32,7 +32,7 @@ CREATE TABLE memos (
FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_table_comment_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_table_comment_multiple_token_filters.test
index 7d890aff9d3..e4d7d8618fa 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_table_comment_multiple_token_filters.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_table_comment_multiple_token_filters.test
@@ -36,7 +36,7 @@ CREATE TABLE memos (
FULLTEXT INDEX (content) COMMENT 'table "terms"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE memos;
DROP TABLE terms;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_table_comment_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_table_comment_one_token_filter.test
index f391647a538..905181175d0 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_table_comment_one_token_filter.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_token_filters_table_comment_one_token_filter.test
@@ -36,7 +36,7 @@ CREATE TABLE memos (
FULLTEXT INDEX (content) COMMENT 'table "terms"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE memos;
DROP TABLE terms;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_vector.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_vector.test
index 8707ce0e34b..2d5498c99c8 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_vector.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_vector.test
@@ -29,7 +29,7 @@ CREATE TABLE bugs (
tags TEXT COMMENT 'flags "COLUMN_VECTOR"'
) DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE bugs;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_all.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_all.test
new file mode 100644
index 00000000000..b94172c1c72
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_all.test
@@ -0,0 +1,44 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS memos;
+--enable_warnings
+
+SET NAMES utf8;
+CREATE TABLE memos (
+ id INT PRIMARY KEY,
+ title VARCHAR(255),
+ content TEXT,
+ FULLTEXT INDEX (title, content)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO memos VALUES(1, "Groonga", "Groonga is fast.");
+INSERT INTO memos VALUES(2, "Mroonga", "Mroonga is also fast.");
+INSERT INTO memos VALUES(3, "Rroonga", "Rroonga is also fast.");
+
+SELECT *,
+ MATCH(title, content)
+ AGAINST("*W1:10,2:2DOR Groonga Mroonga" in BOOLEAN MODE) AS score
+ FROM memos
+ WHERE MATCH(title, content)
+ AGAINST("*W1:10,2:2DOR Groonga Mroonga" in BOOLEAN MODE);
+
+DROP TABLE memos;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_select.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_select.test
index 641bbc3c4bd..3dffb2fb458 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_select.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_select.test
@@ -36,10 +36,6 @@ select * from t1 where c1>3 order by c1 desc;
select * from t2 where c1>3 order by c1 asc;
select * from t1 where c2>"s" order by c2 desc;
select * from t2 where c2>"s" order by c1 asc;
-select * from t1 where match(c2) against("ii") order by match(c2) against("ii") desc;
-select * from t2 where match(c2) against("ii") order by match(c2) against("ii") asc;
-select c1,c2,match(c2) against("ii") from t1 where match(c2) against("ii");
-select c1,c2,match(c2) against("ii") from t2 where match(c2) against("ii");
drop table t1,t2;
--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_different_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_against.test
index f2859f99dba..f2859f99dba 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_different_against.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_against.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_different_match.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_match.test
index dc97db87487..dc97db87487 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_different_match.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_match.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_no_where.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_no_where.test
index 50dd652e2d0..50dd652e2d0 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_no_where.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_no_where.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_same_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_same_match_against.test
index 0873849a1e7..0873849a1e7 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_same_match_against.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_same_match_against.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_asc.test
new file mode 100644
index 00000000000..1b29b5b9284
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_asc.test
@@ -0,0 +1,47 @@
+# Copyright(C) 2015 Kouhei Sutou
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS logs;
+--enable_warnings
+
+SET NAMES UTF8;
+CREATE TABLE logs(
+ message TEXT,
+ FULLTEXT KEY (message)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO logs VALUES("Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning");
+INSERT INTO logs VALUES("Error Error");
+INSERT INTO logs VALUES("Warning Warning");
+INSERT INTO logs VALUES("Error");
+INSERT INTO logs VALUES("Warning");
+INSERT INTO logs VALUES("Error Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning Warning");
+
+SELECT * FROM logs;
+
+SELECT *, MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) AS score
+ FROM logs
+ WHERE MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE)
+ ORDER BY MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) ASC;
+
+DROP TABLE logs;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_desc.test
new file mode 100644
index 00000000000..761c7259057
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_desc.test
@@ -0,0 +1,47 @@
+# Copyright(C) 2015 Kouhei Sutou
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS logs;
+--enable_warnings
+
+SET NAMES UTF8;
+CREATE TABLE logs(
+ message TEXT,
+ FULLTEXT KEY (message)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO logs VALUES("Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning");
+INSERT INTO logs VALUES("Error Error");
+INSERT INTO logs VALUES("Warning Warning");
+INSERT INTO logs VALUES("Error");
+INSERT INTO logs VALUES("Warning");
+INSERT INTO logs VALUES("Error Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning Warning");
+
+SELECT * FROM logs;
+
+SELECT *, MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) AS score
+ FROM logs
+ WHERE MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE)
+ ORDER BY MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) DESC;
+
+DROP TABLE logs;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_against.test
new file mode 100644
index 00000000000..eef4e08c5d1
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_against.test
@@ -0,0 +1,47 @@
+# Copyright(C) 2015 Kouhei Sutou
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS logs;
+--enable_warnings
+
+SET NAMES UTF8;
+CREATE TABLE logs(
+ message TEXT,
+ FULLTEXT KEY (message)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO logs VALUES("Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning");
+INSERT INTO logs VALUES("Error Error");
+INSERT INTO logs VALUES("Warning Warning");
+INSERT INTO logs VALUES("Error");
+INSERT INTO logs VALUES("Warning");
+INSERT INTO logs VALUES("Error Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning Warning");
+
+SELECT * FROM logs;
+
+SELECT *, MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) AS score
+ FROM logs
+ WHERE MATCH(message) AGAINST("Error Warning" IN NATURAL LANGUAGE MODE)
+ ORDER BY MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE);
+
+DROP TABLE logs;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_match.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_match.test
new file mode 100644
index 00000000000..42b621f4401
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_match.test
@@ -0,0 +1,49 @@
+# Copyright(C) 2015 Kouhei Sutou
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS logs;
+--enable_warnings
+
+SET NAMES UTF8;
+CREATE TABLE logs(
+ message TEXT,
+ host TEXT,
+ FULLTEXT KEY (message),
+ FULLTEXT KEY (host)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO logs VALUES("Error Error Error", "host1");
+INSERT INTO logs VALUES("Warning Warning Warning", "host1");
+INSERT INTO logs VALUES("Error Error", "host2");
+INSERT INTO logs VALUES("Warning Warning", "host2");
+INSERT INTO logs VALUES("Error", "host2");
+INSERT INTO logs VALUES("Warning", "host2");
+INSERT INTO logs VALUES("Error Error Error Error", "host2");
+INSERT INTO logs VALUES("Warning Warning Warning Warning", "host2");
+
+SELECT * FROM logs;
+
+SELECT *, MATCH(host) AGAINST("host2" IN NATURAL LANGUAGE MODE) AS score
+ FROM logs
+ WHERE MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE)
+ ORDER BY MATCH(host) AGAINST("host2" IN NATURAL LANGUAGE MODE);
+
+DROP TABLE logs;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_no_where.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_no_where.test
new file mode 100644
index 00000000000..2078e59f042
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_no_where.test
@@ -0,0 +1,46 @@
+# Copyright(C) 2015 Kouhei Sutou
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS logs;
+--enable_warnings
+
+SET NAMES UTF8;
+CREATE TABLE logs(
+ message TEXT,
+ FULLTEXT KEY (message)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO logs VALUES("Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning");
+INSERT INTO logs VALUES("Error Error");
+INSERT INTO logs VALUES("Warning Warning");
+INSERT INTO logs VALUES("Error");
+INSERT INTO logs VALUES("Warning");
+INSERT INTO logs VALUES("Error Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning Warning");
+
+SELECT * FROM logs;
+
+SELECT *, MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) AS score
+ FROM logs
+ ORDER BY MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE);
+
+DROP TABLE logs;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_same_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_same_match_against.test
new file mode 100644
index 00000000000..9a8c93c3470
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_same_match_against.test
@@ -0,0 +1,47 @@
+# Copyright(C) 2015 Kouhei Sutou
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS logs;
+--enable_warnings
+
+SET NAMES UTF8;
+CREATE TABLE logs(
+ message TEXT,
+ FULLTEXT KEY (message)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO logs VALUES("Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning");
+INSERT INTO logs VALUES("Error Error");
+INSERT INTO logs VALUES("Warning Warning");
+INSERT INTO logs VALUES("Error");
+INSERT INTO logs VALUES("Warning");
+INSERT INTO logs VALUES("Error Error Error Error");
+INSERT INTO logs VALUES("Warning Warning Warning Warning");
+
+SELECT * FROM logs;
+
+SELECT *, MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE) AS score
+ FROM logs
+ WHERE MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE)
+ ORDER BY MATCH(message) AGAINST("Error" IN NATURAL LANGUAGE MODE);
+
+DROP TABLE logs;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test
index 39462257f9d..a5f42e2c9f3 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test
@@ -15,6 +15,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
+--source ../../include/mroonga/skip_mysql_57.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
@@ -27,7 +29,7 @@ CREATE TABLE shops (
INSERT INTO shops VALUES (NULL), (NULL);
-SELECT AsText(location) FROM shops;
+SELECT ST_AsText(location) FROM shops;
DROP TABLE shops;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null_57.test b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null_57.test
new file mode 100644
index 00000000000..84ce595621e
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null_57.test
@@ -0,0 +1,38 @@
+# Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.com>
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_57.inc
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS shops;
+--enable_warnings
+
+CREATE TABLE shops (
+ location GEOMETRY NOT NULL
+);
+
+SET SESSION sql_mode = '';
+INSERT INTO shops VALUES (NULL), (NULL);
+SET SESSION sql_mode = default;
+
+SELECT ST_AsText(location) FROM shops;
+
+DROP TABLE shops;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test
index c8ec649f181..2fcf7ec5e4b 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test
@@ -15,6 +15,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
@@ -31,116 +32,116 @@ SHOW CREATE TABLE shops;
INSERT INTO shops (name, location)
VALUES ('nezu-no-taiyaki',
- GeomFromText('POINT(139.762573 35.720253)'));
+ ST_GeomFromText('POINT(139.762573 35.720253)'));
INSERT INTO shops (name, location)
VALUES ('taiyaki-kataoka',
- GeomFromText('POINT(139.715591 35.712521)'));
+ ST_GeomFromText('POINT(139.715591 35.712521)'));
INSERT INTO shops (name, location)
VALUES ('soba-taiyaki-ku',
- GeomFromText('POINT(139.659088 35.683712)'));
+ ST_GeomFromText('POINT(139.659088 35.683712)'));
INSERT INTO shops (name, location)
VALUES ('kuruma',
- GeomFromText('POINT(139.706207 35.721516)'));
+ ST_GeomFromText('POINT(139.706207 35.721516)'));
INSERT INTO shops (name, location)
VALUES ('hirose-ya',
- GeomFromText('POINT(139.685608 35.714844)'));
+ ST_GeomFromText('POINT(139.685608 35.714844)'));
INSERT INTO shops (name, location)
VALUES ('sazare',
- GeomFromText('POINT(139.685043 35.714653)'));
+ ST_GeomFromText('POINT(139.685043 35.714653)'));
INSERT INTO shops (name, location)
VALUES ('omede-taiyaki',
- GeomFromText('POINT(139.817154 35.700516)'));
+ ST_GeomFromText('POINT(139.817154 35.700516)'));
INSERT INTO shops (name, location)
VALUES ('onaga-ya',
- GeomFromText('POINT(139.81105 35.698254)'));
+ ST_GeomFromText('POINT(139.81105 35.698254)'));
INSERT INTO shops (name, location)
VALUES ('shiro-ya',
- GeomFromText('POINT(139.638611 35.705517)'));
+ ST_GeomFromText('POINT(139.638611 35.705517)'));
INSERT INTO shops (name, location)
VALUES ('fuji-ya',
- GeomFromText('POINT(139.637115 35.703938)'));
+ ST_GeomFromText('POINT(139.637115 35.703938)'));
INSERT INTO shops (name, location)
VALUES ('miyoshi',
- GeomFromText('POINT(139.537323 35.644539)'));
+ ST_GeomFromText('POINT(139.537323 35.644539)'));
INSERT INTO shops (name, location)
VALUES ('juju-ya',
- GeomFromText('POINT(139.695755 35.628922)'));
+ ST_GeomFromText('POINT(139.695755 35.628922)'));
INSERT INTO shops (name, location)
VALUES ('tatsumi-ya',
- GeomFromText('POINT(139.638657 35.665501)'));
+ ST_GeomFromText('POINT(139.638657 35.665501)'));
INSERT INTO shops (name, location)
VALUES ('tetsuji',
- GeomFromText('POINT(139.76857 35.680912)'));
+ ST_GeomFromText('POINT(139.76857 35.680912)'));
INSERT INTO shops (name, location)
VALUES ('gazuma-ya',
- GeomFromText('POINT(139.647598 35.700817)'));
+ ST_GeomFromText('POINT(139.647598 35.700817)'));
INSERT INTO shops (name, location)
VALUES ('honma-mon',
- GeomFromText('POINT(139.652573 35.722736)'));
+ ST_GeomFromText('POINT(139.652573 35.722736)'));
INSERT INTO shops (name, location)
VALUES ('naniwa-ya',
- GeomFromText('POINT(139.796234 35.730061)'));
+ ST_GeomFromText('POINT(139.796234 35.730061)'));
INSERT INTO shops (name, location)
VALUES ('kuro-dai',
- GeomFromText('POINT(139.704834 35.650345)'));
+ ST_GeomFromText('POINT(139.704834 35.650345)'));
INSERT INTO shops (name, location)
VALUES ('daruma',
- GeomFromText('POINT(139.770599 35.681461)'));
+ ST_GeomFromText('POINT(139.770599 35.681461)'));
INSERT INTO shops (name, location)
VALUES ('yanagi-ya',
- GeomFromText('POINT(139.783981 35.685341)'));
+ ST_GeomFromText('POINT(139.783981 35.685341)'));
INSERT INTO shops (name, location)
VALUES ('sharaku',
- GeomFromText('POINT(139.794846 35.716969)'));
+ ST_GeomFromText('POINT(139.794846 35.716969)'));
INSERT INTO shops (name, location)
VALUES ('takane',
- GeomFromText('POINT(139.560913 35.698601)'));
+ ST_GeomFromText('POINT(139.560913 35.698601)'));
INSERT INTO shops (name, location)
VALUES ('chiyoda',
- GeomFromText('POINT(139.652817 35.642601)'));
+ ST_GeomFromText('POINT(139.652817 35.642601)'));
INSERT INTO shops (name, location)
VALUES ('da-ka-po',
- GeomFromText('POINT(139.727356 35.627346)'));
+ ST_GeomFromText('POINT(139.727356 35.627346)'));
INSERT INTO shops (name, location)
VALUES ('matsushima-ya',
- GeomFromText('POINT(139.737381 35.640556)'));
+ ST_GeomFromText('POINT(139.737381 35.640556)'));
INSERT INTO shops (name, location)
VALUES ('kazuya',
- GeomFromText('POINT(139.760895 35.673508)'));
+ ST_GeomFromText('POINT(139.760895 35.673508)'));
INSERT INTO shops (name, location)
VALUES ('furuya-kogane-an',
- GeomFromText('POINT(139.676071 35.680603)'));
+ ST_GeomFromText('POINT(139.676071 35.680603)'));
INSERT INTO shops (name, location)
VALUES ('hachi-no-ie',
- GeomFromText('POINT(139.668106 35.608021)'));
+ ST_GeomFromText('POINT(139.668106 35.608021)'));
INSERT INTO shops (name, location)
VALUES ('azuki-chan',
- GeomFromText('POINT(139.673203 35.64151)'));
+ ST_GeomFromText('POINT(139.673203 35.64151)'));
INSERT INTO shops (name, location)
VALUES ('kuriko-an',
- GeomFromText('POINT(139.796829 35.712013)'));
+ ST_GeomFromText('POINT(139.796829 35.712013)'));
INSERT INTO shops (name, location)
VALUES ('yume-no-aru-machi-no-taiyaki-ya-san',
- GeomFromText('POINT(139.712524 35.616199)'));
+ ST_GeomFromText('POINT(139.712524 35.616199)'));
INSERT INTO shops (name, location)
VALUES ('naze-ya',
- GeomFromText('POINT(139.665833 35.609039)'));
+ ST_GeomFromText('POINT(139.665833 35.609039)'));
INSERT INTO shops (name, location)
VALUES ('sanoki-ya',
- GeomFromText('POINT(139.770721 35.66592)'));
+ ST_GeomFromText('POINT(139.770721 35.66592)'));
INSERT INTO shops (name, location)
VALUES ('shigeta',
- GeomFromText('POINT(139.780273 35.672626)'));
+ ST_GeomFromText('POINT(139.780273 35.672626)'));
INSERT INTO shops (name, location)
VALUES ('nishimi-ya',
- GeomFromText('POINT(139.774628 35.671825)'));
+ ST_GeomFromText('POINT(139.774628 35.671825)'));
INSERT INTO shops (name, location)
VALUES ('hiiragi',
- GeomFromText('POINT(139.711517 35.647701)'));
+ ST_GeomFromText('POINT(139.711517 35.647701)'));
-SELECT id, name, AsText(location) AS location_text FROM shops;
-SELECT id, name, AsText(location) AS location_text FROM shops
- WHERE MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location)
+SELECT id, name, ST_AsText(location) AS location_text FROM shops;
+SELECT id, name, ST_AsText(location) AS location_text FROM shops
+ WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location)
ORDER BY id;
DROP TABLE shops;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_asc.test
new file mode 100644
index 00000000000..6bab6708ba7
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_asc.test
@@ -0,0 +1,41 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+SET NAMES UTF8;
+
+CREATE TABLE ids (
+ id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+ value INT(10),
+ INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+
+SELECT id, value FROM ids WHERE value > 10 ORDER BY value ASC LIMIT 3;
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_desc.test
new file mode 100644
index 00000000000..e1bbd5b338c
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_desc.test
@@ -0,0 +1,41 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+SET NAMES UTF8;
+
+CREATE TABLE ids (
+ id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+ value INT(10),
+ INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+
+SELECT id, value FROM ids WHERE value > 10 ORDER BY value DESC LIMIT 3;
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_asc.test
new file mode 100644
index 00000000000..680a4d624a7
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_asc.test
@@ -0,0 +1,41 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+SET NAMES UTF8;
+
+CREATE TABLE ids (
+ id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+ value INT(10),
+ INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+
+SELECT id, value FROM ids WHERE value >= 30 ORDER BY value ASC LIMIT 3;
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_desc.test
new file mode 100644
index 00000000000..25260c48c4b
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_desc.test
@@ -0,0 +1,41 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+SET NAMES UTF8;
+
+CREATE TABLE ids (
+ id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+ value INT(10),
+ INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+
+SELECT id, value FROM ids WHERE value >= 30 ORDER BY value DESC LIMIT 3;
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_asc.test
new file mode 100644
index 00000000000..6c183ddec21
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_asc.test
@@ -0,0 +1,41 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+SET NAMES UTF8;
+
+CREATE TABLE ids (
+ id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+ value INT(10),
+ INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+
+SELECT id, value FROM ids WHERE value < 90 ORDER BY value ASC LIMIT 3;
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_desc.test
new file mode 100644
index 00000000000..aa1ba7602ee
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_desc.test
@@ -0,0 +1,41 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+SET NAMES UTF8;
+
+CREATE TABLE ids (
+ id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+ value INT(10),
+ INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+
+SELECT id, value FROM ids WHERE value < 90 ORDER BY value DESC LIMIT 3;
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_asc.test
new file mode 100644
index 00000000000..e083afdf4f5
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_asc.test
@@ -0,0 +1,41 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+SET NAMES UTF8;
+
+CREATE TABLE ids (
+ id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+ value INT(10),
+ INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+
+SELECT id, value FROM ids WHERE value <= 70 ORDER BY value ASC LIMIT 3;
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_desc.test
new file mode 100644
index 00000000000..155a51506a9
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_desc.test
@@ -0,0 +1,41 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+SET NAMES UTF8;
+
+CREATE TABLE ids (
+ id INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
+ value INT(10),
+ INDEX (value)
+) ENGINE=Mroonga DEFAULT CHARSET=utf8;
+
+INSERT INTO ids VALUES(1, 50);
+INSERT INTO ids VALUES(2, 70);
+INSERT INTO ids VALUES(3, 30);
+INSERT INTO ids VALUES(4, 90);
+INSERT INTO ids VALUES(5, 10);
+
+SELECT id, value FROM ids WHERE value <= 70 ORDER BY value DESC LIMIT 3;
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_asc.test
index a622dfbf70d..a622dfbf70d 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_asc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_asc.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_desc.test
index 63dc820ccfd..63dc820ccfd 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_desc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_desc.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_or_equal_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_asc.test
index a51e6c5da47..a51e6c5da47 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_or_equal_asc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_asc.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_or_equal_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_desc.test
index ea5c150bf0f..ea5c150bf0f 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_greater_than_or_equal_desc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_desc.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_asc.test
index 12761c0f4d8..12761c0f4d8 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_asc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_asc.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_desc.test
index a4f4a781ead..a4f4a781ead 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_desc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_desc.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_or_equal_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_asc.test
index 2fba0d13f5f..2fba0d13f5f 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_or_equal_asc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_asc.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_or_equal_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_desc.test
index e4661fc7047..e4661fc7047 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_less_than_or_equal_desc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_desc.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_search_after_duplicated.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_search_after_duplicated.test
new file mode 100644
index 00000000000..533422ec087
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_search_after_duplicated.test
@@ -0,0 +1,40 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS users;
+--enable_warnings
+
+CREATE TABLE users (
+ id int PRIMARY KEY,
+ name varchar(100) NOT NULL,
+ UNIQUE KEY (name)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO users VALUES (1, "Alice");
+
+INSERT INTO users VALUES (2, "Bob");
+-- error ER_DUP_ENTRY
+INSERT INTO users VALUES (3, "Bob");
+
+SELECT * FROM users;
+SELECT * FROM users WHERE name = "Bob";
+
+DROP TABLE users;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_unique_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_unique_key.test
index 782b7bee9ca..350440515c1 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_unique_key.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_unique_key.test
@@ -29,11 +29,14 @@ CREATE TABLE diaries (
SHOW CREATE TABLE diaries;
INSERT INTO diaries (day, title)
- VALUES ("2012-02-14", "clear day")
- ON DUPLICATE KEY UPDATE title = "clear day (duplicated)";
+ VALUES ("2012-02-14", "clear day1")
+ ON DUPLICATE KEY UPDATE title = "clear day1 (duplicated)";
INSERT INTO diaries (day, title)
- VALUES ("2012-02-14", "rainy day")
- ON DUPLICATE KEY UPDATE title = "rainy day (duplicated)";
+ VALUES ("2012-02-14", "clear day2")
+ ON DUPLICATE KEY UPDATE title = "clear day2 (duplicated)";
+INSERT INTO diaries (day, title)
+ VALUES ("2012-02-14", "clear day3")
+ ON DUPLICATE KEY UPDATE title = "clear day3 (duplicated)";
INSERT INTO diaries (day, title)
VALUES ("2012-02-15", "cloudy day")
ON DUPLICATE KEY UPDATE title = "cloudy day (duplicated)";
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_TODO_SPLIT_ME.test
index 669868c6c7f..669868c6c7f 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_TODO_SPLIT_ME.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_TODO_SPLIT_ME.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_after_insert_multithread.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test
index bca2311ffbc..bca2311ffbc 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_after_insert_multithread.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_after_insert_single_thread.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test
index fa960be850f..fa960be850f 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_after_insert_single_thread.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_disabled.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test
index e94702e8159..e94702e8159 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_disabled.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_index_view.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_view.test
index 11457b1e05a..11457b1e05a 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_skip_count_index_view.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_view.test
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_duplicated_order_by_columns.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_duplicated_order_by_columns.test
new file mode 100644
index 00000000000..832c1c5cb27
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_duplicated_order_by_columns.test
@@ -0,0 +1,45 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+# Copyright(C) 2015 GMO Media, Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+FLUSH STATUS;
+
+SET NAMES utf8mb4;
+
+CREATE TABLE ids (
+ id int PRIMARY KEY,
+ text varchar(32),
+ FULLTEXT INDEX (text)
+) DEFAULT CHARSET=utf8mb4;
+
+INSERT INTO ids VALUES (1, 'first');
+
+SELECT * FROM ids
+ WHERE MATCH(text) AGAINST('+first' IN BOOLEAN MODE)
+ ORDER BY id, id
+ LIMIT 1;
+
+SHOW STATUS LIKE 'mroonga_fast_order_limit';
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/partition_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/partition_insert.test
new file mode 100644
index 00000000000..fdd45ecc3a3
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/partition_insert.test
@@ -0,0 +1,51 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/skip_mariadb_100_or_later.inc
+--source include/have_partition.inc
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS logs;
+--enable_warnings
+
+SET NAMES UTF8;
+CREATE TABLE logs (
+ timestamp DATETIME,
+ message TEXT
+) DEFAULT CHARSET=UTF8
+ PARTITION BY RANGE (TO_DAYS(timestamp)) (
+ PARTITION p201501 VALUES LESS THAN (TO_DAYS('2015-02-01')),
+ PARTITION p201502 VALUES LESS THAN (TO_DAYS('2015-03-01')),
+ PARTITION p201503 VALUES LESS THAN (TO_DAYS('2015-04-01')),
+ PARTITION pfuture VALUES LESS THAN MAXVALUE
+);
+SHOW CREATE TABLE logs;
+
+INSERT INTO logs VALUES('2015-01-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-01-31 23:59:59', 'Shutdown');
+INSERT INTO logs VALUES('2015-02-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-02-28 23:59:59', 'Shutdown');
+INSERT INTO logs VALUES('2015-03-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-03-31 23:59:59', 'Shutdown');
+INSERT INTO logs VALUES('2015-04-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-04-30 23:59:59', 'Shutdown');
+
+SELECT * FROM logs ORDER BY timestamp;
+
+DROP TABLE logs;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/partition_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/partition_update.test
new file mode 100644
index 00000000000..8ec55268b38
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/partition_update.test
@@ -0,0 +1,53 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/skip_mariadb_100_or_later.inc
+--source include/have_partition.inc
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS logs;
+--enable_warnings
+
+SET NAMES UTF8;
+CREATE TABLE logs (
+ timestamp DATETIME,
+ message TEXT
+) DEFAULT CHARSET=UTF8
+ PARTITION BY RANGE (TO_DAYS(timestamp)) (
+ PARTITION p201501 VALUES LESS THAN (TO_DAYS('2015-02-01')),
+ PARTITION p201502 VALUES LESS THAN (TO_DAYS('2015-03-01')),
+ PARTITION p201503 VALUES LESS THAN (TO_DAYS('2015-04-01')),
+ PARTITION pfuture VALUES LESS THAN MAXVALUE
+);
+SHOW CREATE TABLE logs;
+
+INSERT INTO logs VALUES('2015-01-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-02-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-03-01 00:00:00', 'Start');
+INSERT INTO logs VALUES('2015-04-01 00:00:00', 'Start');
+
+SELECT * FROM logs ORDER BY timestamp;
+
+UPDATE logs
+ SET message = 'Started'
+ WHERE timestamp < '2015-03-01 00:00:00';
+
+SELECT * FROM logs ORDER BY timestamp;
+
+DROP TABLE logs;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/repair_table_no_index_file.test b/storage/mroonga/mysql-test/mroonga/storage/t/repair_table_no_index_file.test
new file mode 100644
index 00000000000..bdbcfefcd85
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/repair_table_no_index_file.test
@@ -0,0 +1,57 @@
+# Copyright(C) 2014 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/have_mroonga_helper.inc
+
+CREATE DATABASE repair_test;
+USE repair_test;
+
+CREATE TABLE diaries (
+ id INT PRIMARY KEY AUTO_INCREMENT,
+ title TEXT,
+ body TEXT,
+ FULLTEXT INDEX body_index (body)
+) DEFAULT CHARSET UTF8;
+SHOW CREATE TABLE diaries;
+
+INSERT INTO diaries (title, body) VALUES ("survey", "will start Groonga!");
+INSERT INTO diaries (title, body) VALUES ("Groonga (1)", "starting Groonga...");
+INSERT INTO diaries (title, body) VALUES ("Groonga (2)", "started Groonga.");
+
+SELECT * FROM diaries WHERE MATCH(body) AGAINST("+starting" IN BOOLEAN MODE);
+
+--remove_file $MYSQLD_DATADIR/repair_test.mrn.000010A.c
+
+FLUSH TABLES;
+
+# Error ER_CANT_OPEN_FILE syscall error 'repair_test.mrn.000010A.c' (No such file or directory)
+--error ER_CANT_OPEN_FILE
+SELECT * FROM diaries WHERE MATCH(body) AGAINST("+starting" IN BOOLEAN MODE);
+
+REPAIR TABLE diaries;
+
+SELECT * FROM diaries;
+
+SELECT * FROM diaries WHERE MATCH(body) AGAINST("+starting" IN BOOLEAN MODE);
+
+DROP TABLE diaries;
+
+DROP DATABASE repair_test;
+USE test;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test
index 5f160af239f..65144ecc9e3 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test
@@ -14,6 +14,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
@@ -26,13 +28,13 @@ CREATE TABLE geo_replace (
PRIMARY KEY(id)
) DEFAULT CHARSET=utf8;
INSERT INTO geo_replace VALUES(1, POINT(100,100));
-SELECT id, ASTEXT(geo) FROM geo_replace;
+SELECT id, ST_AsText(geo) FROM geo_replace;
REPLACE INTO geo_replace VALUES(1, POINT(100,200));
-SELECT id, ASTEXT(geo) FROM geo_replace;
+SELECT id, ST_AsText(geo) FROM geo_replace;
INSERT INTO geo_replace VALUES(1, POINT(200,200)) ON DUPLICATE KEY UPDATE geo = POINT(200,200);
-SELECT id, ASTEXT(geo) FROM geo_replace;
+SELECT id, ST_AsText(geo) FROM geo_replace;
UPDATE geo_replace SET geo = POINT(200,300);
-SELECT id, ASTEXT(geo) FROM geo_replace;
+SELECT id, ST_AsText(geo) FROM geo_replace;
DROP TABLE geo_replace;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_without_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_without_key.test
new file mode 100644
index 00000000000..a38c4953e67
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_without_key.test
@@ -0,0 +1,35 @@
+# Copyright(C) 2014 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS diaries;
+--enable_warnings
+
+SET NAMES utf8;
+CREATE TABLE diaries (
+ id varchar(32) NOT NULL PRIMARY KEY,
+ content text,
+ FULLTEXT INDEX (content)
+) DEFAULT CHARSET=utf8;
+
+-- error ER_ERROR_ON_WRITE
+REPLACE INTO diaries(content) VALUES("Hello");
+
+DROP TABLE diaries;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_column.test
new file mode 100644
index 00000000000..b2cdf053bdb
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_column.test
@@ -0,0 +1,46 @@
+# Copyright(C) 2014 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released.
+--source ../../include/mroonga/have_mysql.inc
+
+--source ../../include/mroonga/have_mroonga.inc
+
+SET @mroonga_boolean_mode_syntax_flags_backup =
+ @@mroonga_boolean_mode_syntax_flags;
+
+SET mroonga_boolean_mode_syntax_flags = "SYNTAX_QUERY,ALLOW_COLUMN";
+
+SET NAMES UTF8;
+
+CREATE TABLE diaries (
+ title TEXT,
+ content TEXT,
+ FULLTEXT KEY (title),
+ FULLTEXT KEY (content)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO diaries VALUES("Groonga", "Hello Groonga");
+
+SELECT * FROM diaries
+ WHERE MATCH(title) AGAINST("content:@Hello" IN BOOLEAN MODE);
+
+DROP TABLE diaries;
+
+SET mroonga_boolean_mode_syntax_flags =
+ @mroonga_boolean_mode_syntax_flags_backup;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_leading_not.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_leading_not.test
new file mode 100644
index 00000000000..08afc2cb39e
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_leading_not.test
@@ -0,0 +1,44 @@
+# Copyright(C) 2014 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released.
+--source ../../include/mroonga/have_mysql.inc
+
+--source ../../include/mroonga/have_mroonga.inc
+
+SET @mroonga_boolean_mode_syntax_flags_backup =
+ @@mroonga_boolean_mode_syntax_flags;
+
+SET mroonga_boolean_mode_syntax_flags = "SYNTAX_QUERY,ALLOW_LEADING_NOT";
+
+SET NAMES UTF8;
+
+CREATE TABLE diaries (
+ title TEXT,
+ FULLTEXT KEY (title)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO diaries VALUES("Groonga");
+INSERT INTO diaries VALUES("Mroonga");
+
+SELECT * FROM diaries WHERE MATCH(title) AGAINST("-Groonga" IN BOOLEAN MODE);
+
+DROP TABLE diaries;
+
+SET mroonga_boolean_mode_syntax_flags =
+ @mroonga_boolean_mode_syntax_flags_backup;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_update.test
new file mode 100644
index 00000000000..4987dbe2b7a
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_update.test
@@ -0,0 +1,46 @@
+# Copyright(C) 2014 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released.
+--source ../../include/mroonga/have_mysql.inc
+
+--source ../../include/mroonga/have_mroonga.inc
+
+SET @mroonga_boolean_mode_syntax_flags_backup =
+ @@mroonga_boolean_mode_syntax_flags;
+
+SET mroonga_boolean_mode_syntax_flags = "SYNTAX_QUERY,ALLOW_COLUMN,ALLOW_UPDATE";
+
+SET NAMES UTF8;
+
+CREATE TABLE diaries (
+ title TEXT,
+ content TEXT,
+ FULLTEXT KEY (title),
+ FULLTEXT KEY (content)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO diaries VALUES("Groonga", "Hello Groonga");
+
+SELECT * FROM diaries
+ WHERE MATCH(title) AGAINST('content:="Hello Mroonga"' IN BOOLEAN MODE);
+
+DROP TABLE diaries;
+
+SET mroonga_boolean_mode_syntax_flags =
+ @mroonga_boolean_mode_syntax_flags_backup;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_query.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_query.test
new file mode 100644
index 00000000000..84cac40b16a
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_query.test
@@ -0,0 +1,43 @@
+# Copyright(C) 2014 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released.
+--source ../../include/mroonga/have_mysql.inc
+
+--source ../../include/mroonga/have_mroonga.inc
+
+SET @mroonga_boolean_mode_syntax_flags_backup =
+ @@mroonga_boolean_mode_syntax_flags;
+
+SET mroonga_boolean_mode_syntax_flags = "SYNTAX_QUERY";
+
+SET NAMES UTF8;
+
+CREATE TABLE diaries (
+ title TEXT,
+ FULLTEXT KEY (title)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO diaries VALUES("Re:Mroonga");
+
+SELECT * FROM diaries WHERE MATCH(title) AGAINST("Re:Mroonga" IN BOOLEAN MODE);
+
+DROP TABLE diaries;
+
+SET mroonga_boolean_mode_syntax_flags =
+ @mroonga_boolean_mode_syntax_flags_backup;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_script.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_script.test
new file mode 100644
index 00000000000..dea8212bda1
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_script.test
@@ -0,0 +1,44 @@
+# Copyright(C) 2014 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released.
+--source ../../include/mroonga/have_mysql.inc
+
+--source ../../include/mroonga/have_mroonga.inc
+
+SET @mroonga_boolean_mode_syntax_flags_backup =
+ @@mroonga_boolean_mode_syntax_flags;
+
+SET mroonga_boolean_mode_syntax_flags = "SYNTAX_SCRIPT";
+
+SET NAMES UTF8;
+
+CREATE TABLE diaries (
+ title TEXT,
+ FULLTEXT KEY (title)
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO diaries VALUES("Re:Mroonga");
+
+SELECT * FROM diaries
+ WHERE MATCH(title) AGAINST("title @ 'Re:Mroonga'" IN BOOLEAN MODE);
+
+DROP TABLE diaries;
+
+SET mroonga_boolean_mode_syntax_flags =
+ @mroonga_boolean_mode_syntax_flags_backup;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_database_path_prefix.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_database_path_prefix.test
index c7b2094906b..7a0c70a53b7 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_database_path_prefix.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_database_path_prefix.test
@@ -1,4 +1,4 @@
-# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
+# Copyright(C) 2012-2015 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -35,8 +35,10 @@ SELECT * FROM counts;
DROP TABLE counts;
DROP DATABASE clean_test;
+SET GLOBAL mroonga_database_path_prefix = NULL;
+
USE test;
-SET GLOBAL mroonga_database_path_prefix = NULL;
+--rmdir $MYSQLD_DATADIR/test/mroonga.data
--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.result b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.result
new file mode 100644
index 00000000000..0181fe02d84
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.result
@@ -0,0 +1,20 @@
+DROP TABLE IF EXISTS ids;
+CREATE TABLE ids (
+id INT PRIMARY KEY AUTO_INCREMENT
+) DEFAULT CHARSET=UTF8;
+INSERT INTO ids VALUES (1);
+INSERT INTO ids VALUES (2);
+INSERT INTO ids VALUES (3);
+INSERT INTO ids VALUES (4);
+INSERT INTO ids VALUES (5);
+INSERT INTO ids VALUES (6);
+INSERT INTO ids VALUES (7);
+INSERT INTO ids VALUES (8);
+INSERT INTO ids VALUES (9);
+INSERT INTO ids VALUES (10);
+SET GLOBAL mroonga_max_n_records_for_estimate = 1;
+EXPLAIN SELECT * FROM ids WHERE id > 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE ids range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
+SET GLOBAL mroonga_max_n_records_for_estimate = DEFAULT;
+DROP TABLE ids;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.test
new file mode 100644
index 00000000000..264bf95fd22
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.test
@@ -0,0 +1,55 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+CREATE TABLE ids (
+ id INT PRIMARY KEY AUTO_INCREMENT
+) DEFAULT CHARSET=UTF8;
+
+INSERT INTO ids VALUES (1);
+INSERT INTO ids VALUES (2);
+INSERT INTO ids VALUES (3);
+INSERT INTO ids VALUES (4);
+INSERT INTO ids VALUES (5);
+INSERT INTO ids VALUES (6);
+INSERT INTO ids VALUES (7);
+INSERT INTO ids VALUES (8);
+INSERT INTO ids VALUES (9);
+INSERT INTO ids VALUES (10);
+
+
+SET GLOBAL mroonga_max_n_records_for_estimate = 1;
+
+CONNECT (new_connection, localhost, root, ,);
+CONNECTION new_connection;
+
+EXPLAIN SELECT * FROM ids WHERE id > 5;
+
+CONNECTION default;
+DISCONNECT new_connection;
+
+SET GLOBAL mroonga_max_n_records_for_estimate = DEFAULT;
+
+
+DROP TABLE ids;
+
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_session.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_session.test
new file mode 100644
index 00000000000..3abc3c532d3
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_session.test
@@ -0,0 +1,46 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS ids;
+--enable_warnings
+
+CREATE TABLE ids (
+ id INT PRIMARY KEY AUTO_INCREMENT
+) DEFAULT CHARSET=UTF8;
+
+INSERT INTO ids VALUES (1);
+INSERT INTO ids VALUES (2);
+INSERT INTO ids VALUES (3);
+INSERT INTO ids VALUES (4);
+INSERT INTO ids VALUES (5);
+INSERT INTO ids VALUES (6);
+INSERT INTO ids VALUES (7);
+INSERT INTO ids VALUES (8);
+INSERT INTO ids VALUES (9);
+INSERT INTO ids VALUES (10);
+
+SET mroonga_max_n_records_for_estimate = 1;
+
+EXPLAIN SELECT * FROM ids WHERE id > 5;
+
+SET mroonga_max_n_records_for_estimate = DEFAULT;
+
+DROP TABLE ids;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_spatial.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_spatial.result
index fc38afc72d8..0e2f4c3bcca 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_spatial.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_spatial.result
@@ -6,115 +6,115 @@ location GEOMETRY NOT NULL
) COMMENT = 'ENGINE "InnoDB"';
INSERT INTO shops (name, location)
VALUES ('nezu-no-taiyaki',
-GeomFromText('POINT(139.762573 35.720253)'));
+ST_GeomFromText('POINT(139.762573 35.720253)'));
INSERT INTO shops (name, location)
VALUES ('taiyaki-kataoka',
-GeomFromText('POINT(139.715591 35.712521)'));
+ST_GeomFromText('POINT(139.715591 35.712521)'));
INSERT INTO shops (name, location)
VALUES ('soba-taiyaki-ku',
-GeomFromText('POINT(139.659088 35.683712)'));
+ST_GeomFromText('POINT(139.659088 35.683712)'));
INSERT INTO shops (name, location)
VALUES ('kuruma',
-GeomFromText('POINT(139.706207 35.721516)'));
+ST_GeomFromText('POINT(139.706207 35.721516)'));
INSERT INTO shops (name, location)
VALUES ('hirose-ya',
-GeomFromText('POINT(139.685608 35.714844)'));
+ST_GeomFromText('POINT(139.685608 35.714844)'));
INSERT INTO shops (name, location)
VALUES ('sazare',
-GeomFromText('POINT(139.685043 35.714653)'));
+ST_GeomFromText('POINT(139.685043 35.714653)'));
INSERT INTO shops (name, location)
VALUES ('omede-taiyaki',
-GeomFromText('POINT(139.817154 35.700516)'));
+ST_GeomFromText('POINT(139.817154 35.700516)'));
INSERT INTO shops (name, location)
VALUES ('onaga-ya',
-GeomFromText('POINT(139.81105 35.698254)'));
+ST_GeomFromText('POINT(139.81105 35.698254)'));
INSERT INTO shops (name, location)
VALUES ('shiro-ya',
-GeomFromText('POINT(139.638611 35.705517)'));
+ST_GeomFromText('POINT(139.638611 35.705517)'));
INSERT INTO shops (name, location)
VALUES ('fuji-ya',
-GeomFromText('POINT(139.637115 35.703938)'));
+ST_GeomFromText('POINT(139.637115 35.703938)'));
INSERT INTO shops (name, location)
VALUES ('miyoshi',
-GeomFromText('POINT(139.537323 35.644539)'));
+ST_GeomFromText('POINT(139.537323 35.644539)'));
INSERT INTO shops (name, location)
VALUES ('juju-ya',
-GeomFromText('POINT(139.695755 35.628922)'));
+ST_GeomFromText('POINT(139.695755 35.628922)'));
INSERT INTO shops (name, location)
VALUES ('tatsumi-ya',
-GeomFromText('POINT(139.638657 35.665501)'));
+ST_GeomFromText('POINT(139.638657 35.665501)'));
INSERT INTO shops (name, location)
VALUES ('tetsuji',
-GeomFromText('POINT(139.76857 35.680912)'));
+ST_GeomFromText('POINT(139.76857 35.680912)'));
INSERT INTO shops (name, location)
VALUES ('gazuma-ya',
-GeomFromText('POINT(139.647598 35.700817)'));
+ST_GeomFromText('POINT(139.647598 35.700817)'));
INSERT INTO shops (name, location)
VALUES ('honma-mon',
-GeomFromText('POINT(139.652573 35.722736)'));
+ST_GeomFromText('POINT(139.652573 35.722736)'));
INSERT INTO shops (name, location)
VALUES ('naniwa-ya',
-GeomFromText('POINT(139.796234 35.730061)'));
+ST_GeomFromText('POINT(139.796234 35.730061)'));
INSERT INTO shops (name, location)
VALUES ('kuro-dai',
-GeomFromText('POINT(139.704834 35.650345)'));
+ST_GeomFromText('POINT(139.704834 35.650345)'));
INSERT INTO shops (name, location)
VALUES ('daruma',
-GeomFromText('POINT(139.770599 35.681461)'));
+ST_GeomFromText('POINT(139.770599 35.681461)'));
INSERT INTO shops (name, location)
VALUES ('yanagi-ya',
-GeomFromText('POINT(139.783981 35.685341)'));
+ST_GeomFromText('POINT(139.783981 35.685341)'));
INSERT INTO shops (name, location)
VALUES ('sharaku',
-GeomFromText('POINT(139.794846 35.716969)'));
+ST_GeomFromText('POINT(139.794846 35.716969)'));
INSERT INTO shops (name, location)
VALUES ('takane',
-GeomFromText('POINT(139.560913 35.698601)'));
+ST_GeomFromText('POINT(139.560913 35.698601)'));
INSERT INTO shops (name, location)
VALUES ('chiyoda',
-GeomFromText('POINT(139.652817 35.642601)'));
+ST_GeomFromText('POINT(139.652817 35.642601)'));
INSERT INTO shops (name, location)
VALUES ('da-ka-po',
-GeomFromText('POINT(139.727356 35.627346)'));
+ST_GeomFromText('POINT(139.727356 35.627346)'));
INSERT INTO shops (name, location)
VALUES ('matsushima-ya',
-GeomFromText('POINT(139.737381 35.640556)'));
+ST_GeomFromText('POINT(139.737381 35.640556)'));
INSERT INTO shops (name, location)
VALUES ('kazuya',
-GeomFromText('POINT(139.760895 35.673508)'));
+ST_GeomFromText('POINT(139.760895 35.673508)'));
INSERT INTO shops (name, location)
VALUES ('furuya-kogane-an',
-GeomFromText('POINT(139.676071 35.680603)'));
+ST_GeomFromText('POINT(139.676071 35.680603)'));
INSERT INTO shops (name, location)
VALUES ('hachi-no-ie',
-GeomFromText('POINT(139.668106 35.608021)'));
+ST_GeomFromText('POINT(139.668106 35.608021)'));
INSERT INTO shops (name, location)
VALUES ('azuki-chan',
-GeomFromText('POINT(139.673203 35.64151)'));
+ST_GeomFromText('POINT(139.673203 35.64151)'));
INSERT INTO shops (name, location)
VALUES ('kuriko-an',
-GeomFromText('POINT(139.796829 35.712013)'));
+ST_GeomFromText('POINT(139.796829 35.712013)'));
INSERT INTO shops (name, location)
VALUES ('yume-no-aru-machi-no-taiyaki-ya-san',
-GeomFromText('POINT(139.712524 35.616199)'));
+ST_GeomFromText('POINT(139.712524 35.616199)'));
INSERT INTO shops (name, location)
VALUES ('naze-ya',
-GeomFromText('POINT(139.665833 35.609039)'));
+ST_GeomFromText('POINT(139.665833 35.609039)'));
INSERT INTO shops (name, location)
VALUES ('sanoki-ya',
-GeomFromText('POINT(139.770721 35.66592)'));
+ST_GeomFromText('POINT(139.770721 35.66592)'));
INSERT INTO shops (name, location)
VALUES ('shigeta',
-GeomFromText('POINT(139.780273 35.672626)'));
+ST_GeomFromText('POINT(139.780273 35.672626)'));
INSERT INTO shops (name, location)
VALUES ('nishimi-ya',
-GeomFromText('POINT(139.774628 35.671825)'));
+ST_GeomFromText('POINT(139.774628 35.671825)'));
INSERT INTO shops (name, location)
VALUES ('hiiragi',
-GeomFromText('POINT(139.711517 35.647701)'));
+ST_GeomFromText('POINT(139.711517 35.647701)'));
ALTER TABLE shops ADD SPATIAL KEY location_index (location);
-SELECT id, name, AsText(location) AS location_text FROM shops
-WHERE MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location);
+SELECT id, name, ST_AsText(location) AS location_text FROM shops
+WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location);
id name location_text
14 tetsuji POINT(139.76857 35.680912)
19 daruma POINT(139.770599 35.681461)
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_with_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_with_index.result
index 6b29be5edb7..a6d2f7862af 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_with_index.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_with_index.result
@@ -1,5 +1,3 @@
-DROP TABLE IF EXISTS diaries_innodb;
-DROP TABLE IF EXISTS diaries_mroonga;
CREATE TABLE diaries_innodb (
id INT PRIMARY KEY AUTO_INCREMENT,
body TEXT,
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_none.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_none.result
new file mode 100644
index 00000000000..08bdd72ee03
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_none.result
@@ -0,0 +1,9 @@
+SET NAMES utf8;
+CREATE TABLE memos (
+content VARCHAR(64) NOT NULL PRIMARY KEY,
+FULLTEXT INDEX (content) COMMENT 'index_flags "NONE"'
+) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8;
+SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
+mroonga_command("dump --dump_plugins no --dump_schema no")
+column_create memos-content index COLUMN_INDEX memos
+DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_with_position_and_with_weight.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_with_position_and_with_weight.result
new file mode 100644
index 00000000000..a5ac716d38e
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_with_position_and_with_weight.result
@@ -0,0 +1,9 @@
+SET NAMES utf8;
+CREATE TABLE memos (
+content VARCHAR(64) NOT NULL PRIMARY KEY,
+FULLTEXT INDEX (content) COMMENT 'index_flags "WITH_POSITION|WITH_WEIGHT"'
+) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8;
+SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
+mroonga_command("dump --dump_plugins no --dump_schema no")
+column_create memos-content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos
+DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_comment_multiple_token_filters.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_comment_multiple_token_filters.result
index 0c0af7a9db2..68319844df8 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_comment_multiple_token_filters.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_comment_multiple_token_filters.result
@@ -7,9 +7,11 @@ id INT NOT NULL PRIMARY KEY,
content VARCHAR(64) NOT NULL,
FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord,TokenFilterStopWord"'
) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create memos TABLE_HASH_KEY ShortText
+
table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord
+
column_create memos-content index COLUMN_INDEX|WITH_POSITION memos
DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_comment_one_token_filter.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_comment_one_token_filter.result
index aef34c0bc26..fa3012705ad 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_comment_one_token_filter.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_comment_one_token_filter.result
@@ -7,9 +7,11 @@ id INT NOT NULL PRIMARY KEY,
content VARCHAR(64) NOT NULL,
FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord"'
) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
-mroonga_command("dump")
+SELECT mroonga_command("dump --dump_plugins no");
+mroonga_command("dump --dump_plugins no")
table_create memos TABLE_HASH_KEY ShortText
+
table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord
+
column_create memos-content index COLUMN_INDEX|WITH_POSITION memos
DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_grn_id.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_grn_id.result
deleted file mode 100644
index 9edbd3c9b3b..00000000000
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/function_last_insert_grn_id.result
+++ /dev/null
@@ -1,17 +0,0 @@
-DROP TABLE IF EXISTS ids;
-DROP FUNCTION IF EXISTS last_insert_grn_id;
-CREATE TABLE ids (
-id int AUTO_INCREMENT PRIMARY KEY
-) COMMENT='ENGINE "InnoDB"';
-SELECT last_insert_grn_id();
-last_insert_grn_id()
-0
-INSERT INTO ids VALUES();
-SELECT last_insert_grn_id();
-last_insert_grn_id()
-0
-SELECT * FROM ids;
-id
-1
-DROP TABLE ids;
-DROP FUNCTION last_insert_grn_id;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result
index 29163384e6a..b3f5bee27d7 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result
@@ -16,113 +16,113 @@ shops CREATE TABLE `shops` (
) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"'
insert into shops (name, location)
values ('nezu-no-taiyaki',
-GeomFromText('POINT(139.762573 35.720253)'));
+ST_GeomFromText('POINT(139.762573 35.720253)'));
insert into shops (name, location)
values ('taiyaki-kataoka',
-GeomFromText('POINT(139.715591 35.712521)'));
+ST_GeomFromText('POINT(139.715591 35.712521)'));
insert into shops (name, location)
values ('soba-taiyaki-ku',
-GeomFromText('POINT(139.659088 35.683712)'));
+ST_GeomFromText('POINT(139.659088 35.683712)'));
insert into shops (name, location)
values ('kuruma',
-GeomFromText('POINT(139.706207 35.721516)'));
+ST_GeomFromText('POINT(139.706207 35.721516)'));
insert into shops (name, location)
values ('hirose-ya',
-GeomFromText('POINT(139.685608 35.714844)'));
+ST_GeomFromText('POINT(139.685608 35.714844)'));
insert into shops (name, location)
values ('sazare',
-GeomFromText('POINT(139.685043 35.714653)'));
+ST_GeomFromText('POINT(139.685043 35.714653)'));
insert into shops (name, location)
values ('omede-taiyaki',
-GeomFromText('POINT(139.817154 35.700516)'));
+ST_GeomFromText('POINT(139.817154 35.700516)'));
insert into shops (name, location)
values ('onaga-ya',
-GeomFromText('POINT(139.81105 35.698254)'));
+ST_GeomFromText('POINT(139.81105 35.698254)'));
insert into shops (name, location)
values ('shiro-ya',
-GeomFromText('POINT(139.638611 35.705517)'));
+ST_GeomFromText('POINT(139.638611 35.705517)'));
insert into shops (name, location)
values ('fuji-ya',
-GeomFromText('POINT(139.637115 35.703938)'));
+ST_GeomFromText('POINT(139.637115 35.703938)'));
insert into shops (name, location)
values ('miyoshi',
-GeomFromText('POINT(139.537323 35.644539)'));
+ST_GeomFromText('POINT(139.537323 35.644539)'));
insert into shops (name, location)
values ('juju-ya',
-GeomFromText('POINT(139.695755 35.628922)'));
+ST_GeomFromText('POINT(139.695755 35.628922)'));
insert into shops (name, location)
values ('tatsumi-ya',
-GeomFromText('POINT(139.638657 35.665501)'));
+ST_GeomFromText('POINT(139.638657 35.665501)'));
insert into shops (name, location)
values ('tetsuji',
-GeomFromText('POINT(139.76857 35.680912)'));
+ST_GeomFromText('POINT(139.76857 35.680912)'));
insert into shops (name, location)
values ('gazuma-ya',
-GeomFromText('POINT(139.647598 35.700817)'));
+ST_GeomFromText('POINT(139.647598 35.700817)'));
insert into shops (name, location)
values ('honma-mon',
-GeomFromText('POINT(139.652573 35.722736)'));
+ST_GeomFromText('POINT(139.652573 35.722736)'));
insert into shops (name, location)
values ('naniwa-ya',
-GeomFromText('POINT(139.796234 35.730061)'));
+ST_GeomFromText('POINT(139.796234 35.730061)'));
insert into shops (name, location)
values ('kuro-dai',
-GeomFromText('POINT(139.704834 35.650345)'));
+ST_GeomFromText('POINT(139.704834 35.650345)'));
insert into shops (name, location)
values ('daruma',
-GeomFromText('POINT(139.770599 35.681461)'));
+ST_GeomFromText('POINT(139.770599 35.681461)'));
insert into shops (name, location)
values ('yanagi-ya',
-GeomFromText('POINT(139.783981 35.685341)'));
+ST_GeomFromText('POINT(139.783981 35.685341)'));
insert into shops (name, location)
values ('sharaku',
-GeomFromText('POINT(139.794846 35.716969)'));
+ST_GeomFromText('POINT(139.794846 35.716969)'));
insert into shops (name, location)
values ('takane',
-GeomFromText('POINT(139.560913 35.698601)'));
+ST_GeomFromText('POINT(139.560913 35.698601)'));
insert into shops (name, location)
values ('chiyoda',
-GeomFromText('POINT(139.652817 35.642601)'));
+ST_GeomFromText('POINT(139.652817 35.642601)'));
insert into shops (name, location)
values ('da-ka-po',
-GeomFromText('POINT(139.727356 35.627346)'));
+ST_GeomFromText('POINT(139.727356 35.627346)'));
insert into shops (name, location)
values ('matsushima-ya',
-GeomFromText('POINT(139.737381 35.640556)'));
+ST_GeomFromText('POINT(139.737381 35.640556)'));
insert into shops (name, location)
values ('kazuya',
-GeomFromText('POINT(139.760895 35.673508)'));
+ST_GeomFromText('POINT(139.760895 35.673508)'));
insert into shops (name, location)
values ('furuya-kogane-an',
-GeomFromText('POINT(139.676071 35.680603)'));
+ST_GeomFromText('POINT(139.676071 35.680603)'));
insert into shops (name, location)
values ('hachi-no-ie',
-GeomFromText('POINT(139.668106 35.608021)'));
+ST_GeomFromText('POINT(139.668106 35.608021)'));
insert into shops (name, location)
values ('azuki-chan',
-GeomFromText('POINT(139.673203 35.64151)'));
+ST_GeomFromText('POINT(139.673203 35.64151)'));
insert into shops (name, location)
values ('kuriko-an',
-GeomFromText('POINT(139.796829 35.712013)'));
+ST_GeomFromText('POINT(139.796829 35.712013)'));
insert into shops (name, location)
values ('yume-no-aru-machi-no-taiyaki-ya-san',
-GeomFromText('POINT(139.712524 35.616199)'));
+ST_GeomFromText('POINT(139.712524 35.616199)'));
insert into shops (name, location)
values ('naze-ya',
-GeomFromText('POINT(139.665833 35.609039)'));
+ST_GeomFromText('POINT(139.665833 35.609039)'));
insert into shops (name, location)
values ('sanoki-ya',
-GeomFromText('POINT(139.770721 35.66592)'));
+ST_GeomFromText('POINT(139.770721 35.66592)'));
insert into shops (name, location)
values ('shigeta',
-GeomFromText('POINT(139.780273 35.672626)'));
+ST_GeomFromText('POINT(139.780273 35.672626)'));
insert into shops (name, location)
values ('nishimi-ya',
-GeomFromText('POINT(139.774628 35.671825)'));
+ST_GeomFromText('POINT(139.774628 35.671825)'));
insert into shops (name, location)
values ('hiiragi',
-GeomFromText('POINT(139.711517 35.647701)'));
-select id, name, AsText(location) as location_text from shops;
+ST_GeomFromText('POINT(139.711517 35.647701)'));
+select id, name, ST_AsText(location) as location_text from shops;
id name location_text
1 nezu-no-taiyaki POINT(139.762573 35.720253)
2 taiyaki-kataoka POINT(139.715591 35.712521)
@@ -160,8 +160,8 @@ id name location_text
34 shigeta POINT(139.780273 35.672626)
35 nishimi-ya POINT(139.774628 35.671825)
36 hiiragi POINT(139.711517 35.647701)
-select id, name, AsText(location) as location_text from shops
-where MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location);
+select id, name, ST_AsText(location) as location_text from shops
+where MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location);
id name location_text
14 tetsuji POINT(139.76857 35.680912)
19 daruma POINT(139.770599 35.681461)
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result
index 53aa00ecbab..28b981f9c7b 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result
@@ -16,16 +16,16 @@ shops CREATE TABLE `shops` (
) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"'
insert into shops (name, location)
values ('sazare',
-GeomFromText('POINT(139.685043 35.714653)'));
-select id, name, AsText(location) as location_text from shops
-where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+ST_GeomFromText('POINT(139.685043 35.714653)'));
+select id, name, ST_AsText(location) as location_text from shops
+where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
id name location_text
1 sazare POINT(139.685043 35.714653)
delete from shops
-where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
-select id, name, AsText(location) as location_text from shops
-where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+select id, name, ST_AsText(location) as location_text from shops
+where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
id name location_text
-select id, name, AsText(location) as location_text from shops;
+select id, name, ST_AsText(location) as location_text from shops;
id name location_text
drop table shops;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result
index e982e0b95ce..20de4a32cfa 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result
@@ -16,21 +16,21 @@ shops CREATE TABLE `shops` (
) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"'
insert into shops (name, location)
values ('sazare',
-GeomFromText('POINT(139.685043 35.714653)'));
-select id, name, AsText(location) as location_text from shops
-where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+ST_GeomFromText('POINT(139.685043 35.714653)'));
+select id, name, ST_AsText(location) as location_text from shops
+where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
id name location_text
1 sazare POINT(139.685043 35.714653)
-select id, name, AsText(location) as location_text from shops
-where MBRContains(GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location);
+select id, name, ST_AsText(location) as location_text from shops
+where MBRContains(ST_GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location);
id name location_text
-update shops set location = GeomFromText('POINT(139.66116 35.57566)')
+update shops set location = ST_GeomFromText('POINT(139.66116 35.57566)')
where name = 'sazare';
-select id, name, AsText(location) as location_text from shops
-where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+select id, name, ST_AsText(location) as location_text from shops
+where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
id name location_text
-select id, name, AsText(location) as location_text from shops
-where MBRContains(GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location);
+select id, name, ST_AsText(location) as location_text from shops
+where MBRContains(ST_GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location);
id name location_text
1 sazare POINT(139.66116 35.57566)
drop table shops;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_TODO_SPLIT_ME.result
index 5f43aee6997..660700602b7 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_TODO_SPLIT_ME.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_TODO_SPLIT_ME.result
@@ -12,20 +12,6 @@ insert into t1 values(2,20,"ka ki ku ke ko");
insert into t1 values(3,30,"ii si ii se ii");
insert into t1 values(4,40,"ta ti tu te to");
insert into t1 values(5,50,"aa ii uu ii oo");
-select *, match(c3) against("ii") from t1
-where match(c3) against("ii") order by c1 desc limit 1;
-c1 c2 c3 match(c3) against("ii")
-5 50 aa ii uu ii oo 349526
-show status like 'mroonga_fast_order_limit';
-Variable_name Value
-Mroonga_fast_order_limit 0
-select *, match(c3) against("ii") from t1
-where match(c3) against("ii") order by c1 limit 1;
-c1 c2 c3 match(c3) against("ii")
-1 10 aa ii uu ee oo 174763
-show status like 'mroonga_fast_order_limit';
-Variable_name Value
-Mroonga_fast_order_limit 0
select c3, match(c3) against("ii") from t1
where match(c3) against("ii") order by match(c3) against("ii") desc;
c3 match(c3) against("ii")
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_no_direction.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_no_direction.result
new file mode 100644
index 00000000000..9dd3e6eaa1b
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_no_direction.result
@@ -0,0 +1,27 @@
+DROP TABLE IF EXISTS memos;
+FLUSH STATUS;
+CREATE TABLE memos (
+id int PRIMARY KEY,
+content TEXT,
+FULLTEXT INDEX (content)
+) COMMENT = 'engine "InnoDB"';
+INSERT INTO memos VALUES(1, "Groonga is fast");
+INSERT INTO memos VALUES(2, "Mroonga is fast");
+INSERT INTO memos VALUES(3, "Mroonga is easy");
+INSERT INTO memos VALUES(4, "Mroonga is useful");
+INSERT INTO memos VALUES(5, "Mroonga is great");
+SHOW STATUS LIKE 'mroonga_fast_order_limit';
+Variable_name Value
+Mroonga_fast_order_limit 0
+SELECT id, content
+FROM memos
+WHERE MATCH(content) AGAINST("+Mroonga" IN BOOLEAN MODE)
+ORDER BY id
+LIMIT 2;
+id content
+2 Mroonga is fast
+3 Mroonga is easy
+SHOW STATUS LIKE 'mroonga_fast_order_limit';
+Variable_name Value
+Mroonga_fast_order_limit 1
+DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_order_by_primary_key.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_order_by_primary_key.result
new file mode 100644
index 00000000000..eb5e04fcc0c
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/optimization_order_limit_order_by_primary_key.result
@@ -0,0 +1,27 @@
+DROP TABLE IF EXISTS memos;
+FLUSH STATUS;
+CREATE TABLE memos (
+id int PRIMARY KEY,
+content TEXT,
+FULLTEXT INDEX (content)
+) COMMENT = 'engine "InnoDB"';
+INSERT INTO memos VALUES(1, "Mroonga is fast");
+INSERT INTO memos VALUES(2, "Mroonga is easy");
+INSERT INTO memos VALUES(3, "Mroonga is useful");
+INSERT INTO memos VALUES(4, "Mroonga is great");
+INSERT INTO memos VALUES(5, "Groonga is fast");
+SHOW STATUS LIKE 'mroonga_fast_order_limit';
+Variable_name Value
+Mroonga_fast_order_limit 0
+SELECT id, content
+FROM memos
+WHERE MATCH(content) AGAINST("+Mroonga" IN BOOLEAN MODE)
+ORDER BY id DESC
+LIMIT 2;
+id content
+4 Mroonga is great
+3 Mroonga is useful
+SHOW STATUS LIKE 'mroonga_fast_order_limit';
+Variable_name Value
+Mroonga_fast_order_limit 1
+DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/version_55_performance_schema.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/performance_schema.result
index f6e3bbdca82..c9af869f20c 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/version_55_performance_schema.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/performance_schema.result
@@ -16,23 +16,7 @@ diaries CREATE TABLE `diaries` (
FULLTEXT KEY `content` (`content`)
) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'
INSERT INTO diaries (content) VALUES ("Tommorow will be shiny day!");
-SHOW TABLES FROM performance_schema;
-Tables_in_performance_schema
-cond_instances
-events_waits_current
-events_waits_history
-events_waits_history_long
-events_waits_summary_by_instance
-events_waits_summary_by_thread_by_event_name
-events_waits_summary_global_by_event_name
-file_instances
-file_summary_by_event_name
-file_summary_by_instance
-mutex_instances
-performance_timers
-rwlock_instances
-setup_consumers
-setup_instruments
-setup_timers
+SHOW TABLES FROM performance_schema LIKE 'threads';
+Tables_in_performance_schema (threads)
threads
DROP TABLE diaries;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_files.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_files.result
index 61c8e18b17d..e330fa18c89 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_files.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_files.result
@@ -1,7 +1,5 @@
-DROP DATABASE IF EXISTS repair_test;
CREATE DATABASE repair_test;
USE repair_test;
-DROP TABLE IF EXISTS diaries;
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_index_file.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_index_file.result
index 140b5a92b75..a5012384889 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_index_file.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_index_file.result
@@ -1,7 +1,5 @@
-DROP DATABASE IF EXISTS repair_test;
CREATE DATABASE repair_test;
USE repair_test;
-DROP TABLE IF EXISTS diaries;
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
@@ -25,7 +23,7 @@ id title body
2 groonga (1) starting groonga...
FLUSH TABLES;
SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting");
-ERROR HY000: syscall error 'repair_test.mrn.0000104' (No such file or directory)
+ERROR HY000: syscall error 'repair_test.mrn.0000106' (No such file or directory)
REPAIR TABLE diaries;
Table Op Msg_type Msg_text
repair_test.diaries repair status OK
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_global.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_global.result
index 0cf3d49c3c3..c98847cb50a 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_global.result
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_global.result
@@ -1,5 +1,4 @@
DROP TABLE IF EXISTS diaries;
-SET GLOBAL mroonga_match_escalation_threshold = -1;
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
@@ -17,17 +16,12 @@ diaries CREATE TABLE `diaries` (
) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'
INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install");
INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install");
-SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE);
-id title tags
-1 Hello groonga! groonga install
-2 Hello mroonga! mroonga install
-SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE);
-id title tags
-SET GLOBAL mroonga_match_escalation_threshold = 0;
SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE);
id title tags
-SET mroonga_match_escalation_threshold = 0;
+1 Hello groonga! groonga install
+SET GLOBAL mroonga_match_escalation_threshold = -1;
+USE test;
SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE);
id title tags
-1 Hello groonga! groonga install
+SET GLOBAL mroonga_match_escalation_threshold = DEFAULT;
DROP TABLE diaries;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/version_56_or_later_performance_schema.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/version_56_or_later_performance_schema.result
deleted file mode 100644
index 548dc32707f..00000000000
--- a/storage/mroonga/mysql-test/mroonga/wrapper/r/version_56_or_later_performance_schema.result
+++ /dev/null
@@ -1,73 +0,0 @@
-DROP TABLE IF EXISTS diaries;
-SHOW VARIABLES LIKE 'performance_schema';
-Variable_name Value
-performance_schema ON
-CREATE TABLE diaries (
-id INT PRIMARY KEY AUTO_INCREMENT,
-content VARCHAR(255),
-FULLTEXT INDEX (content)
-) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"';
-SHOW CREATE TABLE diaries;
-Table Create Table
-diaries CREATE TABLE `diaries` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `content` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`),
- FULLTEXT KEY `content` (`content`)
-) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'
-INSERT INTO diaries (content) VALUES ("Tommorow will be shiny day!");
-SHOW TABLES FROM performance_schema;
-Tables_in_performance_schema
-accounts
-cond_instances
-events_stages_current
-events_stages_history
-events_stages_history_long
-events_stages_summary_by_account_by_event_name
-events_stages_summary_by_host_by_event_name
-events_stages_summary_by_thread_by_event_name
-events_stages_summary_by_user_by_event_name
-events_stages_summary_global_by_event_name
-events_statements_current
-events_statements_history
-events_statements_history_long
-events_statements_summary_by_account_by_event_name
-events_statements_summary_by_digest
-events_statements_summary_by_host_by_event_name
-events_statements_summary_by_thread_by_event_name
-events_statements_summary_by_user_by_event_name
-events_statements_summary_global_by_event_name
-events_waits_current
-events_waits_history
-events_waits_history_long
-events_waits_summary_by_account_by_event_name
-events_waits_summary_by_host_by_event_name
-events_waits_summary_by_instance
-events_waits_summary_by_thread_by_event_name
-events_waits_summary_by_user_by_event_name
-events_waits_summary_global_by_event_name
-file_instances
-file_summary_by_event_name
-file_summary_by_instance
-host_cache
-hosts
-mutex_instances
-objects_summary_global_by_type
-performance_timers
-rwlock_instances
-session_account_connect_attrs
-session_connect_attrs
-setup_actors
-setup_consumers
-setup_instruments
-setup_objects
-setup_timers
-socket_instances
-socket_summary_by_event_name
-socket_summary_by_instance
-table_io_waits_summary_by_index_usage
-table_io_waits_summary_by_table
-table_lock_waits_summary_by_table
-threads
-users
-DROP TABLE diaries;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm b/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm
index 528ccc5d693..b6e2d741674 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm
@@ -4,6 +4,11 @@ package My::Suite::Mroonga;
return "No Mroonga engine" unless $ENV{HA_MROONGA_SO} or
$::mysqld_variables{'mroonga'} eq "ON";
+#
+# RECOMPILE_FOR_EMBEDDED also means that a plugin
+# cannot be dynamically loaded into embedded
+return "Not run for embedded server" if $::opt_embedded_server and
+ $ENV{HA_MROONGA_SO};
sub is_default { 1 }
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test
index 37ea8aaf149..6a62ae312b2 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test
@@ -17,6 +17,7 @@
--source include/have_innodb.inc
--source include/not_embedded.inc
--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
@@ -31,117 +32,117 @@ CREATE TABLE shops (
INSERT INTO shops (name, location)
VALUES ('nezu-no-taiyaki',
- GeomFromText('POINT(139.762573 35.720253)'));
+ ST_GeomFromText('POINT(139.762573 35.720253)'));
INSERT INTO shops (name, location)
VALUES ('taiyaki-kataoka',
- GeomFromText('POINT(139.715591 35.712521)'));
+ ST_GeomFromText('POINT(139.715591 35.712521)'));
INSERT INTO shops (name, location)
VALUES ('soba-taiyaki-ku',
- GeomFromText('POINT(139.659088 35.683712)'));
+ ST_GeomFromText('POINT(139.659088 35.683712)'));
INSERT INTO shops (name, location)
VALUES ('kuruma',
- GeomFromText('POINT(139.706207 35.721516)'));
+ ST_GeomFromText('POINT(139.706207 35.721516)'));
INSERT INTO shops (name, location)
VALUES ('hirose-ya',
- GeomFromText('POINT(139.685608 35.714844)'));
+ ST_GeomFromText('POINT(139.685608 35.714844)'));
INSERT INTO shops (name, location)
VALUES ('sazare',
- GeomFromText('POINT(139.685043 35.714653)'));
+ ST_GeomFromText('POINT(139.685043 35.714653)'));
INSERT INTO shops (name, location)
VALUES ('omede-taiyaki',
- GeomFromText('POINT(139.817154 35.700516)'));
+ ST_GeomFromText('POINT(139.817154 35.700516)'));
INSERT INTO shops (name, location)
VALUES ('onaga-ya',
- GeomFromText('POINT(139.81105 35.698254)'));
+ ST_GeomFromText('POINT(139.81105 35.698254)'));
INSERT INTO shops (name, location)
VALUES ('shiro-ya',
- GeomFromText('POINT(139.638611 35.705517)'));
+ ST_GeomFromText('POINT(139.638611 35.705517)'));
INSERT INTO shops (name, location)
VALUES ('fuji-ya',
- GeomFromText('POINT(139.637115 35.703938)'));
+ ST_GeomFromText('POINT(139.637115 35.703938)'));
INSERT INTO shops (name, location)
VALUES ('miyoshi',
- GeomFromText('POINT(139.537323 35.644539)'));
+ ST_GeomFromText('POINT(139.537323 35.644539)'));
INSERT INTO shops (name, location)
VALUES ('juju-ya',
- GeomFromText('POINT(139.695755 35.628922)'));
+ ST_GeomFromText('POINT(139.695755 35.628922)'));
INSERT INTO shops (name, location)
VALUES ('tatsumi-ya',
- GeomFromText('POINT(139.638657 35.665501)'));
+ ST_GeomFromText('POINT(139.638657 35.665501)'));
INSERT INTO shops (name, location)
VALUES ('tetsuji',
- GeomFromText('POINT(139.76857 35.680912)'));
+ ST_GeomFromText('POINT(139.76857 35.680912)'));
INSERT INTO shops (name, location)
VALUES ('gazuma-ya',
- GeomFromText('POINT(139.647598 35.700817)'));
+ ST_GeomFromText('POINT(139.647598 35.700817)'));
INSERT INTO shops (name, location)
VALUES ('honma-mon',
- GeomFromText('POINT(139.652573 35.722736)'));
+ ST_GeomFromText('POINT(139.652573 35.722736)'));
INSERT INTO shops (name, location)
VALUES ('naniwa-ya',
- GeomFromText('POINT(139.796234 35.730061)'));
+ ST_GeomFromText('POINT(139.796234 35.730061)'));
INSERT INTO shops (name, location)
VALUES ('kuro-dai',
- GeomFromText('POINT(139.704834 35.650345)'));
+ ST_GeomFromText('POINT(139.704834 35.650345)'));
INSERT INTO shops (name, location)
VALUES ('daruma',
- GeomFromText('POINT(139.770599 35.681461)'));
+ ST_GeomFromText('POINT(139.770599 35.681461)'));
INSERT INTO shops (name, location)
VALUES ('yanagi-ya',
- GeomFromText('POINT(139.783981 35.685341)'));
+ ST_GeomFromText('POINT(139.783981 35.685341)'));
INSERT INTO shops (name, location)
VALUES ('sharaku',
- GeomFromText('POINT(139.794846 35.716969)'));
+ ST_GeomFromText('POINT(139.794846 35.716969)'));
INSERT INTO shops (name, location)
VALUES ('takane',
- GeomFromText('POINT(139.560913 35.698601)'));
+ ST_GeomFromText('POINT(139.560913 35.698601)'));
INSERT INTO shops (name, location)
VALUES ('chiyoda',
- GeomFromText('POINT(139.652817 35.642601)'));
+ ST_GeomFromText('POINT(139.652817 35.642601)'));
INSERT INTO shops (name, location)
VALUES ('da-ka-po',
- GeomFromText('POINT(139.727356 35.627346)'));
+ ST_GeomFromText('POINT(139.727356 35.627346)'));
INSERT INTO shops (name, location)
VALUES ('matsushima-ya',
- GeomFromText('POINT(139.737381 35.640556)'));
+ ST_GeomFromText('POINT(139.737381 35.640556)'));
INSERT INTO shops (name, location)
VALUES ('kazuya',
- GeomFromText('POINT(139.760895 35.673508)'));
+ ST_GeomFromText('POINT(139.760895 35.673508)'));
INSERT INTO shops (name, location)
VALUES ('furuya-kogane-an',
- GeomFromText('POINT(139.676071 35.680603)'));
+ ST_GeomFromText('POINT(139.676071 35.680603)'));
INSERT INTO shops (name, location)
VALUES ('hachi-no-ie',
- GeomFromText('POINT(139.668106 35.608021)'));
+ ST_GeomFromText('POINT(139.668106 35.608021)'));
INSERT INTO shops (name, location)
VALUES ('azuki-chan',
- GeomFromText('POINT(139.673203 35.64151)'));
+ ST_GeomFromText('POINT(139.673203 35.64151)'));
INSERT INTO shops (name, location)
VALUES ('kuriko-an',
- GeomFromText('POINT(139.796829 35.712013)'));
+ ST_GeomFromText('POINT(139.796829 35.712013)'));
INSERT INTO shops (name, location)
VALUES ('yume-no-aru-machi-no-taiyaki-ya-san',
- GeomFromText('POINT(139.712524 35.616199)'));
+ ST_GeomFromText('POINT(139.712524 35.616199)'));
INSERT INTO shops (name, location)
VALUES ('naze-ya',
- GeomFromText('POINT(139.665833 35.609039)'));
+ ST_GeomFromText('POINT(139.665833 35.609039)'));
INSERT INTO shops (name, location)
VALUES ('sanoki-ya',
- GeomFromText('POINT(139.770721 35.66592)'));
+ ST_GeomFromText('POINT(139.770721 35.66592)'));
INSERT INTO shops (name, location)
VALUES ('shigeta',
- GeomFromText('POINT(139.780273 35.672626)'));
+ ST_GeomFromText('POINT(139.780273 35.672626)'));
INSERT INTO shops (name, location)
VALUES ('nishimi-ya',
- GeomFromText('POINT(139.774628 35.671825)'));
+ ST_GeomFromText('POINT(139.774628 35.671825)'));
INSERT INTO shops (name, location)
VALUES ('hiiragi',
- GeomFromText('POINT(139.711517 35.647701)'));
+ ST_GeomFromText('POINT(139.711517 35.647701)'));
ALTER TABLE shops ADD SPATIAL KEY location_index (location);
-SELECT id, name, AsText(location) AS location_text FROM shops
- WHERE MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location);
+SELECT id, name, ST_AsText(location) AS location_text FROM shops
+ WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location);
SHOW CREATE TABLE shops;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test
index f8b77becdde..70c176b5116 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test
@@ -1,4 +1,4 @@
-# Copyright(C) 2011 Kouhei Sutou <kou@clear-code.com>
+# Copyright(C) 2011-2015 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,10 +18,11 @@
--source ../../include/mroonga/have_fulltext_index_comment.inc
--source ../../include/mroonga/have_mroonga.inc
---disable_warnings
-DROP TABLE IF EXISTS diaries_innodb;
-DROP TABLE IF EXISTS diaries_mroonga;
---enable_warnings
+--disable_query_log
+DROP DATABASE test;
+CREATE DATABASE test;
+USE test;
+--enable_query_log
CREATE TABLE diaries_innodb (
id INT PRIMARY KEY AUTO_INCREMENT,
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_none.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_none.test
new file mode 100644
index 00000000000..da1e5e736ea
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_none.test
@@ -0,0 +1,39 @@
+# Copyright(C) 2015 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/have_innodb.inc
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_query_log
+DROP DATABASE test;
+CREATE DATABASE test;
+USE test;
+--enable_query_log
+
+SET NAMES utf8;
+
+CREATE TABLE memos (
+ content VARCHAR(64) NOT NULL PRIMARY KEY,
+ FULLTEXT INDEX (content) COMMENT 'index_flags "NONE"'
+) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8;
+
+SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
+
+DROP TABLE memos;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_with_position_and_with_weight.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_with_position_and_with_weight.test
new file mode 100644
index 00000000000..8d0d585d56d
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_with_position_and_with_weight.test
@@ -0,0 +1,39 @@
+# Copyright(C) 2015 Naoya Murakami <naoya@createfield.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/have_innodb.inc
+--source ../../include/mroonga/have_mroonga.inc
+--source ../../include/mroonga/load_mroonga_functions.inc
+
+--disable_query_log
+DROP DATABASE test;
+CREATE DATABASE test;
+USE test;
+--enable_query_log
+
+SET NAMES utf8;
+
+CREATE TABLE memos (
+ content VARCHAR(64) NOT NULL PRIMARY KEY,
+ FULLTEXT INDEX (content) COMMENT 'index_flags "WITH_POSITION|WITH_WEIGHT"'
+) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8;
+
+SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
+
+DROP TABLE memos;
+
+--source ../../include/mroonga/unload_mroonga_functions.inc
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_multiple_token_filters.test
index 9ba941f8701..9ff8e4448d9 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_multiple_token_filters.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_multiple_token_filters.test
@@ -34,7 +34,7 @@ CREATE TABLE memos (
FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord,TokenFilterStopWord"'
) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_one_token_filter.test
index 91ac84c04d5..eee08309f76 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_one_token_filter.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_comment_one_token_filter.test
@@ -34,7 +34,7 @@ CREATE TABLE memos (
FULLTEXT INDEX (content) COMMENT 'token_filters "TokenFilterStopWord"'
) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8;
-SELECT mroonga_command("dump");
+SELECT mroonga_command("dump --dump_plugins no");
DROP TABLE memos;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test
index 4676fc61331..af6242a9ad1 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test
@@ -16,6 +16,7 @@
--source include/have_innodb.inc
--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
@@ -31,115 +32,115 @@ create table shops (
show create table shops;
insert into shops (name, location)
values ('nezu-no-taiyaki',
- GeomFromText('POINT(139.762573 35.720253)'));
+ ST_GeomFromText('POINT(139.762573 35.720253)'));
insert into shops (name, location)
values ('taiyaki-kataoka',
- GeomFromText('POINT(139.715591 35.712521)'));
+ ST_GeomFromText('POINT(139.715591 35.712521)'));
insert into shops (name, location)
values ('soba-taiyaki-ku',
- GeomFromText('POINT(139.659088 35.683712)'));
+ ST_GeomFromText('POINT(139.659088 35.683712)'));
insert into shops (name, location)
values ('kuruma',
- GeomFromText('POINT(139.706207 35.721516)'));
+ ST_GeomFromText('POINT(139.706207 35.721516)'));
insert into shops (name, location)
values ('hirose-ya',
- GeomFromText('POINT(139.685608 35.714844)'));
+ ST_GeomFromText('POINT(139.685608 35.714844)'));
insert into shops (name, location)
values ('sazare',
- GeomFromText('POINT(139.685043 35.714653)'));
+ ST_GeomFromText('POINT(139.685043 35.714653)'));
insert into shops (name, location)
values ('omede-taiyaki',
- GeomFromText('POINT(139.817154 35.700516)'));
+ ST_GeomFromText('POINT(139.817154 35.700516)'));
insert into shops (name, location)
values ('onaga-ya',
- GeomFromText('POINT(139.81105 35.698254)'));
+ ST_GeomFromText('POINT(139.81105 35.698254)'));
insert into shops (name, location)
values ('shiro-ya',
- GeomFromText('POINT(139.638611 35.705517)'));
+ ST_GeomFromText('POINT(139.638611 35.705517)'));
insert into shops (name, location)
values ('fuji-ya',
- GeomFromText('POINT(139.637115 35.703938)'));
+ ST_GeomFromText('POINT(139.637115 35.703938)'));
insert into shops (name, location)
values ('miyoshi',
- GeomFromText('POINT(139.537323 35.644539)'));
+ ST_GeomFromText('POINT(139.537323 35.644539)'));
insert into shops (name, location)
values ('juju-ya',
- GeomFromText('POINT(139.695755 35.628922)'));
+ ST_GeomFromText('POINT(139.695755 35.628922)'));
insert into shops (name, location)
values ('tatsumi-ya',
- GeomFromText('POINT(139.638657 35.665501)'));
+ ST_GeomFromText('POINT(139.638657 35.665501)'));
insert into shops (name, location)
values ('tetsuji',
- GeomFromText('POINT(139.76857 35.680912)'));
+ ST_GeomFromText('POINT(139.76857 35.680912)'));
insert into shops (name, location)
values ('gazuma-ya',
- GeomFromText('POINT(139.647598 35.700817)'));
+ ST_GeomFromText('POINT(139.647598 35.700817)'));
insert into shops (name, location)
values ('honma-mon',
- GeomFromText('POINT(139.652573 35.722736)'));
+ ST_GeomFromText('POINT(139.652573 35.722736)'));
insert into shops (name, location)
values ('naniwa-ya',
- GeomFromText('POINT(139.796234 35.730061)'));
+ ST_GeomFromText('POINT(139.796234 35.730061)'));
insert into shops (name, location)
values ('kuro-dai',
- GeomFromText('POINT(139.704834 35.650345)'));
+ ST_GeomFromText('POINT(139.704834 35.650345)'));
insert into shops (name, location)
values ('daruma',
- GeomFromText('POINT(139.770599 35.681461)'));
+ ST_GeomFromText('POINT(139.770599 35.681461)'));
insert into shops (name, location)
values ('yanagi-ya',
- GeomFromText('POINT(139.783981 35.685341)'));
+ ST_GeomFromText('POINT(139.783981 35.685341)'));
insert into shops (name, location)
values ('sharaku',
- GeomFromText('POINT(139.794846 35.716969)'));
+ ST_GeomFromText('POINT(139.794846 35.716969)'));
insert into shops (name, location)
values ('takane',
- GeomFromText('POINT(139.560913 35.698601)'));
+ ST_GeomFromText('POINT(139.560913 35.698601)'));
insert into shops (name, location)
values ('chiyoda',
- GeomFromText('POINT(139.652817 35.642601)'));
+ ST_GeomFromText('POINT(139.652817 35.642601)'));
insert into shops (name, location)
values ('da-ka-po',
- GeomFromText('POINT(139.727356 35.627346)'));
+ ST_GeomFromText('POINT(139.727356 35.627346)'));
insert into shops (name, location)
values ('matsushima-ya',
- GeomFromText('POINT(139.737381 35.640556)'));
+ ST_GeomFromText('POINT(139.737381 35.640556)'));
insert into shops (name, location)
values ('kazuya',
- GeomFromText('POINT(139.760895 35.673508)'));
+ ST_GeomFromText('POINT(139.760895 35.673508)'));
insert into shops (name, location)
values ('furuya-kogane-an',
- GeomFromText('POINT(139.676071 35.680603)'));
+ ST_GeomFromText('POINT(139.676071 35.680603)'));
insert into shops (name, location)
values ('hachi-no-ie',
- GeomFromText('POINT(139.668106 35.608021)'));
+ ST_GeomFromText('POINT(139.668106 35.608021)'));
insert into shops (name, location)
values ('azuki-chan',
- GeomFromText('POINT(139.673203 35.64151)'));
+ ST_GeomFromText('POINT(139.673203 35.64151)'));
insert into shops (name, location)
values ('kuriko-an',
- GeomFromText('POINT(139.796829 35.712013)'));
+ ST_GeomFromText('POINT(139.796829 35.712013)'));
insert into shops (name, location)
values ('yume-no-aru-machi-no-taiyaki-ya-san',
- GeomFromText('POINT(139.712524 35.616199)'));
+ ST_GeomFromText('POINT(139.712524 35.616199)'));
insert into shops (name, location)
values ('naze-ya',
- GeomFromText('POINT(139.665833 35.609039)'));
+ ST_GeomFromText('POINT(139.665833 35.609039)'));
insert into shops (name, location)
values ('sanoki-ya',
- GeomFromText('POINT(139.770721 35.66592)'));
+ ST_GeomFromText('POINT(139.770721 35.66592)'));
insert into shops (name, location)
values ('shigeta',
- GeomFromText('POINT(139.780273 35.672626)'));
+ ST_GeomFromText('POINT(139.780273 35.672626)'));
insert into shops (name, location)
values ('nishimi-ya',
- GeomFromText('POINT(139.774628 35.671825)'));
+ ST_GeomFromText('POINT(139.774628 35.671825)'));
insert into shops (name, location)
values ('hiiragi',
- GeomFromText('POINT(139.711517 35.647701)'));
-select id, name, AsText(location) as location_text from shops;
-select id, name, AsText(location) as location_text from shops
- where MBRContains(GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location);
+ ST_GeomFromText('POINT(139.711517 35.647701)'));
+select id, name, ST_AsText(location) as location_text from shops;
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location);
drop table shops;
--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test
index 25814635b22..9f3589a66d1 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test
@@ -16,6 +16,7 @@
--source include/have_innodb.inc
--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
@@ -32,16 +33,16 @@ show create table shops;
insert into shops (name, location)
values ('sazare',
- GeomFromText('POINT(139.685043 35.714653)'));
-select id, name, AsText(location) as location_text from shops
- where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+ ST_GeomFromText('POINT(139.685043 35.714653)'));
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
delete from shops
- where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
-select id, name, AsText(location) as location_text from shops
- where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+ where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
-select id, name, AsText(location) as location_text from shops;
+select id, name, ST_AsText(location) as location_text from shops;
drop table shops;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test
index c6bb8a1d4e6..aff5c52c786 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test
@@ -16,6 +16,7 @@
--source include/have_innodb.inc
--source include/have_geometry.inc
+--source ../../include/mroonga/have_version_56_or_later.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
@@ -32,18 +33,18 @@ show create table shops;
insert into shops (name, location)
values ('sazare',
- GeomFromText('POINT(139.685043 35.714653)'));
-select id, name, AsText(location) as location_text from shops
- where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
-select id, name, AsText(location) as location_text from shops
- where MBRContains(GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location);
+ ST_GeomFromText('POINT(139.685043 35.714653)'));
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location);
-update shops set location = GeomFromText('POINT(139.66116 35.57566)')
+update shops set location = ST_GeomFromText('POINT(139.66116 35.57566)')
where name = 'sazare';
-select id, name, AsText(location) as location_text from shops
- where MBRContains(GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
-select id, name, AsText(location) as location_text from shops
- where MBRContains(GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location);
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_GeomFromText('LineString(139.68466 35.71592, 139.68804 35.71411)'), location);
+select id, name, ST_AsText(location) as location_text from shops
+ where MBRContains(ST_GeomFromText('LineString(139.65659 35.57903, 139.66489 35.57262)'), location);
drop table shops;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test
index 39772e5d78d..776fd27a2f2 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test
@@ -36,14 +36,6 @@ insert into t1 values(3,30,"ii si ii se ii");
insert into t1 values(4,40,"ta ti tu te to");
insert into t1 values(5,50,"aa ii uu ii oo");
-select *, match(c3) against("ii") from t1
- where match(c3) against("ii") order by c1 desc limit 1;
-show status like 'mroonga_fast_order_limit';
-
-select *, match(c3) against("ii") from t1
- where match(c3) against("ii") order by c1 limit 1;
-show status like 'mroonga_fast_order_limit';
-
select c3, match(c3) against("ii") from t1
where match(c3) against("ii") order by match(c3) against("ii") desc;
show status like 'mroonga_fast_order_limit';
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_grn_id.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test
index c4961756a26..69be84e2619 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_grn_id.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test
@@ -1,5 +1,4 @@
-# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
-# Copyright(C) 2013 Kentoku SHIBA
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -16,37 +15,36 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--source include/have_innodb.inc
---source include/not_embedded.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
-DROP TABLE IF EXISTS ids;
-DROP FUNCTION IF EXISTS last_insert_grn_id;
+DROP TABLE IF EXISTS memos;
--enable_warnings
---disable_query_log
-if ($VERSION_COMPILE_OS_WIN)
-{
- CREATE FUNCTION last_insert_grn_id RETURNS integer SONAME 'ha_mroonga.dll';
-}
-if (!$VERSION_COMPILE_OS_WIN)
-{
- CREATE FUNCTION last_insert_grn_id RETURNS integer SONAME 'ha_mroonga.so';
-}
---enable_query_log
+FLUSH STATUS;
-CREATE TABLE ids (
- id int AUTO_INCREMENT PRIMARY KEY
-) COMMENT='ENGINE "InnoDB"';
+CREATE TABLE memos (
+ id int PRIMARY KEY,
+ content TEXT,
+ FULLTEXT INDEX (content)
+) COMMENT = 'engine "InnoDB"';
-SELECT last_insert_grn_id();
+INSERT INTO memos VALUES(1, "Groonga is fast");
+INSERT INTO memos VALUES(2, "Mroonga is fast");
+INSERT INTO memos VALUES(3, "Mroonga is easy");
+INSERT INTO memos VALUES(4, "Mroonga is useful");
+INSERT INTO memos VALUES(5, "Mroonga is great");
-INSERT INTO ids VALUES();
-SELECT last_insert_grn_id();
-SELECT * FROM ids;
+SHOW STATUS LIKE 'mroonga_fast_order_limit';
-DROP TABLE ids;
+SELECT id, content
+ FROM memos
+ WHERE MATCH(content) AGAINST("+Mroonga" IN BOOLEAN MODE)
+ ORDER BY id
+ LIMIT 2;
-DROP FUNCTION last_insert_grn_id;
+SHOW STATUS LIKE 'mroonga_fast_order_limit';
+
+DROP TABLE memos;
--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test
new file mode 100644
index 00000000000..f7b858e75f0
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test
@@ -0,0 +1,50 @@
+# Copyright(C) 2015 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/have_innodb.inc
+--source ../../include/mroonga/have_mroonga.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS memos;
+--enable_warnings
+
+FLUSH STATUS;
+
+CREATE TABLE memos (
+ id int PRIMARY KEY,
+ content TEXT,
+ FULLTEXT INDEX (content)
+) COMMENT = 'engine "InnoDB"';
+
+INSERT INTO memos VALUES(1, "Mroonga is fast");
+INSERT INTO memos VALUES(2, "Mroonga is easy");
+INSERT INTO memos VALUES(3, "Mroonga is useful");
+INSERT INTO memos VALUES(4, "Mroonga is great");
+INSERT INTO memos VALUES(5, "Groonga is fast");
+
+SHOW STATUS LIKE 'mroonga_fast_order_limit';
+
+SELECT id, content
+ FROM memos
+ WHERE MATCH(content) AGAINST("+Mroonga" IN BOOLEAN MODE)
+ ORDER BY id DESC
+ LIMIT 2;
+
+SHOW STATUS LIKE 'mroonga_fast_order_limit';
+
+DROP TABLE memos;
+
+--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema-master.opt b/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema-master.opt
new file mode 100644
index 00000000000..611d08f0c78
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema-master.opt
@@ -0,0 +1 @@
+--performance-schema
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/version_56_or_later_performance_schema.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test
index 20cb2107ec2..31c3e0a26ff 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/version_56_or_later_performance_schema.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test
@@ -1,4 +1,4 @@
-# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
+# Copyright(C) 2012-2015 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -14,7 +14,6 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---source ../../include/mroonga/have_version_56_or_later.inc
--source include/have_innodb.inc
--source include/not_embedded.inc
--source include/have_perfschema.inc
@@ -35,7 +34,7 @@ SHOW CREATE TABLE diaries;
INSERT INTO diaries (content) VALUES ("Tommorow will be shiny day!");
-SHOW TABLES FROM performance_schema;
+SHOW TABLES FROM performance_schema LIKE 'threads';
DROP TABLE diaries;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test
index b333991d27e..8f0d01d52fb 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test
@@ -19,14 +19,9 @@
--source ../../include/mroonga/have_mroonga.inc
--source ../../include/mroonga/have_mroonga_helper.inc
---disable_warnings
-DROP DATABASE IF EXISTS repair_test;
CREATE DATABASE repair_test;
USE repair_test;
-DROP TABLE IF EXISTS diaries;
---enable_warnings
-
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
@@ -44,10 +39,10 @@ SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting");
--remove_file $MYSQLD_DATADIR/repair_test.mrn
--remove_file $MYSQLD_DATADIR/repair_test.mrn.001
--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000000
---remove_file $MYSQLD_DATADIR/repair_test.mrn.0000103
---remove_file $MYSQLD_DATADIR/repair_test.mrn.0000104
--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000105
---remove_file $MYSQLD_DATADIR/repair_test.mrn.0000105.c
+--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000106
+--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000107
+--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000107.c
FLUSH TABLES;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test
index ce6e1d23280..147d9672eae 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test
@@ -19,14 +19,9 @@
--source ../../include/mroonga/have_mroonga.inc
--source ../../include/mroonga/have_mroonga_helper.inc
---disable_warnings
-DROP DATABASE IF EXISTS repair_test;
CREATE DATABASE repair_test;
USE repair_test;
-DROP TABLE IF EXISTS diaries;
---enable_warnings
-
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
@@ -41,7 +36,7 @@ INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga.");
SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting");
---remove_file $MYSQLD_DATADIR/repair_test.mrn.0000104
+--remove_file $MYSQLD_DATADIR/repair_test.mrn.0000106
FLUSH TABLES;
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test
index b272649c732..065b78d44a7 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test
@@ -1,4 +1,4 @@
-# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
+# Copyright(C) 2012-2015 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -22,12 +22,6 @@
DROP TABLE IF EXISTS diaries;
--enable_warnings
-# MySQL <= 5.5 reports wrong a warning. :<
-# It has been fixed in MySQL >= 5.6 and MariaDB >= 5.3.
---disable_warnings
-SET GLOBAL mroonga_match_escalation_threshold = -1;
---enable_warnings
-
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
@@ -40,17 +34,23 @@ INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install");
INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install");
-SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE);
-
SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE);
-SET GLOBAL mroonga_match_escalation_threshold = 0;
-SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE);
+# MySQL <= 5.5 reports a wrong warning. :<
+# It has been fixed in MySQL >= 5.6 and MariaDB >= 5.3.
+--disable_warnings
+SET GLOBAL mroonga_match_escalation_threshold = -1;
+--enable_warnings
-SET mroonga_match_escalation_threshold = 0;
+CONNECT(search_connection, localhost, root);
+USE test;
SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE);
+DISCONNECT search_connection;
+CONNECTION default;
+SET GLOBAL mroonga_match_escalation_threshold = DEFAULT;
DROP TABLE diaries;
+
--source ../../include/mroonga/have_mroonga_deinit.inc
diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test
index bf22001bb10..b47dcef3967 100644
--- a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test
+++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test
@@ -38,7 +38,7 @@ SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE);
SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE);
-# MySQL <= 5.5 reports wrong a warning. :<
+# MySQL <= 5.5 reports a wrong warning. :<
# It has been fixed in MySQL >= 5.6 and MariaDB >= 5.3.
--disable_warnings
SET mroonga_match_escalation_threshold = -1;