From a2a2e32c02643a0cec111511220227703fda1cd5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 1 Jul 2024 20:15:00 +0200 Subject: Merging upstream version 1:11.4.2. Signed-off-by: Daniel Baumann --- storage/mroonga/ha_mroonga.cpp | 109 ++++++++++++++------- storage/mroonga/ha_mroonga.hpp | 32 +++--- storage/mroonga/mrn_table.cpp | 8 -- .../r/create_table_index_parser_comment.result | 29 ------ .../storage/r/create_table_index_parser_off.result | 40 -------- .../optimization_count_skip_index_not_equal.result | 3 + .../t/create_table_index_parser_comment.test | 43 -------- .../storage/t/create_table_index_parser_off.test | 48 --------- .../t/optimization_count_skip_index_not_equal.test | 1 + .../wrapper/r/create_table_parser_comment.result | 25 ----- .../mroonga/wrapper/r/geometry_contains.result | 2 +- .../wrapper/t/create_table_parser_comment.test | 39 -------- 12 files changed, 96 insertions(+), 283 deletions(-) delete mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_comment.result delete mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_off.result delete mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_comment.test delete mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_off.test delete mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_parser_comment.result delete mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_parser_comment.test (limited to 'storage/mroonga') diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp index d5f150de..49a31900 100644 --- a/storage/mroonga/ha_mroonga.cpp +++ b/storage/mroonga/ha_mroonga.cpp @@ -3635,7 +3635,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, Alter_info *alter_info = &lex->alter_info; List_iterator key_iterator(alter_info->key_list); Key *key; - char ref_db_buff[NAME_LEN + 1], ref_table_buff[NAME_LEN + 1]; + IdentBuffer ref_db_buff, ref_table_buff; while ((key = key_iterator++)) { if (key->type != MRN_KEYTYPE_FOREIGN) @@ -3670,9 +3670,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, #endif DBUG_PRINT("info", ("mroonga: ref_db_name=%s", ref_db_name.str)); if (ref_db_name.str && lower_case_table_names) { - strmake(ref_db_buff, ref_db_name.str, sizeof(ref_db_buff) - 1); - my_casedn_str(system_charset_info, ref_db_buff); - ref_db_name.str = ref_db_buff; + ref_db_name= ref_db_buff.copy_casedn(ref_db_name).to_lex_cstring(); DBUG_PRINT("info", ("mroonga: casedn ref_db_name=%s", ref_db_name.str)); } #ifdef MRN_FOREIGN_KEY_USE_CONST_STRING @@ -3682,9 +3680,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, #endif DBUG_PRINT("info", ("mroonga: ref_table_name=%s", ref_table_name.str)); if (ref_table_name.str && lower_case_table_names) { - strmake(ref_table_buff, ref_table_name.str, sizeof(ref_table_buff) - 1); - my_casedn_str(system_charset_info, ref_table_buff); - ref_table_name.str = ref_table_buff; + ref_table_name= ref_table_buff.copy_casedn(ref_table_name).to_lex_cstring(); DBUG_PRINT("info", ("mroonga: casedn ref_table_name=%s", ref_table_name.str)); } if (ref_db_name.str && strcmp(table->s->db.str, ref_db_name.str)) @@ -4305,6 +4301,7 @@ int ha_mroonga::wrapper_open(const char *name, int mode, uint open_options) wrap_handler->set_ha_share_ref(&table->s->ha_share); #endif error = wrap_handler->ha_open(table, name, mode, open_options); + wrap_handler->set_optimizer_costs(ha_thd()); } else { if (!(wrap_handler = parent_for_clone->wrap_handler->clone(name, mem_root_for_clone))) @@ -12320,6 +12317,7 @@ ha_rows ha_mroonga::wrapper_multi_range_read_info_const(uint keyno, uint n_ranges, uint *bufsz, uint *flags, + ha_rows limit, Cost_estimate *cost) { MRN_DBUG_ENTER_METHOD(); @@ -12327,7 +12325,8 @@ ha_rows ha_mroonga::wrapper_multi_range_read_info_const(uint keyno, KEY *key_info = &(table->key_info[keyno]); if (mrn_is_geo_key(key_info)) { rows = handler::multi_range_read_info_const(keyno, seq, seq_init_param, - n_ranges, bufsz, flags, cost); + n_ranges, bufsz, flags, limit, + cost); DBUG_RETURN(rows); } MRN_SET_WRAP_SHARE_KEY(share, table->s); @@ -12336,7 +12335,7 @@ ha_rows ha_mroonga::wrapper_multi_range_read_info_const(uint keyno, set_pk_bitmap(); rows = wrap_handler->multi_range_read_info_const(keyno, seq, seq_init_param, n_ranges, bufsz, flags, - cost); + limit, cost); MRN_SET_BASE_SHARE_KEY(share, table->s); MRN_SET_BASE_TABLE_KEY(this, table); DBUG_RETURN(rows); @@ -12348,20 +12347,21 @@ ha_rows ha_mroonga::storage_multi_range_read_info_const(uint keyno, uint n_ranges, uint *bufsz, uint *flags, + ha_rows limit, Cost_estimate *cost) { MRN_DBUG_ENTER_METHOD(); ha_rows rows = handler::multi_range_read_info_const(keyno, seq, seq_init_param, n_ranges, bufsz, flags, - cost); + limit, cost); DBUG_RETURN(rows); } ha_rows ha_mroonga::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, void *seq_init_param, uint n_ranges, uint *bufsz, - uint *flags, + uint *flags, ha_rows limit, Cost_estimate *cost) { MRN_DBUG_ENTER_METHOD(); @@ -12370,11 +12370,11 @@ ha_rows ha_mroonga::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, { rows = wrapper_multi_range_read_info_const(keyno, seq, seq_init_param, n_ranges, bufsz, - flags, cost); + flags, limit, cost); } else { rows = storage_multi_range_read_info_const(keyno, seq, seq_init_param, n_ranges, bufsz, - flags, cost); + flags, limit, cost); } DBUG_RETURN(rows); } @@ -13015,9 +13015,9 @@ int ha_mroonga::truncate() DBUG_RETURN(error); } -double ha_mroonga::wrapper_scan_time() +IO_AND_CPU_COST ha_mroonga::wrapper_scan_time() { - double res; + IO_AND_CPU_COST res; MRN_DBUG_ENTER_METHOD(); MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); @@ -13027,17 +13027,16 @@ double ha_mroonga::wrapper_scan_time() DBUG_RETURN(res); } -double ha_mroonga::storage_scan_time() +IO_AND_CPU_COST ha_mroonga::storage_scan_time() { MRN_DBUG_ENTER_METHOD(); - double time = handler::scan_time(); - DBUG_RETURN(time); + DBUG_RETURN(handler::scan_time()); } -double ha_mroonga::scan_time() +IO_AND_CPU_COST ha_mroonga::scan_time() { MRN_DBUG_ENTER_METHOD(); - double time; + IO_AND_CPU_COST time; if (share->wrapper_mode) { time = wrapper_scan_time(); @@ -13047,51 +13046,87 @@ double ha_mroonga::scan_time() DBUG_RETURN(time); } -double ha_mroonga::wrapper_read_time(uint index, uint ranges, ha_rows rows) +IO_AND_CPU_COST ha_mroonga::wrapper_rnd_pos_time(ha_rows rows) +{ + IO_AND_CPU_COST res; + MRN_DBUG_ENTER_METHOD(); + MRN_SET_WRAP_SHARE_KEY(share, table->s); + MRN_SET_WRAP_TABLE_KEY(this, table); + res = wrap_handler->rnd_pos_time(rows); + MRN_SET_BASE_SHARE_KEY(share, table->s); + MRN_SET_BASE_TABLE_KEY(this, table); + DBUG_RETURN(res); +} + +IO_AND_CPU_COST ha_mroonga::storage_rnd_pos_time(ha_rows rows) +{ + MRN_DBUG_ENTER_METHOD(); + IO_AND_CPU_COST time = handler::rnd_pos_time(rows); + DBUG_RETURN(time); +} + + +IO_AND_CPU_COST ha_mroonga::rnd_pos_time(ha_rows rows) +{ + MRN_DBUG_ENTER_METHOD(); + IO_AND_CPU_COST time; + if (share->wrapper_mode) + { + time = wrapper_rnd_pos_time(rows); + } else { + time = storage_rnd_pos_time(rows); + } + DBUG_RETURN(time); +} + + +IO_AND_CPU_COST ha_mroonga::wrapper_keyread_time(uint index, ulong ranges, + ha_rows rows, ulonglong blocks) { - double res; + IO_AND_CPU_COST res; MRN_DBUG_ENTER_METHOD(); if (index < MAX_KEY) { KEY *key_info = &(table->key_info[index]); if (mrn_is_geo_key(key_info)) { - res = handler::read_time(index, ranges, rows); + res = handler::keyread_time(index, ranges, rows, blocks); DBUG_RETURN(res); } MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); - res = wrap_handler->read_time(share->wrap_key_nr[index], ranges, rows); + res = wrap_handler->keyread_time(share->wrap_key_nr[index], ranges, rows, blocks); MRN_SET_BASE_SHARE_KEY(share, table->s); MRN_SET_BASE_TABLE_KEY(this, table); } else { MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); - res = wrap_handler->read_time(index, ranges, rows); + res = wrap_handler->keyread_time(index, ranges, rows, blocks); MRN_SET_BASE_SHARE_KEY(share, table->s); MRN_SET_BASE_TABLE_KEY(this, table); } DBUG_RETURN(res); } -double ha_mroonga::storage_read_time(uint index, uint ranges, ha_rows rows) +IO_AND_CPU_COST ha_mroonga::storage_keyread_time(uint index, ulong ranges, ha_rows rows, ulonglong blocks) { MRN_DBUG_ENTER_METHOD(); - double time = handler::read_time(index, ranges, rows); + IO_AND_CPU_COST time = handler::keyread_time(index, ranges, rows, blocks); DBUG_RETURN(time); } -double ha_mroonga::read_time(uint index, uint ranges, ha_rows rows) +IO_AND_CPU_COST ha_mroonga::keyread_time(uint index, ulong ranges, ha_rows rows, ulonglong blocks) { MRN_DBUG_ENTER_METHOD(); - double time; + IO_AND_CPU_COST time; if (share->wrapper_mode) { - time = wrapper_read_time(index, ranges, rows); + time = wrapper_keyread_time(index, ranges, rows, blocks); } else { - time = storage_read_time(index, ranges, rows); + time = storage_keyread_time(index, ranges, rows, blocks); } DBUG_RETURN(time); } + #ifdef MRN_HANDLER_HAVE_KEYS_TO_USE_FOR_SCANNING const key_map *ha_mroonga::wrapper_keys_to_use_for_scanning() { @@ -16626,7 +16661,7 @@ bool ha_mroonga::can_switch_engines() DBUG_RETURN(res); } -int ha_mroonga::wrapper_get_foreign_key_list(THD *thd, +int ha_mroonga::wrapper_get_foreign_key_list(const THD *thd, List *f_key_list) { MRN_DBUG_ENTER_METHOD(); @@ -16640,7 +16675,7 @@ int ha_mroonga::wrapper_get_foreign_key_list(THD *thd, } #ifdef MRN_SUPPORT_FOREIGN_KEYS -int ha_mroonga::storage_get_foreign_key_list(THD *thd, +int ha_mroonga::storage_get_foreign_key_list(const THD *thd, List *f_key_list) { int error; @@ -16750,7 +16785,7 @@ int ha_mroonga::storage_get_foreign_key_list(THD *thd, } #endif -int ha_mroonga::get_foreign_key_list(THD *thd, +int ha_mroonga::get_foreign_key_list(const THD *thd, List *f_key_list) { MRN_DBUG_ENTER_METHOD(); @@ -16764,7 +16799,7 @@ int ha_mroonga::get_foreign_key_list(THD *thd, DBUG_RETURN(res); } -int ha_mroonga::wrapper_get_parent_foreign_key_list(THD *thd, +int ha_mroonga::wrapper_get_parent_foreign_key_list(const THD *thd, List *f_key_list) { MRN_DBUG_ENTER_METHOD(); @@ -16777,7 +16812,7 @@ int ha_mroonga::wrapper_get_parent_foreign_key_list(THD *thd, DBUG_RETURN(res); } -int ha_mroonga::storage_get_parent_foreign_key_list(THD *thd, +int ha_mroonga::storage_get_parent_foreign_key_list(const THD *thd, List *f_key_list) { MRN_DBUG_ENTER_METHOD(); @@ -16785,7 +16820,7 @@ int ha_mroonga::storage_get_parent_foreign_key_list(THD *thd, DBUG_RETURN(res); } -int ha_mroonga::get_parent_foreign_key_list(THD *thd, +int ha_mroonga::get_parent_foreign_key_list(const THD *thd, List *f_key_list) { MRN_DBUG_ENTER_METHOD(); diff --git a/storage/mroonga/ha_mroonga.hpp b/storage/mroonga/ha_mroonga.hpp index 6bf971aa..394eba7e 100644 --- a/storage/mroonga/ha_mroonga.hpp +++ b/storage/mroonga/ha_mroonga.hpp @@ -505,7 +505,8 @@ public: ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, void *seq_init_param, uint n_ranges, uint *bufsz, - uint *flags, Cost_estimate *cost) mrn_override; + uint *flags, ha_rows limit, + Cost_estimate *cost) mrn_override; ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys, #ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS uint key_parts, @@ -531,8 +532,9 @@ public: int end_bulk_insert() mrn_override; int delete_all_rows() mrn_override; int truncate() mrn_override; - double scan_time() mrn_override; - double read_time(uint index, uint ranges, ha_rows rows) mrn_override; + IO_AND_CPU_COST scan_time() mrn_override; + IO_AND_CPU_COST rnd_pos_time(ha_rows rows) mrn_override; + IO_AND_CPU_COST keyread_time(uint index, ulong ranges, ha_rows rows, ulonglong blocks) mrn_override; #ifdef MRN_HANDLER_HAVE_KEYS_TO_USE_FOR_SCANNING const key_map *keys_to_use_for_scanning() mrn_override; #endif @@ -619,8 +621,8 @@ protected: char *get_tablespace_name(THD *thd, char *name, uint name_len); #endif bool can_switch_engines() mrn_override; - int get_foreign_key_list(THD *thd, List *f_key_list) mrn_override; - int get_parent_foreign_key_list(THD *thd, List *f_key_list) mrn_override; + int get_foreign_key_list(const THD *thd, List *f_key_list) mrn_override; + int get_parent_foreign_key_list(const THD *thd, List *f_key_list) mrn_override; uint referenced_by_foreign_key() mrn_override; void init_table_handle_for_HANDLER() mrn_override; void free_foreign_key_create_info(char* str) mrn_override; @@ -1056,6 +1058,7 @@ private: uint n_ranges, uint *bufsz, uint *flags, + ha_rows limit, Cost_estimate *cost); ha_rows storage_multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq, @@ -1063,6 +1066,7 @@ private: uint n_ranges, uint *bufsz, uint *flags, + ha_rows limit, Cost_estimate *cost); ha_rows wrapper_multi_range_read_info(uint keyno, uint n_ranges, uint keys, #ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS @@ -1106,10 +1110,12 @@ private: int wrapper_truncate_index(); int storage_truncate(); int storage_truncate_index(); - double wrapper_scan_time(); - double storage_scan_time(); - double wrapper_read_time(uint index, uint ranges, ha_rows rows); - double storage_read_time(uint index, uint ranges, ha_rows rows); + IO_AND_CPU_COST wrapper_scan_time(); + IO_AND_CPU_COST storage_scan_time(); + IO_AND_CPU_COST wrapper_rnd_pos_time(ha_rows rows); + IO_AND_CPU_COST storage_rnd_pos_time(ha_rows rows); + IO_AND_CPU_COST wrapper_keyread_time(uint index, ulong ranges, ha_rows rows, ulonglong blocks); + IO_AND_CPU_COST storage_keyread_time(uint index, ulong ranges, ha_rows rows, ulonglong blocks); #ifdef MRN_HANDLER_HAVE_KEYS_TO_USE_FOR_SCANNING const key_map *wrapper_keys_to_use_for_scanning(); const key_map *storage_keys_to_use_for_scanning(); @@ -1267,10 +1273,10 @@ private: #endif bool wrapper_can_switch_engines(); bool storage_can_switch_engines(); - int wrapper_get_foreign_key_list(THD *thd, List *f_key_list); - int storage_get_foreign_key_list(THD *thd, List *f_key_list); - int wrapper_get_parent_foreign_key_list(THD *thd, List *f_key_list); - int storage_get_parent_foreign_key_list(THD *thd, List *f_key_list); + int wrapper_get_foreign_key_list(const THD *thd, List *f_key_list); + int storage_get_foreign_key_list(const THD *thd, List *f_key_list); + int wrapper_get_parent_foreign_key_list(const THD *thd, List *f_key_list); + int storage_get_parent_foreign_key_list(const THD *thd, List *f_key_list); uint wrapper_referenced_by_foreign_key(); uint storage_referenced_by_foreign_key(); void wrapper_init_table_handle_for_HANDLER(); diff --git a/storage/mroonga/mrn_table.cpp b/storage/mroonga/mrn_table.cpp index 037a6a59..f144aafe 100644 --- a/storage/mroonga/mrn_table.cpp +++ b/storage/mroonga/mrn_table.cpp @@ -530,7 +530,6 @@ int mrn_add_index_param(MRN_SHARE *share, KEY *key_info, int i) char *sprit_ptr[2]; char *tmp_ptr, *start_ptr; #endif - THD *thd = current_thd; MRN_DBUG_ENTER_FUNCTION(); #if MYSQL_VERSION_ID >= 50500 @@ -592,13 +591,6 @@ int mrn_add_index_param(MRN_SHARE *share, KEY *key_info, int i) case 5: MRN_PARAM_STR_LIST("table", index_table, i); break; - case 6: - push_warning_printf(thd, MRN_SEVERITY_WARNING, - ER_WARN_DEPRECATED_SYNTAX, - ER(ER_WARN_DEPRECATED_SYNTAX), - "parser", "tokenizer"); - MRN_PARAM_STR_LIST("parser", key_tokenizer, i); - break; case 9: MRN_PARAM_STR_LIST("tokenizer", key_tokenizer, i); break; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_comment.result deleted file mode 100644 index 29f27d15..00000000 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_comment.result +++ /dev/null @@ -1,29 +0,0 @@ -DROP TABLE IF EXISTS diaries; -CREATE TABLE diaries ( -id int PRIMARY KEY AUTO_INCREMENT, -body text, -FULLTEXT INDEX body_index (body) -COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"' -) DEFAULT CHARSET utf8; -Warnings: -Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead -INSERT INTO diaries (body) VALUES ("will start Groonga!"); -Warnings: -Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead -INSERT INTO diaries (body) VALUES ("starting Groonga..."); -INSERT INTO diaries (body) VALUES ("started Groonga."); -SELECT * FROM diaries; -id body -1 will start Groonga! -2 starting Groonga... -3 started Groonga. -SELECT * FROM diaries -WHERE MATCH(body) AGAINST("+start" IN BOOLEAN MODE) -ORDER BY id; -id body -1 will start Groonga! -2 starting Groonga... -3 started Groonga. -DROP TABLE diaries; -Warnings: -Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_off.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_off.result deleted file mode 100644 index f827c0ad..00000000 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_off.result +++ /dev/null @@ -1,40 +0,0 @@ -DROP TABLE IF EXISTS variables; -CREATE TABLE variables ( -id INT PRIMARY KEY AUTO_INCREMENT, -name TEXT, -FULLTEXT INDEX (name) COMMENT 'parser "off"' -) DEFAULT CHARSET=utf8; -Warnings: -Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead -INSERT INTO variables (name) VALUES ("mroonga_database_path_prefix"); -Warnings: -Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead -INSERT INTO variables (name) VALUES ("mroonga_default_tokenizer"); -INSERT INTO variables (name) VALUES ("mroonga_default_wrapper_engine"); -INSERT INTO variables (name) VALUES ("mroonga_dry_write"); -INSERT INTO variables (name) VALUES ("mroonga_enable_optimization"); -INSERT INTO variables (name) VALUES ("mroonga_libgroonga_version"); -INSERT INTO variables (name) VALUES ("mroonga_log_file"); -INSERT INTO variables (name) VALUES ("mroonga_log_level"); -INSERT INTO variables (name) VALUES ("mroonga_match_escalation_threshold"); -INSERT INTO variables (name) VALUES ("mroonga_version"); -SELECT * FROM variables; -id name -1 mroonga_database_path_prefix -2 mroonga_default_tokenizer -3 mroonga_default_wrapper_engine -4 mroonga_dry_write -5 mroonga_enable_optimization -6 mroonga_libgroonga_version -7 mroonga_log_file -8 mroonga_log_level -9 mroonga_match_escalation_threshold -10 mroonga_version -SELECT * FROM variables -WHERE MATCH (name) AGAINST ("mroonga_default*" IN BOOLEAN MODE); -id name -3 mroonga_default_wrapper_engine -2 mroonga_default_tokenizer -DROP TABLE variables; -Warnings: -Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result index a1a123e7..837ca2b6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result @@ -9,6 +9,9 @@ INSERT INTO users (age) VALUES (28); INSERT INTO users (age) VALUES (29); INSERT INTO users (age) VALUES (29); INSERT INTO users (age) VALUES (29); +explain SELECT COUNT(*) FROM users WHERE age <> 29; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE users range age age 5 NULL 4 Using where; Using index SELECT COUNT(*) FROM users WHERE age <> 29; COUNT(*) 2 diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_comment.test deleted file mode 100644 index c4bc32d1..00000000 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_comment.test +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright(C) 2011-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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - ---source include/not_embedded.inc ---source ../../include/mroonga/have_mroonga.inc - ---disable_warnings -DROP TABLE IF EXISTS diaries; ---enable_warnings - -CREATE TABLE diaries ( - id int PRIMARY KEY AUTO_INCREMENT, - body text, - FULLTEXT INDEX body_index (body) - COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"' -) DEFAULT CHARSET utf8; - ---enable_prepare_warnings -INSERT INTO diaries (body) VALUES ("will start Groonga!"); -INSERT INTO diaries (body) VALUES ("starting Groonga..."); -INSERT INTO diaries (body) VALUES ("started Groonga."); - -SELECT * FROM diaries; -SELECT * FROM diaries - WHERE MATCH(body) AGAINST("+start" IN BOOLEAN MODE) - ORDER BY id; - -DROP TABLE diaries; - ---source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_off.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_off.test deleted file mode 100644 index 2191a28c..00000000 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_off.test +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright(C) 2013 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - ---source include/not_embedded.inc ---source ../../include/mroonga/have_mroonga.inc - ---disable_warnings -DROP TABLE IF EXISTS variables; ---enable_warnings - -CREATE TABLE variables ( - id INT PRIMARY KEY AUTO_INCREMENT, - name TEXT, - FULLTEXT INDEX (name) COMMENT 'parser "off"' -) DEFAULT CHARSET=utf8; - ---enable_prepare_warnings -INSERT INTO variables (name) VALUES ("mroonga_database_path_prefix"); -INSERT INTO variables (name) VALUES ("mroonga_default_tokenizer"); -INSERT INTO variables (name) VALUES ("mroonga_default_wrapper_engine"); -INSERT INTO variables (name) VALUES ("mroonga_dry_write"); -INSERT INTO variables (name) VALUES ("mroonga_enable_optimization"); -INSERT INTO variables (name) VALUES ("mroonga_libgroonga_version"); -INSERT INTO variables (name) VALUES ("mroonga_log_file"); -INSERT INTO variables (name) VALUES ("mroonga_log_level"); -INSERT INTO variables (name) VALUES ("mroonga_match_escalation_threshold"); -INSERT INTO variables (name) VALUES ("mroonga_version"); - -SELECT * FROM variables; -SELECT * FROM variables - WHERE MATCH (name) AGAINST ("mroonga_default*" IN BOOLEAN MODE); - -DROP TABLE variables; - ---source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test index f75c8b4e..ed696c71 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test @@ -34,6 +34,7 @@ INSERT INTO users (age) VALUES (29); INSERT INTO users (age) VALUES (29); --disable_ps2_protocol +explain SELECT COUNT(*) FROM users WHERE age <> 29; SELECT COUNT(*) FROM users WHERE age <> 29; --enable_ps2_protocol diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_parser_comment.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_parser_comment.result deleted file mode 100644 index 4d9d20dc..00000000 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_parser_comment.result +++ /dev/null @@ -1,25 +0,0 @@ -drop table if exists diaries; -create table diaries ( -id int primary key auto_increment, -body text, -fulltext index body_index (body) -comment 'parser "TokenBigramSplitSymbolAlphaDigit"' -) comment = 'engine "innodb"' default charset utf8; -Warnings: -Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead -insert into diaries (body) values ("will start Groonga!"); -Warnings: -Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead -insert into diaries (body) values ("starting Groonga..."); -insert into diaries (body) values ("started Groonga."); -select * from diaries; -id body -1 will start Groonga! -2 starting Groonga... -3 started Groonga. -select * from diaries where match(body) against("+start" in boolean mode) order by id; -id body -1 will start Groonga! -2 starting Groonga... -3 started Groonga. -drop table diaries; 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 550554ea..6dd6dd25 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result @@ -154,7 +154,7 @@ id name location_text 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 +26 kazuya POINT(139.760895 35.673508) 14 tetsuji POINT(139.76857 35.680912) 19 daruma POINT(139.770599 35.681461) -26 kazuya POINT(139.760895 35.673508) drop table shops; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_parser_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_parser_comment.test deleted file mode 100644 index 81342a74..00000000 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_parser_comment.test +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright(C) 2011-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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - ---source include/not_embedded.inc ---source include/have_innodb.inc ---source ../../include/mroonga/have_mroonga.inc - ---disable_warnings -drop table if exists diaries; ---enable_warnings - -create table diaries ( - id int primary key auto_increment, - body text, - fulltext index body_index (body) - comment 'parser "TokenBigramSplitSymbolAlphaDigit"' -) comment = 'engine "innodb"' default charset utf8; ---enable_prepare_warnings -insert into diaries (body) values ("will start Groonga!"); -insert into diaries (body) values ("starting Groonga..."); -insert into diaries (body) values ("started Groonga."); -select * from diaries; -select * from diaries where match(body) against("+start" in boolean mode) order by id; -drop table diaries; - ---source ../../include/mroonga/have_mroonga_deinit.inc -- cgit v1.2.3