From 255c2398b5b02d473a081e5efe7f9153db3c8089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 16 Nov 2017 15:14:22 +0000 Subject: [PATCH] New upstream version 10.1.29 --- Docs/INFO_SRC | 10 +- VERSION | 2 +- client/mysql.cc | 7 +- client/mysqlbinlog.cc | 5 +- cmake/cpack_rpm.cmake | 11 +- cmake/maintainer.cmake | 5 + cmake/pcre.cmake | 16 +- cmake/wsrep.cmake | 2 +- extra/mariabackup/backup_copy.cc | 32 +- extra/mariabackup/changed_page_bitmap.cc | 8 +- extra/mariabackup/fil_cur.cc | 18 +- extra/mariabackup/write_filt.cc | 25 +- extra/mariabackup/write_filt.h | 2 +- extra/mariabackup/wsrep.cc | 6 +- extra/mariabackup/xtrabackup.cc | 409 +- extra/my_print_defaults.c | 24 +- extra/replace.c | 2 +- extra/yassl/README | 8 + extra/yassl/include/openssl/ssl.h | 5 +- extra/yassl/src/yassl_imp.cpp | 6 +- extra/yassl/src/yassl_int.cpp | 14 +- mysql-test/README | 101 +- mysql-test/include/check-testcase.test | 2 + mysql-test/include/have_debug.inc | 5 - mysql-test/include/have_example_plugin.inc | 14 +- mysql-test/include/have_innodb.inc | 6 - mysql-test/include/have_xtradb.inc | 7 - mysql-test/include/not_embedded.inc | 6 - mysql-test/include/not_windows.inc | 8 +- mysql-test/r/alter_table.result | 109 +- mysql-test/r/case.result | 16 + mysql-test/r/ctype_gbk.result | 18 + mysql-test/r/ctype_latin1.result | 18 + mysql-test/r/ctype_ucs.result | 30 + mysql-test/r/ctype_utf32.result | 15 + mysql-test/r/ctype_utf8.result | 22 + mysql-test/r/delete_returning.result | 12 + .../delimiter_command_case_sensitivity.result | 2 + mysql-test/r/errors.result | 2 +- mysql-test/r/func_in.result | 12 +- mysql-test/r/func_misc.result | 14 + mysql-test/r/func_regexp_pcre.result | 18 +- mysql-test/r/func_time.result | 28 +- mysql-test/r/gis-precise.result | 19 + mysql-test/r/information_schema.result | 32 + mysql-test/r/mdev13607.result | 469 + mysql-test/r/myisam.result | 9 +- mysql-test/r/mysqlbinlog.result | 1 + mysql-test/r/not_windows.require | 2 - mysql-test/r/partition_datatype.result | 8 +- mysql-test/r/ps.result | 143 + mysql-test/r/range_vs_index_merge.result | 81 + .../r/range_vs_index_merge_innodb.result | 81 + mysql-test/r/read_only.result | 3 + mysql-test/r/show_check.result | 4 +- ...nction_with_pad_char_to_full_length.result | 24 + mysql-test/r/strict.result | 4 +- mysql-test/r/subselect_exists2in.result | 37 + mysql-test/r/subselect_mat_cost_bugs.result | 17 + mysql-test/r/type_bit.result | 24 + mysql-test/r/type_blob.result | 2 +- mysql-test/r/type_date.result | 11 + mysql-test/r/type_varchar.result | 71 +- .../encryption/r/encryption_force.result | 4 +- .../encryption/r/filekeys_encfile.result | 2 +- .../encryption/r/filekeys_encfile_file.result | 2 +- .../r/innodb-encryption-alter.result | 5 +- .../suite/encryption/t/encryption_force.test | 6 +- .../suite/encryption/t/filekeys_goodtest.inc | 4 +- .../encryption/t/innodb-encryption-alter.test | 4 +- mysql-test/suite/galera/r/MW-388.result | 46 + mysql-test/suite/galera/r/MW-402.result | 192 + mysql-test/suite/galera/t/MW-388.test | 76 + mysql-test/suite/galera/t/MW-402.test | 228 + mysql-test/suite/galera/t/galera_ftwrl.test | 7 +- .../suite/galera/t/galera_suspend_slave.test | 4 +- .../suite/galera_3nodes/galera_3nodes.cnf | 3 + mysql-test/suite/innodb/r/innodb-16k.result | 10 +- mysql-test/suite/innodb/r/innodb-32k.result | 3 +- mysql-test/suite/innodb/r/innodb-64k.result | 3 +- .../suite/innodb/r/innodb-alter-table.result | 41 + mysql-test/suite/innodb/r/innodb-alter.result | 18 +- .../suite/innodb/r/innodb-get-fk.result | 3 + .../r/innodb-page_compression_tables.result | 5 +- .../suite/innodb/r/innodb-table-online.result | 6 +- .../suite/innodb/r/innodb-wl5522-debug.result | 30 +- .../suite/innodb/r/innodb-wl5980-alter.result | 16 +- .../r/table_definition_cache_debug.result | 16 + mysql-test/suite/innodb/r/undo_log.result | 142 + mysql-test/suite/innodb/t/innodb-16k.test | 10 +- mysql-test/suite/innodb/t/innodb-32k.test | 3 +- mysql-test/suite/innodb/t/innodb-64k.test | 3 +- .../suite/innodb/t/innodb-alter-table.test | 33 + mysql-test/suite/innodb/t/innodb-alter.test | 24 +- mysql-test/suite/innodb/t/innodb-get-fk.test | 5 + .../t/innodb-page_compression_tables.test | 4 +- .../suite/innodb/t/innodb-table-online.test | 7 +- .../suite/innodb/t/innodb-wl5522-debug.test | 93 +- .../suite/innodb/t/innodb-wl5980-alter.test | 31 +- .../innodb/t/table_definition_cache_debug.opt | 1 + .../t/table_definition_cache_debug.test | 66 + mysql-test/suite/innodb/t/undo_log.test | 139 + .../innodb_fts/r/concurrent_insert.result | 8 + mysql-test/suite/innodb_fts/r/fulltext.result | 56 +- .../suite/innodb_fts/t/concurrent_insert.test | 20 + mysql-test/suite/innodb_fts/t/fulltext.test | 46 +- .../r/innodb_prefix_index_liftedlimit.result | 8 +- .../r/wl5522_debug_zip.result} | 39 +- .../t/innodb_prefix_index_liftedlimit.test | 8 +- .../t/wl5522_debug_zip.test} | 125 +- mysql-test/suite/maria/maria.result | 9 +- mysql-test/suite/maria/maria.test | 3 +- .../suite/mariabackup/compress_qpress.result | 15 + .../suite/mariabackup/compress_qpress.test | 24 + .../suite/mariabackup/data_directory.result | 13 + .../suite/mariabackup/data_directory.test | 23 + .../mariabackup/incremental_backup.result | 10 +- .../suite/mariabackup/incremental_backup.test | 16 +- .../suite/mariabackup/partition_datadir.opt | 1 + .../mariabackup/partition_datadir.result | 22 + .../suite/mariabackup/partition_datadir.test | 24 + mysql-test/suite/mariabackup/suite.pm | 4 + .../parts/r/partition_alter_maria.result | 18 + .../suite/parts/t/partition_alter_maria.test | 18 + .../suite/plugins/r/server_audit.result | 9 +- .../plugins/r/thread_pool_server_audit.result | 9 +- mysql-test/suite/plugins/t/server_audit.test | 5 +- .../plugins/t/thread_pool_server_audit.test | 5 +- mysql-test/suite/roles/definer.result | 114 + mysql-test/suite/roles/definer.test | 122 + .../inc/explicit_defaults_for_timestamp.inc | 13 + ...explicit_defaults_for_timestamp_off.result | 13 + .../explicit_defaults_for_timestamp_on.result | 15 + .../innodb_buffer_pool_dump_now_basic.result | 7 +- .../innodb_buffer_pool_dump_pct_basic.result | 3 +- .../innodb_buffer_pool_load_now_basic.result | 6 +- .../t/innodb_buffer_pool_dump_now_basic.test | 31 +- .../t/innodb_buffer_pool_dump_pct_basic.test | 18 +- .../t/innodb_buffer_pool_load_now_basic.opt | 1 + .../t/innodb_buffer_pool_load_now_basic.test | 44 +- mysql-test/suite/vcol/r/vcol_misc.result | 21 +- mysql-test/suite/vcol/t/vcol_misc.test | 22 +- mysql-test/t/alter_table.test | 90 +- mysql-test/t/case.test | 12 + mysql-test/t/ctype_gbk.test | 14 + mysql-test/t/ctype_latin1.test | 16 + mysql-test/t/ctype_ucs.test | 23 + mysql-test/t/ctype_utf32.test | 13 + mysql-test/t/ctype_utf8.test | 16 + mysql-test/t/delete_returning.test | 15 + mysql-test/t/delimiter_case_mdev_10728.sql | 3 + .../t/delimiter_command_case_sensitivity.test | 4 + mysql-test/t/func_in.test | 13 +- mysql-test/t/func_misc.test | 16 + mysql-test/t/func_regexp_pcre.test | 8 +- mysql-test/t/func_time.test | 26 +- mysql-test/t/gis-precise.test | 19 + mysql-test/t/information_schema.test | 26 + mysql-test/t/mdev13607.test | 60 + mysql-test/t/myisam.test | 3 +- mysql-test/t/mysqlbinlog.test | 6 + mysql-test/t/partition_datatype.test | 8 +- mysql-test/t/ps.test | 129 + mysql-test/t/range_vs_index_merge.test | 53 + mysql-test/t/read_only.test | 5 + ...function_with_pad_char_to_full_length.test | 23 + mysql-test/t/subselect_exists2in.test | 40 + mysql-test/t/subselect_mat_cost_bugs.test | 19 + mysql-test/t/type_bit.test | 19 + mysql-test/t/type_date.test | 9 + mysql-test/t/type_varchar.test | 46 +- mysql-test/t/view.test | 1 + mysql-test/t/xml.test | 2 - mysql-test/unstable-tests | 243 +- mysys/my_new.cc | 10 + pcre/CMakeLists.txt | 6 +- pcre/pcre_exec.c | 6 + plugin/handler_socket/CMakeLists.txt | 6 + plugin/server_audit/server_audit.c | 41 +- scripts/CMakeLists.txt | 5 + scripts/mysql_install_db.sh | 48 +- scripts/mysqld_safe.sh | 4 +- scripts/wsrep_sst_common.sh | 8 +- scripts/wsrep_sst_xtrabackup-v2.sh | 4 +- sql-common/client.c | 2 +- sql/datadict.cc | 15 +- sql/events.cc | 9 +- sql/field.cc | 14 +- sql/ha_partition.cc | 6 +- sql/handler.cc | 26 +- sql/item.cc | 41 +- sql/item.h | 31 +- sql/item_cmpfunc.cc | 27 +- sql/item_cmpfunc.h | 10 +- sql/item_func.cc | 5 +- sql/item_func.h | 2 +- sql/item_geofunc.cc | 10 +- sql/item_inetfunc.cc | 7 +- sql/item_inetfunc.h | 6 +- sql/item_row.cc | 6 +- sql/item_row.h | 13 +- sql/item_subselect.cc | 23 +- sql/item_subselect.h | 4 +- sql/item_timefunc.cc | 15 +- sql/item_timefunc.h | 10 +- sql/log_event.cc | 19 +- sql/mysqld.cc | 3 - sql/opt_range.cc | 39 +- sql/opt_subselect.cc | 65 +- sql/partition_info.cc | 3 - sql/slave.cc | 1 - sql/sp_head.cc | 12 +- sql/sql_acl.cc | 53 +- sql/sql_acl.h | 8 + sql/sql_admin.cc | 1 - sql/sql_base.cc | 7 +- sql/sql_base.h | 5 +- sql/sql_class.cc | 11 +- sql/sql_const.h | 13 +- sql/sql_delete.cc | 2 +- sql/sql_derived.cc | 6 +- sql/sql_do.cc | 2 +- sql/sql_insert.cc | 14 +- sql/sql_lex.cc | 1 - sql/sql_lex.h | 1 + sql/sql_load.cc | 10 +- sql/sql_parse.cc | 63 +- sql/sql_partition.cc | 43 +- sql/sql_partition.h | 3 +- sql/sql_plugin.cc | 64 +- sql/sql_prepare.cc | 9 +- sql/sql_select.cc | 31 +- sql/sql_show.cc | 49 +- sql/sql_table.cc | 5 +- sql/sql_update.cc | 4 +- sql/sql_yacc.cc | 8862 +- sql/sql_yacc.yy | 12 +- sql/table.cc | 3 +- sql/table.h | 3 +- sql/wsrep_hton.cc | 3 + sql/wsrep_var.cc | 3 +- storage/connect/CMakeLists.txt | 59 +- storage/connect/array.cpp | 2 +- storage/connect/cmgoconn.cpp | 65 +- storage/connect/cmgoconn.h | 2 + storage/connect/filter.cpp | 2 +- storage/connect/filter.h | 3 - storage/connect/fmdlex.c | 16 +- storage/connect/ha_connect.cc | 127 +- storage/connect/ha_connect.h | 10 +- storage/connect/javaconn.cpp | 5 +- storage/connect/javaconn.h | 4 +- storage/connect/jdbccat.h | 2 +- storage/connect/jdbconn.cpp | 2 +- storage/connect/jmgoconn.cpp | 21 +- storage/connect/json.h | 2 +- storage/connect/jsonudf.cpp | 27 +- storage/connect/mongo.cpp | 98 +- storage/connect/mongo.h | 2 +- storage/connect/mycat.cc | 36 +- .../mysql-test/connect/r/json_java_2.result | 6 +- .../mysql-test/connect/r/json_java_3.result | 6 +- .../mysql-test/connect/r/json_mongo_c.result | 4 +- .../mysql-test/connect/r/mongo_c.result | 4 +- .../mysql-test/connect/r/mongo_java_2.result | 6 +- .../mysql-test/connect/r/mongo_java_3.result | 6 +- .../mysql-test/connect/r/odbc_firebird.result | 71 +- .../mysql-test/connect/t/mongo_test.inc | 6 +- storage/connect/plgdbutl.cpp | 13 +- storage/connect/plugutil.cpp | 2 +- storage/connect/preparse.h | 2 +- storage/connect/rcmsg.c | 7 +- storage/connect/rcmsg.h | 2 +- storage/connect/reldef.h | 4 +- storage/connect/tabjmg.cpp | 15 +- storage/connect/tabjson.cpp | 84 +- storage/connect/tabjson.h | 22 +- storage/connect/tabmul.cpp | 4 +- storage/connect/tabtbl.cpp | 2 +- storage/connect/tabutil.cpp | 4 +- storage/connect/tabxml.h | 2 + storage/connect/valblk.h | 2 +- storage/connect/value.cpp | 64 +- storage/connect/value.h | 2 +- storage/connect/xtable.h | 2 +- storage/federatedx/federatedx_io_mysql.cc | 9 +- storage/innobase/btr/btr0btr.cc | 2 +- storage/innobase/btr/btr0cur.cc | 14 +- storage/innobase/buf/buf0buf.cc | 54 +- storage/innobase/buf/buf0flu.cc | 3 - storage/innobase/buf/buf0lru.cc | 289 +- storage/innobase/dict/dict0dict.cc | 58 +- storage/innobase/dict/dict0stats_bg.cc | 2 +- storage/innobase/fil/fil0fil.cc | 185 +- storage/innobase/fil/fil0pagecompress.cc | 12 +- storage/innobase/fts/fts0fts.cc | 158 +- storage/innobase/fts/fts0opt.cc | 11 +- storage/innobase/fts/fts0que.cc | 9 +- storage/innobase/handler/ha_innodb.cc | 13 +- storage/innobase/handler/handler0alter.cc | 239 +- storage/innobase/handler/i_s.cc | 27 +- storage/innobase/ibuf/ibuf0ibuf.cc | 28 +- storage/innobase/include/buf0buf.h | 1 + storage/innobase/include/buf0lru.h | 18 +- storage/innobase/include/buf0types.h | 11 - storage/innobase/include/data0type.ic | 2 +- storage/innobase/include/dict0dict.h | 11 - storage/innobase/include/dict0dict.ic | 23 +- storage/innobase/include/dict0mem.h | 4 +- storage/innobase/include/dict0stats_bg.h | 4 +- storage/innobase/include/fil0fil.h | 15 +- storage/innobase/include/fts0fts.h | 17 +- storage/innobase/include/mtr0log.ic | 2 +- storage/innobase/include/row0merge.h | 7 +- storage/innobase/lock/lock0lock.cc | 6 +- storage/innobase/log/log0crypt.cc | 2 +- storage/innobase/os/os0file.cc | 46 +- storage/innobase/row/row0import.cc | 27 +- storage/innobase/row/row0ins.cc | 13 +- storage/innobase/row/row0log.cc | 29 +- storage/innobase/row/row0merge.cc | 45 +- storage/innobase/row/row0mysql.cc | 58 +- storage/innobase/row/row0quiesce.cc | 4 +- storage/innobase/row/row0sel.cc | 9 +- storage/innobase/row/row0umod.cc | 2 +- storage/innobase/row/row0upd.cc | 2 +- storage/innobase/srv/srv0srv.cc | 2 +- storage/innobase/trx/trx0purge.cc | 2 +- storage/innobase/trx/trx0rec.cc | 25 +- storage/innobase/trx/trx0trx.cc | 6 +- storage/innobase/trx/trx0undo.cc | 14 +- storage/innobase/ut/ut0dbg.cc | 2 +- storage/maria/ma_extra.c | 3 +- storage/maria/ma_loghandler.c | 2 +- storage/maria/ma_recovery.c | 2 +- storage/mroonga/CMakeLists.txt | 155 +- storage/mroonga/Makefile.am | 48 +- storage/mroonga/appveyor.yml | 69 +- storage/mroonga/autogen.sh | 115 +- .../mroonga/build/makefiles/sphinx-build.am | 2 - storage/mroonga/config.sh.in | 2 +- storage/mroonga/configure.ac | 38 +- storage/mroonga/data/install.sql.in | 16 + storage/mroonga/data/uninstall.sql | 4 + storage/mroonga/ha_mroonga.cpp | 2940 +- storage/mroonga/ha_mroonga.def | 3 + storage/mroonga/ha_mroonga.hpp | 183 +- .../mroonga/lib/libmrn_need_mysql_sources.am | 21 +- storage/mroonga/lib/mrn_column_name.cpp | 63 + storage/mroonga/lib/mrn_column_name.hpp | 38 + .../mroonga/lib/mrn_condition_converter.cpp | 53 +- .../mroonga/lib/mrn_condition_converter.hpp | 2 +- storage/mroonga/lib/mrn_context_pool.cpp | 120 + storage/mroonga/lib/mrn_context_pool.hpp | 41 + .../mroonga/lib/mrn_count_skip_checker.cpp | 303 + .../mroonga/lib/mrn_count_skip_checker.hpp | 57 + storage/mroonga/lib/mrn_current_thread.hpp | 27 + storage/mroonga/lib/mrn_database.cpp | 89 + storage/mroonga/lib/mrn_database.hpp | 47 + storage/mroonga/lib/mrn_database_manager.cpp | 76 +- storage/mroonga/lib/mrn_database_manager.hpp | 5 +- storage/mroonga/lib/mrn_database_repairer.cpp | 120 +- storage/mroonga/lib/mrn_database_repairer.hpp | 17 +- storage/mroonga/lib/mrn_index_table_name.cpp | 28 +- storage/mroonga/lib/mrn_index_table_name.hpp | 7 +- .../lib/mrn_multiple_column_key_codec.cpp | 9 + .../lib/mrn_multiple_column_key_codec.hpp | 4 +- storage/mroonga/lib/mrn_operation.cpp | 51 + storage/mroonga/lib/mrn_operation.hpp | 42 + storage/mroonga/lib/mrn_operations.cpp | 401 + storage/mroonga/lib/mrn_operations.hpp | 60 + storage/mroonga/lib/mrn_path_mapper.cpp | 4 + storage/mroonga/lib/mrn_path_mapper.hpp | 2 + storage/mroonga/lib/mrn_query_parser.cpp | 361 + storage/mroonga/lib/mrn_query_parser.hpp | 67 + storage/mroonga/lib/mrn_smart_bitmap.cpp | 42 + storage/mroonga/lib/mrn_smart_bitmap.hpp | 36 + .../lib/mrn_table_fields_offset_mover.cpp | 41 + .../lib/mrn_table_fields_offset_mover.hpp | 33 + storage/mroonga/mrn_err.h | 3 + storage/mroonga/mrn_mysql.h | 19 +- storage/mroonga/mrn_mysql_compat.h | 243 +- storage/mroonga/mrn_table.cpp | 68 +- storage/mroonga/mrn_variables.hpp | 24 + .../{have_64bit.inc => check_64bit.inc} | 9 +- .../mroonga/include/mroonga/check_freebsd.inc | 5 +- .../include/mroonga/check_ha_mroonga_so.inc | 2 +- .../mroonga/check_libgroonga_embedded.inc | 2 +- .../mroonga/check_libgroonga_support_lz4.inc | 2 +- .../mroonga/check_libgroonga_support_zlib.inc | 2 +- .../mroonga/check_libgroonga_support_zstd.inc | 20 + .../mroonga/include/mroonga/check_mariadb.inc | 2 +- .../mroonga/include/mroonga/check_osx.inc | 16 +- .../mroonga/include/mroonga/check_solaris.inc | 20 + .../include/mroonga/check_strict_sql_mode.inc | 21 + .../mroonga/include/mroonga/check_version.inc | 23 +- .../mroonga/include/mroonga/check_windows.inc | 2 +- .../mroonga/include/mroonga/have_32bit.inc | 28 - .../mroonga/have_fractional_seconds.inc | 6 +- .../mroonga/include/mroonga/have_freebsd.inc | 6 +- .../mroonga/have_groonga_plugin_register.inc | 4 +- .../mroonga/include/mroonga/have_mariadb.inc | 4 +- .../mroonga/have_mariadb_10_2_or_later.inc | 26 + .../mroonga/include/mroonga/have_mroonga.inc | 2 +- .../include/mroonga/have_mroonga_deinit.inc | 2 +- .../include/mroonga/have_mroonga_helper.inc | 2 +- .../mroonga/include/mroonga/have_mysql.inc | 4 +- .../mroonga/have_mysql_5_7_or_later.inc | 26 + .../mroonga/have_signed_64bit_time_t.inc | 28 + .../mroonga/include/mroonga/have_solaris.inc | 21 + .../include/mroonga/have_strict_sql_mode.inc | 21 + ...e_version_55.inc => have_version_10_0.inc} | 8 +- ...ter.inc => have_version_10_0_or_later.inc} | 8 +- ...e_version_100.inc => have_version_5_5.inc} | 8 +- ...ve_version_56.inc => have_version_5_6.inc} | 6 +- ...ater.inc => have_version_5_6_or_later.inc} | 6 +- ...ve_version_57.inc => have_version_5_7.inc} | 6 +- .../mroonga/have_version_5_7_or_later.inc | 21 + .../mroonga/load_mroonga_functions.inc | 8 +- .../mroonga/include/mroonga/skip_freebsd.inc | 6 +- .../mroonga/skip_mariadb_10_0_or_later.inc | 24 + ...p_mariadb_55.inc => skip_mariadb_10_1.inc} | 8 +- .../mroonga/skip_mariadb_10_1_or_earlier.inc | 24 + .../mroonga/skip_mariadb_10_2_or_later.inc | 24 + ..._100_or_later.inc => skip_mariadb_5_5.inc} | 8 +- .../{skip_mysql_55.inc => skip_mysql_5_5.inc} | 8 +- .../{skip_mysql_57.inc => skip_mysql_5_7.inc} | 6 +- .../mroonga/skip_mysql_5_7_or_later.inc | 24 + .../mroonga/include/mroonga/skip_osx.inc | 4 +- .../mroonga/skip_signed_64bit_time_t.inc | 28 + .../mroonga/include/mroonga/skip_solaris.inc | 21 + .../include/mroonga/skip_solaris10.inc | 3 - .../include/mroonga/skip_strict_sql_mode.inc | 21 + .../mroonga/support_libgroonga_lz4.inc | 4 +- .../mroonga/support_libgroonga_zlib.inc | 4 +- .../mroonga/support_libgroonga_zstd.inc | 22 + .../mroonga/unload_mroonga_functions.inc | 8 +- .../mroonga/unsupport_libgroonga_lz4.inc | 4 +- .../mroonga/unsupport_libgroonga_zlib.inc | 4 +- .../mroonga/unsupport_libgroonga_zstd.inc | 22 + .../r/alter_table_add_column_after.result | 10 +- .../r/alter_table_add_column_first.result | 10 +- ...lter_table_add_column_flags_comment.result | 5 + ...er_table_add_column_flags_parameter.result | 5 + ...ble_add_column_groonga_type_comment.result | 11 +- ...e_add_column_groonga_type_parameter.result | 14 +- ...er_table_add_column_multibyte_cp932.result | 35 + ...ter_table_add_column_multibyte_utf8.result | 35 + .../r/alter_table_add_column_multiple.result | 10 +- .../r/alter_table_add_column_plain.result | 10 +- ...alter_table_add_column_type_comment.result | 11 +- ...ndex_token_filters_one_token_filter.result | 9 +- ...er_table_change_column_rename_after.result | 14 +- ...er_table_change_column_rename_first.result | 14 +- ...table_change_column_rename_multiple.result | 24 +- ...table_change_column_rename_no_order.result | 14 +- ... alter_table_change_engine_decimal.result} | 25 +- ...table_change_engine_fulltext_index.result} | 30 +- .../r/alter_table_change_token_filter.result | 23 +- ...r_table_disable_keys_fulltext_table.result | 22 +- .../r/alter_table_drop_column_multiple.result | 8 +- .../r/alter_table_drop_column_one.result | 10 +- ...er_table_enable_keys_fulltext_table.result | 22 +- .../r/alter_table_fulltext_add_normal.result | 10 +- .../r/alter_table_modify_column_after.result | 14 +- .../r/alter_table_modify_column_first.result | 14 +- .../alter_table_modify_column_no_order.result | 10 +- ...le_recreate_anonymous_index_at_once.result | 18 - .../storage/r/alter_table_rename_table.result | 30 +- .../storage/r/alter_table_spatial.result | 4 +- .../storage/r/check_table_broken.result | 18 + .../storage/r/check_table_not_broken.result | 13 + .../storage/r/column_date_with_index.result | 4 +- .../r/column_date_without_index.result | 4 +- .../r/column_datetime_32bit_2038.result | 8 - ...mn_datetime_32bit_before_unix_epoch.result | 8 - .../r/column_datetime_32bit_max.result | 8 - .../column_datetime_32bit_out_of_range.result | 8 - .../r/column_datetime_64bit_2038.result | 8 - ...mn_datetime_64bit_before_unix_epoch.result | 12 +- .../r/column_datetime_64bit_max.result | 8 - ..._64bit_strict_sql_mode_out_of_range.result | 12 + ...ime_64bit_version_5_5_out_of_range.result} | 8 - ..._version_5_6_or_later_out_of_range.result} | 8 - ...etime_fractional_seconds_with_index.result | 9 - ...me_fractional_seconds_without_index.result | 8 - ..._datetime_freebsd_before_unix_epoch.result | 8 - ...me_mariadb_10_2_or_later_zero_date.result} | 9 - ...ariadb_10_2_or_later_zero_month_day.result | 12 + ...tetime_mysql_5_7_or_later_zero_date.result | 14 + ...e_mysql_5_7_or_later_zero_month_day.result | 12 + .../storage/r/column_datetime_null.result | 8 - .../r/column_datetime_with_index.result | 9 - .../r/column_datetime_without_index.result | 8 - .../r/column_datetime_zero_date.result | 25 +- .../r/column_datetime_zero_month_day.result | 20 + ...cimal_fractional_seconds_with_index.result | 9 - ...al_fractional_seconds_without_index.result | 8 - .../r/column_decimal_with_index.result | 9 - .../r/column_decimal_without_index.result | 8 - .../column_generated_stored_add_column.result | 15 + .../r/column_generated_stored_delete.result | 15 + ...column_generated_stored_drop_column.result | 17 + .../r/column_generated_stored_insert.result | 15 + .../r/column_generated_stored_reindex.result | 17 + .../r/column_generated_stored_update.result | 15 + ...column_generated_virtual_add_column.result | 15 + .../r/column_generated_virtual_delete.result | 15 + ...olumn_generated_virtual_drop_column.result | 16 + .../r/column_generated_virtual_insert.result | 15 + ...ual_mariadb_10_2_or_later_add_index.result | 9 + ..._2_or_later_create_table_with_index.result | 8 + ...irtual_mysql_5_7_or_later_add_index.result | 9 + .../r/column_generated_virtual_update.result | 16 + ...a_index_fulltext_vector_other_table.result | 11 +- ...olumn_groonga_index_int_other_table.result | 13 +- .../column_groonga_scalar_support_zstd.result | 10 + ...olumn_groonga_scalar_unsupport_zstd.result | 12 + .../r/column_groonga_vector_reference.result | 9 +- .../storage/r/column_json_insert.result | 13 + .../storage/r/column_multibyte_cp932.result | 32 + .../storage/r/column_multibyte_utf8.result | 32 + ..._time_fractional_seconds_with_index.result | 10 - .../storage/r/column_time_with_index.result | 10 - ...stamp_fractional_seconds_with_index.result | 10 - .../r/column_timestamp_with_index.result | 14 +- .../storage/r/column_year_with_index.result | 9 - .../r/column_year_without_index.result | 8 - .../mroonga/storage/r/count_star.result | 11 + ... create_table_column_flags_comment.result} | 5 + ...reate_table_column_flags_parameter.result} | 12 +- ..._table_column_groonga_type_comment.result} | 11 +- ...le_column_groonga_type_nonexistent.result} | 0 ...able_column_groonga_type_parameter.result} | 14 +- ...> create_table_column_type_comment.result} | 11 +- ...eate_table_column_type_nonexistent.result} | 0 .../r/create_table_default_tokenizer.result | 5 + .../r/create_table_index_flags_comment.result | 2 +- ...eate_table_index_flags_index_medium.result | 10 + ...reate_table_index_flags_index_small.result | 10 + .../r/create_table_index_flags_none.result | 2 +- .../create_table_index_flags_parameter.result | 2 +- ...create_table_index_index_flags_none.result | 2 +- ...flags_with_position_and_with_weight.result | 2 +- ...index_normalizer_fulltext_index_bin.result | 16 + ...te_table_index_normalizer_index_bin.result | 22 + .../create_table_index_parser_comment.result | 14 +- .../create_table_index_parser_default.result | 8 - .../r/create_table_index_parser_off.result | 14 +- ...oken_filters_multiple_token_filters.result | 9 +- ...ndex_token_filters_one_token_filter.result | 9 +- ...table_index_token_filters_parameter.result | 9 +- ...reate_table_index_tokenizer_comment.result | 8 - ...reate_table_index_tokenizer_default.result | 8 - .../r/create_table_index_tokenizer_off.result | 8 - ...ate_table_index_tokenizer_parameter.result | 8 - ...oken_filters_multiple_token_filters.result | 13 +- ...able_token_filters_one_token_filter.result | 13 +- .../storage/r/drop_database_no_table.result | 20 + .../storage/r/foreign_key_alter_add.result | 21 + .../storage/r/foreign_key_alter_drop.result | 21 + .../storage/r/foreign_key_create.result | 147 +- .../r/foreign_key_delete_existent.result | 53 + .../r/foreign_key_delete_nonexistent.result | 53 + .../r/foreign_key_insert_existent.result | 51 + .../r/foreign_key_insert_nonexistent.result | 37 + .../storage/r/foreign_key_rename.result | 28 + .../r/foreign_key_update_existent.result | 55 + .../r/foreign_key_update_nonexistent.result | 53 + .../r/fulltext_boolean_mode_escape.result | 4 +- .../fulltext_boolean_mode_leading_not.result | 9 - ..._mode_pragma_syntax_script_operator.result | 20 + ..._mode_pragma_syntax_script_selector.result | 25 + ...ext_boolean_mode_syntax_error_error.result | 4 +- ...ean_mode_syntax_error_error_and_log.result | 4 +- ...xt_boolean_mode_syntax_error_ignore.result | 4 +- ...an_mode_syntax_error_ignore_and_log.result | 4 +- .../storage/r/fulltext_charset_utf8mb4.result | 9 - .../storage/r/fulltext_found_rows.result | 13 - .../storage/r/fulltext_index_recreate.result | 9 - .../storage/r/fulltext_insert_values.result | 8 - ...lltext_multiple_column_index_delete.result | 11 - ...lltext_multiple_column_index_insert.result | 11 - ...text_multiple_column_index_recreate.result | 11 - ...lltext_multiple_column_index_update.result | 11 - .../storage/r/fulltext_multiple_index.result | 10 - .../storage/r/fulltext_no_primary_key.result | 7 - ... fulltext_version_10_0_no_such_key.result} | 0 ...> fulltext_version_5_5_no_such_key.result} | 0 ...> fulltext_version_5_6_no_such_key.result} | 0 .../r/function_command_auto-escape.result | 16 + ...ction_command_special-database-name.result | 22 + ...on_escape_error_query_is_not_string.result | 2 +- ...esult => function_escape_query_all.result} | 0 ...lt => function_escape_query_custom.result} | 0 .../r/function_escape_query_join.result | 26 + ...function_escape_query_match_against.result | 18 + .../r/function_escape_query_named.result | 4 + ...lt => function_escape_query_nested.result} | 0 .../r/function_escape_script_decimal.result | 11 + .../r/function_escape_script_integer.result | 4 + .../r/function_escape_script_real.result | 11 + .../r/function_escape_script_string.result | 4 + ...tion_highlight_html_dynamic_keyword.result | 11 + .../r/function_highlight_html_japanese.result | 13 + ...on_highlight_html_multiple_keywords.result | 4 + .../function_highlight_html_normalizer.result | 4 + .../r/function_highlight_html_query.result | 13 + ...unction_highlight_html_query_pragma.result | 13 + .../r/function_highlight_html_record.result | 32 + .../r/function_normalize_default.result | 3 + .../r/function_normalize_normalizer.result | 3 + .../r/function_normalize_record.result | 7 + .../r/function_query_expand_multiple.result | 18 + .../r/function_query_expand_no_index.result | 15 + .../r/function_query_expand_one.result | 16 + .../r/function_query_expand_pragma.result | 17 + ...nction_snippet_html_dynamic_keyword.result | 11 + .../r/function_snippet_html_japanese.result | 9 + ...tion_snippet_html_multiple_keywords.result | 4 + ...tion_snippet_html_multiple_snippets.result | 10 + .../r/function_snippet_html_query.result | 9 + .../function_snippet_html_query_pragma.result | 9 + .../r/function_snippet_html_record.result | 30 + .../storage/r/geometry_contains.result | 15 +- ...y_strict_sql_mode_bulk_insert_null.result} | 7 +- .../geometry_strict_sql_mode_contains.result | 169 + .../storage/r/index_hash_id_primary.result | 22 +- ...dex_hash_strict_sql_mode_id_primary.result | 19 + ...column_order_by_where_equal_asc_asc.result | 40 + ...lumn_order_by_where_equal_desc_desc.result | 40 + ...lumn_primary_strict_sql_mode_update.result | 26 + ...ndex_multiple_column_primary_update.result | 39 +- ...column_range_all_used_greater_than.result} | 0 ...nge_all_used_greater_than_or_equal.result} | 0 ...le_column_range_all_used_less_than.result} | 0 ..._range_all_used_less_than_or_equal.result} | 0 ...ially_used_have_prefix_greater_than.result | 34 + ...d_have_prefix_greater_than_or_equal.result | 35 + ...artially_used_have_prefix_less_than.result | 34 + ...used_have_prefix_less_than_or_equal.result | 35 + ...rtially_used_no_prefix_greater_than.result | 29 + ...sed_no_prefix_greater_than_or_equal.result | 30 + ..._partially_used_no_prefix_less_than.result | 30 + ...y_used_no_prefix_less_than_or_equal.result | 31 + .../r/index_multiple_column_select_max.result | 20 + .../r/index_multiple_column_select_min.result | 20 + ...iple_column_unique_date_64bit_equal.result | 10 +- ...tiple_column_unique_date_index_read.result | 12 +- ..._column_unique_date_order_64bit_asc.result | 12 +- ...column_unique_date_order_64bit_desc.result | 12 +- ...e_column_unique_datetime_index_read.result | 12 +- ...le_column_unique_datetime_order_asc.result | 12 +- ...e_column_unique_datetime_order_desc.result | 12 +- ..._column_unique_timestamp_index_read.result | 4 +- ...e_column_unique_timestamp_order_asc.result | 4 +- ..._column_unique_timestamp_order_desc.result | 4 +- ...le_column_unique_timestamp_reinsert.result | 4 +- .../storage/r/index_primary_date.result | 7 - ...ry_datetime_with_fractional_seconds.result | 7 - ...datetime_without_fractional_seconds.result | 7 - ...ary_decimal_with_fractional_seconds.result | 7 - ..._decimal_without_fractional_seconds.result | 7 - ...rimary_time_with_fractional_seconds.result | 7 - ...ary_time_without_fractional_seconds.result | 7 - ...y_timestamp_with_fractional_seconds.result | 7 - ...imestamp_without_fractional_seconds.result | 7 - .../storage/r/index_primary_year.result | 7 - .../storage/r/index_unique_delete_all.result | 14 + ...formation_schema_tables_data_length.result | 9 - .../storage/r/insert_TODO_SPLIT_ME.result | 12 - ...on_duplicate_key_update_primary_key.result | 7 - ..._on_duplicate_key_update_unique_key.result | 9 - .../storage/r/insert_virtual_column.result | 13 + ...timization_count_skip_TODO_SPLIT_ME.result | 106 - .../r/optimization_count_skip_disabled.result | 8 - .../optimization_count_skip_index_and.result | 20 + ...timization_count_skip_index_between.result | 18 + ...optimization_count_skip_index_equal.result | 18 + ...ex_full_text_search_in_boolean_mode.result | 19 + ...ext_search_in_natural_language_mode.result | 19 + ...timization_count_skip_index_greater.result | 18 + ...tion_count_skip_index_greater_equal.result | 18 + .../optimization_count_skip_index_less.result | 18 + ...ization_count_skip_index_less_equal.result | 18 + ...mization_count_skip_index_not_equal.result | 18 + ...tion_count_skip_multiple_conditions.result | 17 + ...tion_count_skip_primary_key_between.result | 17 + ...zation_count_skip_primary_key_equal.result | 17 + ...tion_count_skip_primary_key_greater.result | 17 + ...ount_skip_primary_key_greater_equal.result | 17 + ...ization_count_skip_primary_key_less.result | 17 + ...n_count_skip_primary_key_less_equal.result | 17 + ...on_count_skip_primary_key_not_equal.result | 17 + ..._order_limit_not_optimized_disabled.result | 13 - ...t_optimized_multiple_match_againsts.result | 35 + ..._order_limit_not_optimized_no_limit.result | 13 - ...ization_order_limit_optimized_cp932.result | 22 + ...er_limit_optimized_datetime_between.result | 9 - ...mit_optimized_datetime_between_over.result | 9 - ...rder_limit_optimized_datetime_equal.result | 9 - ...mit_optimized_datetime_greater_than.result | 9 - ...ized_datetime_greater_than_or_equal.result | 9 - ..._limit_optimized_datetime_less_than.result | 9 - ...timized_datetime_less_than_or_equal.result | 9 - ...ion_order_limit_optimized_enum_name.result | 25 + ...on_order_limit_optimized_enum_value.result | 25 + ...er_limit_optimized_have_primary_key.result | 13 - ...ion_order_limit_optimized_int_equal.result | 13 - ...er_limit_optimized_int_greater_than.result | 13 - ...optimized_int_greater_than_or_equal.result | 13 - ...order_limit_optimized_int_less_than.result | 13 - ...it_optimized_int_less_than_or_equal.result | 13 - ...rder_limit_optimized_no_primary_key.result | 12 - ..._order_limit_optimized_order_by_asc.result | 13 - ...order_limit_optimized_order_by_desc.result | 13 - ...n_order_limit_optimized_order_by_id.result | 14 - ...it_optimized_order_by_match_against.result | 13 - ...imit_optimized_select_match_against.result | 13 - ..._order_limit_optimized_time_between.result | 9 - ...r_limit_optimized_time_between_over.result | 9 - ...on_order_limit_optimized_time_equal.result | 9 - ...r_limit_optimized_time_greater_than.result | 9 - ...ptimized_time_greater_than_or_equal.result | 9 - ...rder_limit_optimized_time_less_than.result | 9 - ...t_optimized_time_less_than_or_equal.result | 9 - ..._optimized_varchar_equal_with_index.result | 14 - ...timized_varchar_equal_without_index.result | 13 - .../r/repair_table_no_index_file.result | 11 +- .../mroonga/storage/r/replace_text.result | 8 - .../mroonga/storage/r/replace_varchar.result | 8 - .../r/select_group_by_with_index.result | 8 +- .../r/select_group_by_without_index.result | 11 +- .../storage/r/sub_query_fulltext.result | 9 - .../mroonga/storage/r/temporary_table.result | 7 - .../mroonga/storage/r/truncate.result | 13 - .../storage/r/update_binlog_row.result | 16 + .../storage/r/update_virtual_column.result | 27 +- ...ariable_default_tokenizer_new_value.result | 6 + ...riable_default_tokenizer_same_value.result | 4 + .../r/variable_dry_write_delete.result | 8 - .../r/variable_dry_write_insert.result | 8 - .../r/variable_dry_write_update.result | 8 - ..._enable_operations_recording_insert.result | 32 + ...e_match_escalation_threshold_global.result | 29 +- ..._match_escalation_threshold_session.result | 11 +- ...estimate_mysql_5_7_or_later_global.result} | 6 +- ...sql_5_7_or_later_not_found_in_limit.result | 17 + ...estimate_mysql_5_7_or_later_session.result | 22 + ...rds_for_estimate_not_found_in_limit.result | 15 + ...query_log_file_disabled_empty_value.result | 9 + ..._query_log_file_disabled_null_value.result | 9 + ..._query_log_file_enabled_empty_value.result | 10 + ...e_query_log_file_enabled_null_value.result | 10 + .../variable_query_log_file_new_value.result | 9 + .../variable_query_log_file_same_value.result | 10 + .../mysql-test/mroonga/storage/suite.pm | 2 +- .../t/alter_table_add_column_after.test | 6 +- .../t/alter_table_add_column_first.test | 6 +- .../alter_table_add_column_flags_comment.test | 2 +- ...lter_table_add_column_flags_parameter.test | 2 +- ...table_add_column_groonga_type_comment.test | 2 +- ...ble_add_column_groonga_type_parameter.test | 4 +- ...lter_table_add_column_multibyte_cp932.test | 53 + ...alter_table_add_column_multibyte_utf8.test | 53 + .../t/alter_table_add_column_multiple.test | 6 +- .../t/alter_table_add_column_plain.test | 6 +- .../alter_table_add_column_type_comment.test | 2 +- ..._index_token_filters_one_token_filter.test | 2 +- ...ter_table_add_index_unique_duplicated.test | 2 +- ...dex_unique_multiple_column_duplicated.test | 2 +- ...ble_add_key_multiple_column_with_data.test | 2 +- .../t/alter_table_add_primary_key.test | 2 +- ...change_column_comment_not_for_mroonga.test | 2 +- .../alter_table_change_column_have_index.test | 2 +- ...lter_table_change_column_rename_after.test | 8 +- ...lter_table_change_column_rename_first.test | 8 +- ...r_table_change_column_rename_multiple.test | 12 +- ...r_table_change_column_rename_no_order.test | 8 +- ...=> alter_table_change_engine_decimal.test} | 9 +- ...r_table_change_engine_fulltext_index.test} | 10 +- .../t/alter_table_change_token_filter.test | 2 +- ...er_table_disable_keys_create_fulltext.test | 2 +- ...ter_table_disable_keys_fulltext_table.test | 2 +- ...lter_table_disable_keys_fulltext_ujis.test | 2 +- ...lter_table_disable_keys_fulltext_utf8.test | 2 +- ...er_table_disable_keys_multiple_column.test | 2 +- .../t/alter_table_disable_keys_normal.test | 2 +- .../t/alter_table_disable_keys_primary.test | 2 +- .../t/alter_table_disable_keys_truncate.test | 2 +- .../t/alter_table_disable_keys_updating.test | 2 +- .../t/alter_table_drop_column_multiple.test | 6 +- .../t/alter_table_drop_column_one.test | 6 +- ...le_drop_key_multiple_column_with_data.test | 2 +- .../t/alter_table_drop_primary_key.test | 2 +- .../t/alter_table_enable_keys_fulltext.test | 2 +- ...lter_table_enable_keys_fulltext_table.test | 2 +- ...alter_table_enable_keys_fulltext_ujis.test | 2 +- ...alter_table_enable_keys_fulltext_utf8.test | 2 +- ...ter_table_enable_keys_multiple_column.test | 2 +- .../t/alter_table_enable_keys_normal.test | 2 +- .../t/alter_table_enable_keys_primary.test | 2 +- ...ter_table_fulltext_add_no_primary_key.test | 2 +- .../t/alter_table_fulltext_add_normal.test | 5 +- .../t/alter_table_fulltext_add_table.test | 2 +- .../t/alter_table_fulltext_drop_table.test | 2 +- .../t/alter_table_modify_column_after.test | 8 +- .../t/alter_table_modify_column_first.test | 8 +- .../t/alter_table_modify_column_no_order.test | 6 +- ...able_recreate_anonymous_index_at_once.test | 5 +- .../storage/t/alter_table_rename_table.test | 10 +- .../storage/t/alter_table_spatial.test | 6 +- .../t/auto_increment_TODO_SPLIT_ME.test | 2 +- .../storage/t/auto_increment_table_param.test | 2 +- .../storage/t/auto_increment_text.test | 2 +- .../storage/t/binlog_TODO_SPLIT_ME.test | 2 +- .../mroonga/storage/t/check_table_broken.test | 45 + .../storage/t/check_table_not_broken.test | 38 + .../t/collation_utf8_general_ci_french.test | 2 +- .../collation_utf8_unicode_520_ci_french.test | 4 +- ...ollation_utf8_unicode_520_ci_japanese.test | 4 +- .../t/collation_utf8_unicode_ci_french.test | 2 +- .../t/collation_utf8_unicode_ci_japanese.test | 2 +- .../column_comment_index_not_for_mroonga.test | 2 +- ...column_comment_normal_not_for_mroonga.test | 2 +- .../storage/t/column_date_with_index.test | 4 +- .../storage/t/column_date_without_index.test | 4 +- .../storage/t/column_date_zero_date.test | 4 +- .../storage/t/column_datetime_32bit_2038.test | 5 +- ...lumn_datetime_32bit_before_unix_epoch.test | 5 +- .../storage/t/column_datetime_32bit_max.test | 5 +- .../t/column_datetime_32bit_out_of_range.test | 5 +- .../storage/t/column_datetime_64bit_2038.test | 5 +- ...lumn_datetime_64bit_before_unix_epoch.test | 9 +- .../storage/t/column_datetime_64bit_max.test | 5 +- ...e_64bit_strict_sql_mode_out_of_range.test} | 9 +- ...etime_64bit_version_5_5_out_of_range.test} | 7 +- ...bit_version_5_6_or_later_out_of_range.test | 41 + ...atetime_fractional_seconds_with_index.test | 3 +- ...time_fractional_seconds_without_index.test | 3 +- ...mn_datetime_freebsd_before_unix_epoch.test | 3 +- ...time_mariadb_10_2_or_later_zero_date.test} | 8 +- ..._mariadb_10_2_or_later_zero_month_day.test | 39 + ...datetime_mysql_5_7_or_later_zero_date.test | 39 + ...ime_mysql_5_7_or_later_zero_month_day.test | 39 + .../storage/t/column_datetime_null.test | 3 +- .../storage/t/column_datetime_with_index.test | 3 +- .../t/column_datetime_without_index.test | 3 +- .../storage/t/column_datetime_zero_date.test | 16 +- .../t/column_datetime_zero_month_day.test | 39 + ...decimal_fractional_seconds_with_index.test | 3 +- ...imal_fractional_seconds_without_index.test | 3 +- .../storage/t/column_decimal_with_index.test | 3 +- .../t/column_decimal_without_index.test | 3 +- .../t/column_enum_less_with_index.test | 2 +- .../t/column_enum_many_with_index.test | 2 +- .../t/column_generated_stored_add_column.test | 42 + .../t/column_generated_stored_delete.test | 42 + .../column_generated_stored_drop_column.test | 42 + .../t/column_generated_stored_insert.test | 40 + .../t/column_generated_stored_reindex.test | 42 + .../t/column_generated_stored_update.test | 42 + .../column_generated_virtual_add_column.test | 41 + .../t/column_generated_virtual_delete.test | 41 + .../column_generated_virtual_drop_column.test | 41 + .../t/column_generated_virtual_insert.test | 39 + ...rtual_mariadb_10_2_or_later_add_index.test | 35 + ...10_2_or_later_create_table_with_index.test | 32 + ..._virtual_mysql_5_7_or_later_add_index.test | 35 + .../t/column_generated_virtual_update.test | 41 + .../storage/t/column_groonga__id__id.test | 2 +- .../t/column_groonga__id_invalid_id.test | 2 +- ...mn_groonga_index_fulltext_other_table.test | 2 +- ...nga_index_fulltext_vector_other_table.test | 2 +- .../column_groonga_index_int_other_table.test | 2 +- .../t/column_groonga_scalar_reference.test | 2 +- .../t/column_groonga_scalar_support_lz4.test | 2 +- .../t/column_groonga_scalar_support_zlib.test | 2 +- .../t/column_groonga_scalar_support_zstd.test | 37 + .../column_groonga_scalar_unsupport_lz4.test | 2 +- .../column_groonga_scalar_unsupport_zlib.test | 2 +- .../column_groonga_scalar_unsupport_zstd.test | 37 + ...a_scalar_with_not_for_mroonga_comment.test | 2 +- ...groonga_vector_order_by_with_function.test | 2 +- .../t/column_groonga_vector_reference.test | 7 +- .../t/column_int_with_index_zero_value.test | 2 +- .../mroonga/storage/t/column_json_insert.test | 37 + .../storage/t/column_multibyte_cp932.test | 51 + .../storage/t/column_multibyte_utf8.test | 51 + .../storage/t/column_set_16_with_index.test | 2 +- .../storage/t/column_set_24_with_index.test | 2 +- .../storage/t/column_set_32_with_index.test | 2 +- .../storage/t/column_set_64_with_index.test | 2 +- .../storage/t/column_set_8_with_index.test | 2 +- .../t/column_signed_bigint_with_index.test | 2 +- .../t/column_signed_int_with_index.test | 2 +- .../t/column_signed_mediumint_with_index.test | 2 +- .../t/column_signed_smallint_with_index.test | 2 +- .../t/column_signed_tinyint_with_index.test | 2 +- ...mn_time_fractional_seconds_with_index.test | 3 +- .../storage/t/column_time_with_index.test | 3 +- ...mestamp_fractional_seconds_with_index.test | 5 +- .../t/column_timestamp_with_index.test | 9 +- .../t/column_tinyint_without_index.test | 2 +- .../t/column_unsigned_bigint_with_index.test | 2 +- .../column_unsigned_bigint_without_index.test | 2 +- .../t/column_unsigned_int_with_index.test | 2 +- .../column_unsigned_mediumint_with_index.test | 2 +- .../column_unsigned_smallint_with_index.test | 2 +- .../t/column_unsigned_tinyint_with_index.test | 2 +- .../storage/t/column_year_with_index.test | 3 +- .../storage/t/column_year_without_index.test | 3 +- .../mroonga/storage/t/count_star.test | 35 + .../storage/t/create_database_name_slash.test | 2 +- .../storage/t/create_table_TODO_SPLIT_ME.test | 4 +- ...=> create_table_column_flags_comment.test} | 2 +- ... create_table_column_flags_parameter.test} | 3 +- ...te_table_column_groonga_type_comment.test} | 2 +- ...able_column_groonga_type_nonexistent.test} | 2 +- ..._table_column_groonga_type_parameter.test} | 4 +- ... => create_table_column_type_comment.test} | 2 +- ...create_table_column_type_nonexistent.test} | 2 +- .../t/create_table_comment_normal.test | 2 +- .../t/create_table_default_tokenizer.test | 2 +- .../t/create_table_index_flags_comment.test | 2 +- ...create_table_index_flags_index_medium.test | 39 + .../create_table_index_flags_index_small.test | 39 + .../t/create_table_index_flags_none.test | 2 +- .../t/create_table_index_flags_parameter.test | 2 +- .../create_table_index_index_flags_none.test | 2 +- ...x_flags_with_position_and_with_weight.test | 2 +- ...create_table_index_normalizer_comment.test | 2 +- ...e_index_normalizer_fulltext_index_bin.test | 42 + ...eate_table_index_normalizer_index_bin.test | 37 + ..._no_utf8_charset_with_utf8_normalizer.test | 2 +- .../t/create_table_index_normalizer_none.test | 2 +- ...eate_table_index_normalizer_parameter.test | 2 +- .../t/create_table_index_parser_comment.test | 4 +- .../t/create_table_index_parser_default.test | 3 +- .../t/create_table_index_parser_off.test | 4 +- ..._token_filters_multiple_token_filters.test | 2 +- ..._index_token_filters_one_token_filter.test | 2 +- ...e_table_index_token_filters_parameter.test | 2 +- .../create_table_index_tokenizer_comment.test | 3 +- .../create_table_index_tokenizer_default.test | 3 +- .../t/create_table_index_tokenizer_off.test | 3 +- ...reate_table_index_tokenizer_parameter.test | 3 +- ...create_table_table_normalizer_default.test | 2 +- .../t/create_table_table_normalizer_hash.test | 2 +- ..._token_filters_multiple_token_filters.test | 2 +- ..._table_token_filters_one_token_filter.test | 2 +- ...e_table_table_token_filters_stop_word.test | 2 +- .../storage/t/delete_fulltext_column.test | 2 +- .../t/delete_index_btree_many_records.test | 2 +- .../t/delete_index_hash_id_no_unique.test | 2 +- .../t/delete_index_hash_id_unique.test | 2 +- .../storage/t/delete_normal_column.test | 2 +- .../storage/t/delete_unsigned_bigint.test | 2 +- .../t/drop_database_TODO_SPLIT_ME.test | 2 +- .../storage/t/drop_database_no_table.test | 57 + .../storage/t/drop_table_TODO_SPLIT_ME.test | 2 +- .../mroonga/storage/t/flush_logs.test | 2 +- .../storage/t/foreign_key_alter_add.test | 47 + .../storage/t/foreign_key_alter_drop.test | 48 + .../mroonga/storage/t/foreign_key_create.test | 97 +- .../t/foreign_key_delete_existent.test | 53 + .../t/foreign_key_delete_nonexistent.test | 53 + .../t/foreign_key_insert_existent.test | 51 + .../t/foreign_key_insert_nonexistent.test | 51 + .../mroonga/storage/t/foreign_key_rename.test | 51 + .../t/foreign_key_update_existent.test | 53 + .../t/foreign_key_update_nonexistent.test | 53 + .../t/fulltext_boolean_mode_empty_query.test | 2 +- .../t/fulltext_boolean_mode_escape.test | 6 +- .../t/fulltext_boolean_mode_leading_not.test | 3 +- .../t/fulltext_boolean_mode_pragma_all.test | 2 +- ...ma_default_operator_minus_no_operator.test | 2 +- ...pragma_default_operator_minus_with_or.test | 2 +- ...agma_default_operator_minus_with_plus.test | 2 +- ...ragma_default_operator_or_no_operator.test | 2 +- ...pragma_default_operator_or_with_minus.test | 2 +- ..._pragma_default_operator_or_with_plus.test | 2 +- ...gma_default_operator_plus_no_operator.test | 2 +- ...a_default_operator_plus_with_astarisk.test | 2 +- ...agma_default_operator_plus_with_minus.test | 2 +- ..._pragma_default_operator_plus_with_or.test | 2 +- ...an_mode_pragma_syntax_script_operator.test | 43 + ...an_mode_pragma_syntax_script_selector.test | 50 + ..._boolean_mode_pragma_weight_full_spec.test | 2 +- ..._boolean_mode_pragma_weight_no_weight.test | 2 +- ...olean_mode_pragma_weight_omit_section.test | 2 +- ...de_pragma_weight_ten_or_more_sections.test | 2 +- ..._pragma_weight_three_or_more_sections.test | 2 +- ...ltext_boolean_mode_syntax_error_error.test | 6 +- ...olean_mode_syntax_error_error_and_log.test | 6 +- ...text_boolean_mode_syntax_error_ignore.test | 6 +- ...lean_mode_syntax_error_ignore_and_log.test | 6 +- .../storage/t/fulltext_charset_ascii.test | 2 +- .../storage/t/fulltext_charset_cp932.test | 2 +- .../storage/t/fulltext_charset_eucjpms.test | 2 +- .../storage/t/fulltext_charset_japanese.test | 2 +- .../storage/t/fulltext_charset_utf8mb4.test | 3 +- .../storage/t/fulltext_empty_query.test | 2 +- .../storage/t/fulltext_found_rows.test | 3 +- .../t/fulltext_groonga_varchar_vector.test | 2 +- .../storage/t/fulltext_index_recreate.test | 3 +- .../storage/t/fulltext_insert_select.test | 2 +- .../storage/t/fulltext_insert_values.test | 3 +- ...fulltext_multiple_column_index_delete.test | 3 +- ...fulltext_multiple_column_index_insert.test | 3 +- ...lltext_multiple_column_index_recreate.test | 3 +- ...fulltext_multiple_column_index_update.test | 3 +- .../storage/t/fulltext_multiple_index.test | 3 +- .../storage/t/fulltext_no_primary_key.test | 3 +- .../storage/t/fulltext_not_match_against.test | 2 +- .../mroonga/storage/t/fulltext_or.test | 2 +- ..._order_boolean_mode_different_against.test | 2 +- ...xt_order_boolean_mode_different_match.test | 2 +- .../fulltext_order_boolean_mode_no_where.test | 2 +- ...order_boolean_mode_same_match_against.test | 2 +- ...ltext_order_natural_language_mode_asc.test | 2 +- ...text_order_natural_language_mode_desc.test | 2 +- ...tural_language_mode_different_against.test | 2 +- ...natural_language_mode_different_match.test | 2 +- ..._order_natural_language_mode_no_where.test | 2 +- ...ural_language_mode_same_match_against.test | 2 +- .../storage/t/fulltext_two_inner_join.test | 2 +- ...=> fulltext_version_10_0_no_such_key.test} | 4 +- ... => fulltext_version_5_5_no_such_key.test} | 4 +- ... => fulltext_version_5_6_no_such_key.test} | 4 +- .../t/function_command_auto-escape.test | 41 + .../storage/t/function_command_select.test | 2 +- ...unction_command_special-database-name.test | 43 + ...unction_escape_error_query_is_missing.test | 2 +- ...tion_escape_error_query_is_not_string.test | 2 +- ...error_target_characters_is_not_string.test | 2 +- ...ll.test => function_escape_query_all.test} | 2 +- ...test => function_escape_query_custom.test} | 2 +- .../storage/t/function_escape_query_join.test | 54 + .../function_escape_query_match_against.test | 46 + .../t/function_escape_query_named.test | 26 + ...test => function_escape_query_nested.test} | 2 +- .../t/function_escape_script_decimal.test | 39 + .../t/function_escape_script_integer.test | 26 + .../t/function_escape_script_real.test | 39 + .../t/function_escape_script_string.test | 26 + ...nction_highlight_html_dynamic_keyword.test | 45 + .../t/function_highlight_html_japanese.test | 31 + ...tion_highlight_html_multiple_keywords.test | 25 + .../t/function_highlight_html_normalizer.test | 25 + .../t/function_highlight_html_query.test | 31 + .../function_highlight_html_query_pragma.test | 31 + .../t/function_highlight_html_record.test | 55 + .../t/function_last_insert_grn_id.test | 2 +- .../t/function_last_insert_id_reference.test | 2 +- .../t/function_last_insert_id_set.test | 2 +- .../storage/t/function_normalize_default.test | 24 + .../t/function_normalize_normalizer.test | 24 + .../storage/t/function_normalize_record.test | 40 + .../t/function_query_expand_multiple.test | 46 + .../t/function_query_expand_no_index.test | 43 + .../storage/t/function_query_expand_one.test | 44 + .../t/function_query_expand_pragma.test | 45 + .../storage/t/function_snippet_ascii.test | 2 +- .../storage/t/function_snippet_cp932.test | 2 +- .../storage/t/function_snippet_eucjpms.test | 2 +- ...function_snippet_html_dynamic_keyword.test | 45 + .../t/function_snippet_html_japanese.test | 31 + ...nction_snippet_html_multiple_keywords.test | 25 + ...nction_snippet_html_multiple_snippets.test | 29 + .../t/function_snippet_html_query.test | 31 + .../t/function_snippet_html_query_pragma.test | 31 + .../t/function_snippet_html_record.test | 55 + ...n_snippet_invalid_nonexistent_charset.test | 2 +- ...n_snippet_invalid_unsupported_charset.test | 2 +- .../storage/t/function_snippet_japanese.test | 2 +- .../storage/t/geometry_bulk_insert_null.test | 6 +- .../mroonga/storage/t/geometry_contains.test | 13 +- ...try_strict_sql_mode_bulk_insert_null.test} | 9 +- .../t/geometry_strict_sql_mode_contains.test | 152 + .../storage/t/index_btree_equal_datetime.test | 5 +- .../storage/t/index_btree_equal_time.test | 2 +- .../t/index_btree_equal_timestamp.test | 2 +- .../t/index_btree_normal_column_insert.test | 2 +- .../storage/t/index_hash_id_normal.test | 2 +- .../storage/t/index_hash_id_primary.test | 29 +- .../storage/t/index_hash_id_unique.test | 2 +- .../t/index_hash_normal_column_insert.test | 2 +- ...index_hash_strict_sql_mode_id_primary.test | 44 + .../t/index_multiple_column_delete.test | 2 +- ...dex_multiple_column_nullable_smallint.test | 2 +- ...tiple_column_nullable_unsigned_bigint.test | 2 +- ...multiple_column_nullable_unsigned_int.test | 2 +- ...ple_column_nullable_unsigned_smallint.test | 2 +- ...ndex_multiple_column_nullable_varchar.test | 2 +- ...e_column_order_by_where_equal_asc_asc.test | 49 + ...column_order_by_where_equal_desc_desc.test | 49 + .../index_multiple_column_primary_delete.test | 2 +- ...ex_multiple_column_primary_select_int.test | 2 +- ...column_primary_strict_sql_mode_update.test | 47 + .../index_multiple_column_primary_update.test | 43 +- ...e_column_range_all_used_greater_than.test} | 2 +- ...range_all_used_greater_than_or_equal.test} | 2 +- ...iple_column_range_all_used_less_than.test} | 2 +- ...mn_range_all_used_less_than_or_equal.test} | 2 +- ...rtially_used_have_prefix_greater_than.test | 50 + ...sed_have_prefix_greater_than_or_equal.test | 50 + ..._partially_used_have_prefix_less_than.test | 50 + ...y_used_have_prefix_less_than_or_equal.test | 50 + ...partially_used_no_prefix_greater_than.test | 44 + ..._used_no_prefix_greater_than_or_equal.test | 44 + ...ge_partially_used_no_prefix_less_than.test | 44 + ...lly_used_no_prefix_less_than_or_equal.test | 45 + .../t/index_multiple_column_recreate.test | 2 +- .../t/index_multiple_column_replace.test | 2 +- .../index_multiple_column_select_double.test | 2 +- .../t/index_multiple_column_select_float.test | 2 +- .../t/index_multiple_column_select_int.test | 2 +- .../t/index_multiple_column_select_max.test | 44 + .../t/index_multiple_column_select_min.test | 44 + .../index_multiple_column_select_string.test | 2 +- .../index_multiple_column_select_varchar.test | 2 +- ...ltiple_column_unique_date_32bit_equal.test | 4 +- ...ltiple_column_unique_date_64bit_equal.test | 14 +- ...ultiple_column_unique_date_index_read.test | 11 +- ...le_column_unique_date_order_32bit_asc.test | 4 +- ...e_column_unique_date_order_32bit_desc.test | 4 +- ...le_column_unique_date_order_64bit_asc.test | 12 +- ...e_column_unique_date_order_64bit_desc.test | 12 +- ..._multiple_column_unique_date_reinsert.test | 2 +- ...ple_column_unique_datetime_index_read.test | 12 +- ...me_insert_delete_insert_invalid_value.test | 5 +- ...iple_column_unique_datetime_order_asc.test | 12 +- ...ple_column_unique_datetime_order_desc.test | 12 +- ...tiple_column_unique_datetime_reinsert.test | 2 +- .../index_multiple_column_unique_decimal.test | 2 +- ...ultiple_column_unique_time_index_read.test | 2 +- ...multiple_column_unique_time_order_asc.test | 4 +- ...ultiple_column_unique_time_order_desc.test | 4 +- ..._multiple_column_unique_time_reinsert.test | 2 +- ...le_column_unique_timestamp_index_read.test | 8 +- ...ple_column_unique_timestamp_order_asc.test | 8 +- ...le_column_unique_timestamp_order_desc.test | 10 +- ...iple_column_unique_timestamp_reinsert.test | 8 +- .../index_multiple_column_unique_varchar.test | 2 +- ...ltiple_column_unique_year_32bit_equal.test | 4 +- ...ltiple_column_unique_year_64bit_equal.test | 5 +- ...ultiple_column_unique_year_index_read.test | 5 +- ...le_column_unique_year_order_32bit_asc.test | 4 +- ...e_column_unique_year_order_32bit_desc.test | 4 +- ...le_column_unique_year_order_64bit_asc.test | 5 +- ...e_column_unique_year_order_64bit_desc.test | 5 +- ..._multiple_column_unique_year_reinsert.test | 2 +- .../t/index_multiple_column_update_int.test | 2 +- .../index_multiple_column_update_string.test | 2 +- .../t/index_primary_char_exact_length.test | 2 +- .../t/index_primary_char_null_character.test | 2 +- .../storage/t/index_primary_char_short.test | 2 +- .../mroonga/storage/t/index_primary_date.test | 3 +- ...mary_datetime_with_fractional_seconds.test | 3 +- ...y_datetime_without_fractional_seconds.test | 3 +- ...imary_decimal_with_fractional_seconds.test | 3 +- ...ry_decimal_without_fractional_seconds.test | 3 +- ..._primary_time_with_fractional_seconds.test | 3 +- ...imary_time_without_fractional_seconds.test | 3 +- ...ary_timestamp_with_fractional_seconds.test | 5 +- ..._timestamp_without_fractional_seconds.test | 3 +- .../index_primary_varchar_null_character.test | 2 +- .../mroonga/storage/t/index_primary_year.test | 3 +- .../index_range_normal_greater_than_asc.test | 2 +- .../index_range_normal_greater_than_desc.test | 2 +- ...ange_normal_greater_than_or_equal_asc.test | 2 +- ...nge_normal_greater_than_or_equal_desc.test | 2 +- .../t/index_range_normal_less_than_asc.test | 2 +- .../t/index_range_normal_less_than_desc.test | 2 +- ...x_range_normal_less_than_or_equal_asc.test | 2 +- ..._range_normal_less_than_or_equal_desc.test | 2 +- .../index_range_primary_greater_than_asc.test | 2 +- ...index_range_primary_greater_than_desc.test | 2 +- ...nge_primary_greater_than_or_equal_asc.test | 2 +- ...ge_primary_greater_than_or_equal_desc.test | 2 +- .../t/index_range_primary_less_than_asc.test | 2 +- .../t/index_range_primary_less_than_desc.test | 2 +- ..._range_primary_less_than_or_equal_asc.test | 2 +- ...range_primary_less_than_or_equal_desc.test | 2 +- .../storage/t/index_read_multiple_bigint.test | 2 +- .../index_read_multiple_bigint_unsigned.test | 2 +- .../storage/t/index_read_multiple_double.test | 2 +- .../storage/t/index_read_multiple_float.test | 2 +- .../storage/t/index_read_multiple_int.test | 2 +- .../t/index_read_multiple_int_unsigned.test | 2 +- .../t/index_read_multiple_mediumint.test | 2 +- ...ndex_read_multiple_mediumint_unsigned.test | 2 +- .../t/index_read_multiple_smallint.test | 2 +- ...index_read_multiple_smallint_unsigned.test | 2 +- .../t/index_read_multiple_tinyint.test | 2 +- .../index_read_multiple_tinyint_unsigned.test | 2 +- .../t/index_read_multiple_varchar.test | 2 +- ...index_read_multiple_varchar_collation.test | 2 +- .../storage/t/index_read_normal_int.test | 2 +- .../storage/t/index_read_normal_varchar.test | 2 +- .../storage/t/index_read_primary_int.test | 2 +- .../storage/t/index_read_primary_varchar.test | 2 +- .../storage/t/index_unique_delete_all.test | 39 + .../t/index_unique_delete_by_primary_key.test | 2 +- .../t/index_unique_insert_after_error.test | 2 +- .../index_unique_search_after_duplicated.test | 2 +- .../storage/t/index_unique_varchar.test | 2 +- .../t/index_update_multiple_column.test | 2 +- .../storage/t/index_update_single_column.test | 2 +- .../storage/t/information_schema_plugins.test | 2 +- ...ion_schema_tables_auto_increment_none.test | 2 +- ...tion_schema_tables_auto_increment_use.test | 2 +- ...information_schema_tables_data_length.test | 3 +- .../storage/t/insert_TODO_SPLIT_ME.test | 18 +- .../mroonga/storage/t/insert_delayed.test | 7 +- ...e_no_primary_key_and_unique_key_twice.test | 2 +- ...t_on_duplicate_key_update_primary_key.test | 3 +- ...rt_on_duplicate_key_update_unique_key.test | 3 +- .../storage/t/insert_virtual_column.test | 42 + .../mroonga/storage/t/like_unicode_ci.test | 2 +- .../mroonga/storage/t/lock_tables_read.test | 2 +- ...optimization_count_skip_TODO_SPLIT_ME.test | 61 - ...n_count_skip_after_insert_multithread.test | 8 +- ...count_skip_after_insert_single_thread.test | 2 +- .../t/optimization_count_skip_disabled.test | 3 +- .../t/optimization_count_skip_index_and.test | 44 + ...optimization_count_skip_index_between.test | 42 + .../optimization_count_skip_index_equal.test | 42 + ...ndex_full_text_search_in_boolean_mode.test | 43 + ..._text_search_in_natural_language_mode.test | 43 + ...optimization_count_skip_index_greater.test | 42 + ...zation_count_skip_index_greater_equal.test | 42 + .../t/optimization_count_skip_index_less.test | 42 + ...imization_count_skip_index_less_equal.test | 42 + ...timization_count_skip_index_not_equal.test | 42 + .../t/optimization_count_skip_index_view.test | 2 +- ...zation_count_skip_multiple_conditions.test | 41 + ...zation_count_skip_primary_key_between.test | 41 + ...mization_count_skip_primary_key_equal.test | 41 + ...zation_count_skip_primary_key_greater.test | 41 + ..._count_skip_primary_key_greater_equal.test | 41 + ...imization_count_skip_primary_key_less.test | 41 + ...ion_count_skip_primary_key_less_equal.test | 41 + ...tion_count_skip_primary_key_not_equal.test | 41 + ...on_order_limit_not_optimized_disabled.test | 3 +- ...not_optimized_multiple_match_againsts.test | 57 + ...on_order_limit_not_optimized_no_limit.test | 3 +- ...imization_order_limit_optimized_cp932.test | 46 + ...rder_limit_optimized_datetime_between.test | 3 +- ...limit_optimized_datetime_between_over.test | 3 +- ..._order_limit_optimized_datetime_equal.test | 3 +- ...limit_optimized_datetime_greater_than.test | 3 +- ...imized_datetime_greater_than_or_equal.test | 3 +- ...er_limit_optimized_datetime_less_than.test | 3 +- ...optimized_datetime_less_than_or_equal.test | 3 +- ...optimized_duplicated_order_by_columns.test | 2 +- ...ation_order_limit_optimized_enum_name.test | 49 + ...tion_order_limit_optimized_enum_value.test | 49 + ...rder_limit_optimized_have_primary_key.test | 3 +- ...ion_order_limit_optimized_int_between.test | 2 +- ...rder_limit_optimized_int_between_over.test | 2 +- ...ation_order_limit_optimized_int_equal.test | 3 +- ...rder_limit_optimized_int_greater_than.test | 3 +- ...t_optimized_int_greater_than_or_equal.test | 3 +- ...n_order_limit_optimized_int_less_than.test | 3 +- ...imit_optimized_int_less_than_or_equal.test | 3 +- ..._order_limit_optimized_no_primary_key.test | 3 +- ...order_limit_optimized_no_where_clause.test | 2 +- ...on_order_limit_optimized_order_by_asc.test | 3 +- ...n_order_limit_optimized_order_by_desc.test | 3 +- ...ion_order_limit_optimized_order_by_id.test | 3 +- ...imit_optimized_order_by_match_against.test | 3 +- ..._limit_optimized_select_match_against.test | 3 +- ...on_order_limit_optimized_time_between.test | 3 +- ...der_limit_optimized_time_between_over.test | 3 +- ...tion_order_limit_optimized_time_equal.test | 3 +- ...der_limit_optimized_time_greater_than.test | 3 +- ..._optimized_time_greater_than_or_equal.test | 3 +- ..._order_limit_optimized_time_less_than.test | 3 +- ...mit_optimized_time_less_than_or_equal.test | 3 +- ...it_optimized_varchar_equal_with_index.test | 3 +- ...optimized_varchar_equal_without_index.test | 3 +- ...on_order_limit_optimized_year_between.test | 2 +- ...der_limit_optimized_year_between_over.test | 2 +- ...tion_order_limit_optimized_year_equal.test | 2 +- ...der_limit_optimized_year_greater_than.test | 2 +- ..._optimized_year_greater_than_or_equal.test | 2 +- ..._order_limit_optimized_year_less_than.test | 2 +- ...mit_optimized_year_less_than_or_equal.test | 2 +- .../mroonga/storage/t/partition_insert.test | 5 +- .../mroonga/storage/t/partition_update.test | 5 +- .../storage/t/repair_table_no_index_file.test | 8 +- .../mroonga/storage/t/replace_geometry.test | 4 +- .../storage/t/replace_select_varchar.test | 2 +- .../mroonga/storage/t/replace_text.test | 3 +- .../mroonga/storage/t/replace_varchar.test | 3 +- .../mroonga/storage/t/replace_vector.test | 2 +- .../storage/t/replace_without_key.test | 2 +- .../mroonga/storage/t/select_all.test | 2 +- .../t/select_empty_key_where_equal.test | 2 +- .../t/select_empty_key_where_not_equal.test | 2 +- .../storage/t/select_group_by_with_index.test | 6 +- .../t/select_group_by_without_index.test | 8 +- .../mroonga/storage/t/select_pkey.test | 2 +- .../storage/t/select_secondary_key.test | 2 +- .../t/show_create_table_TODO_SPLIT_ME.test | 2 +- .../mroonga/storage/t/sub_query_fulltext.test | 3 +- .../mroonga/storage/t/temporary_table.test | 3 +- .../mroonga/storage/t/truncate.test | 3 +- .../mroonga/storage/t/update_binlog_row.test | 38 + .../mroonga/storage/t/update_fulltext.test | 2 +- .../storage/t/update_id_hash_index.test | 2 +- .../t/update_id_unique_hash_index.test | 2 +- .../mroonga/storage/t/update_int.test | 2 +- .../storage/t/update_last_insert_grn_id.test | 2 +- .../storage/t/update_virtual_column.test | 34 +- ...oolean_mode_syntax_flags_allow_column.test | 2 +- ...n_mode_syntax_flags_allow_leading_not.test | 2 +- ...oolean_mode_syntax_flags_allow_update.test | 2 +- ...oolean_mode_syntax_flags_syntax_query.test | 2 +- ...olean_mode_syntax_flags_syntax_script.test | 2 +- .../t/variable_database_path_prefix.test | 2 +- .../t/variable_default_parser_new_value.test | 2 +- .../t/variable_default_parser_same_value.test | 2 +- .../variable_default_tokenizer_new_value.test | 25 + ...variable_default_tokenizer_same_value.test | 22 + .../storage/t/variable_dry_write_delete.test | 3 +- .../storage/t/variable_dry_write_insert.test | 3 +- .../storage/t/variable_dry_write_update.test | 3 +- ...le_enable_operations_recording_insert.test | 50 + .../t/variable_lock_timeout_disable.test | 12 +- .../t/variable_lock_timeout_invalid.test | 12 +- .../t/variable_lock_timeout_no_retry.test | 10 +- .../t/variable_lock_timeout_valid.test | 10 +- .../t/variable_log_file_new_value.test | 2 +- .../t/variable_log_file_nonexistent_path.test | 2 +- .../t/variable_log_file_same_value.test | 2 +- .../t/variable_log_level_TODO_SPLIT_ME.test | 2 +- ...ble_match_escalation_threshold_global.test | 29 +- ...le_match_escalation_threshold_session.test | 5 +- ...ble_max_n_records_for_estimate_global.test | 9 +- ...or_estimate_mysql_5_7_or_later_global.test | 60 + ...mysql_5_7_or_later_not_found_in_limit.test | 43 + ...r_estimate_mysql_5_7_or_later_session.test | 47 + ...cords_for_estimate_not_found_in_limit.test | 43 + ...le_max_n_records_for_estimate_session.test | 5 +- ...e_query_log_file_disabled_empty_value.test | 32 + ...le_query_log_file_disabled_null_value.test | 32 + ...le_query_log_file_enabled_empty_value.test | 34 + ...ble_query_log_file_enabled_null_value.test | 34 + .../t/variable_query_log_file_new_value.test | 34 + .../t/variable_query_log_file_same_value.test | 35 + .../t/variable_vector_column_delimiter.test | 2 +- .../mroonga/storage/t/variable_version.test | 2 +- .../wrapper/r/alter_table_add_column.result | 15 - ...er_table_add_column_multibyte_cp932.result | 33 + ...ter_table_add_column_multibyte_utf8.result | 33 + .../r/alter_table_change_engine.result | 30 +- .../alter_table_comment_change_engine.result | 23 +- .../wrapper/r/alter_table_drop_column.result | 15 - .../wrapper/r/alter_table_fulltext.result | 18 - .../wrapper/r/alter_table_rename_table.result | 20 - .../wrapper/r/alter_table_spatial.result | 9 - .../wrapper/r/check_table_for_upgrade.result | 18 + .../column_generated_stored_add_column.result | 15 + .../r/column_generated_stored_delete.result | 15 + ...column_generated_stored_drop_column.result | 17 + .../r/column_generated_stored_insert.result | 15 + .../r/column_generated_stored_reindex.result | 17 + .../r/column_generated_stored_update.result | 15 + ...column_generated_virtual_add_column.result | 15 + ...enerated_virtual_add_fulltext_index.result | 17 + .../column_generated_virtual_add_index.result | 19 + .../r/column_generated_virtual_delete.result | 15 + ...olumn_generated_virtual_drop_column.result | 16 + .../r/column_generated_virtual_insert.result | 15 + .../r/column_generated_virtual_update.result | 16 + .../wrapper/r/column_multibyte_cp932.result | 32 + .../wrapper/r/column_multibyte_utf8.result | 32 + .../mroonga/wrapper/r/count_star.result | 11 + ..._star_mysql_5_7_or_later_with_index.result | 30 + .../wrapper/r/count_star_with_index.result | 4 +- .../r/create_table_comment_combined.result | 14 +- .../r/create_table_flags_comment.result | 2 +- .../wrapper/r/create_table_flags_none.result | 2 +- .../r/create_table_flags_parameter.result | 2 +- .../r/create_table_index_flags_none.result | 2 +- ...flags_with_position_and_with_weight.result | 2 +- ...table_normalizer_fulltext_index_bin.result | 21 + .../r/create_table_parser_comment.result | 12 +- ...ilters_index_multiple_token_filters.result | 9 +- ...oken_filters_index_one_token_filter.result | 9 +- ...table_token_filters_index_parameter.result | 9 +- .../r/create_table_tokenizer_comment.result | 8 - .../r/create_table_tokenizer_parameter.result | 8 - .../r/drop_table_new_connection.result | 13 + .../fulltext_boolean_mode_leading_not.result | 9 - ...boolean_mode_multiple_match_against.result | 10 - .../wrapper/r/fulltext_index_recreate.result | 9 - .../wrapper/r/fulltext_insert_select.result | 6 +- .../wrapper/r/fulltext_insert_values.result | 8 - .../wrapper/r/fulltext_many_records.result | 8 - ...and_not_matched_have_where_no_order.result | 9 +- ...lltext_multiple_column_index_delete.result | 11 - ...lltext_multiple_column_index_insert.result | 11 - ...text_multiple_column_index_recreate.result | 11 - ...lltext_multiple_column_index_update.result | 11 - .../wrapper/r/fulltext_multiple_index.result | 10 - .../mroonga/wrapper/r/fulltext_myisam.result | 8 - .../r/fulltext_order_TODO_SPLIT_ME.result | 12 +- .../r/fulltext_order_transaction.result | 10 - .../wrapper/r/geometry_contains.result | 9 - .../mroonga/wrapper/r/geometry_delete.result | 9 - .../mroonga/wrapper/r/geometry_update.result | 9 - .../mroonga/wrapper/r/insert_bulk.result | 8 - ..._read_mysql_5_7_or_later_disk_sweep.result | 20 + .../wrapper/r/repair_table_no_files.result | 9 - .../r/repair_table_no_index_file.result | 11 +- .../mroonga/wrapper/r/temporary_table.result | 7 - .../transaction_rollback_delete_delete.result | 10 - .../transaction_rollback_delete_update.result | 10 - .../mroonga/wrapper/r/truncate.result | 13 - .../r/variable_dry_write_delete.result | 8 - .../r/variable_dry_write_insert.result | 8 - .../r/variable_dry_write_update.result | 8 - ...e_match_escalation_threshold_global.result | 11 +- ..._match_escalation_threshold_session.result | 11 +- .../mysql-test/mroonga/wrapper/suite.pm | 2 +- .../wrapper/t/alter_table_add_column.test | 5 +- ...lter_table_add_column_multibyte_cp932.test | 54 + ...alter_table_add_column_multibyte_utf8.test | 54 + .../t/alter_table_change_column_comment.test | 2 +- .../wrapper/t/alter_table_change_engine.test | 10 +- .../t/alter_table_comment_change_engine.test | 7 +- ...er_table_disable_keys_create_fulltext.test | 2 +- .../t/alter_table_disable_keys_fulltext.test | 2 +- ...er_table_disable_keys_multiple_column.test | 2 +- .../t/alter_table_disable_keys_normal.test | 2 +- .../t/alter_table_disable_keys_primary.test | 2 +- .../t/alter_table_disable_keys_updating.test | 2 +- .../wrapper/t/alter_table_drop_column.test | 4 +- .../t/alter_table_enable_keys_fulltext.test | 2 +- .../alter_table_enable_keys_lock_tables.test | 2 +- ...ter_table_enable_keys_multiple_column.test | 2 +- .../t/alter_table_enable_keys_normal.test | 2 +- .../t/alter_table_enable_keys_primary.test | 2 +- .../wrapper/t/alter_table_fulltext.test | 5 +- .../wrapper/t/alter_table_rename_table.test | 5 +- .../wrapper/t/alter_table_spatial.test | 6 +- .../wrapper/t/auto_increment_text.test | 2 +- .../wrapper/t/binlog_TODO_SPLIT_ME.test | 2 +- .../wrapper/t/check_table_for_upgrade.test | 44 + .../column_comment_index_not_for_mroonga.test | 2 +- .../t/column_generated_stored_add_column.test | 43 + .../t/column_generated_stored_delete.test | 43 + .../column_generated_stored_drop_column.test | 43 + .../t/column_generated_stored_insert.test | 41 + .../t/column_generated_stored_reindex.test | 43 + .../t/column_generated_stored_update.test | 43 + .../column_generated_virtual_add_column.test | 42 + ..._generated_virtual_add_fulltext_index.test | 46 + .../t/column_generated_virtual_add_index.test | 47 + .../t/column_generated_virtual_delete.test | 42 + .../column_generated_virtual_drop_column.test | 42 + .../t/column_generated_virtual_insert.test | 40 + .../t/column_generated_virtual_update.test | 42 + .../wrapper/t/column_multibyte_cp932.test | 53 + .../wrapper/t/column_multibyte_utf8.test | 53 + .../wrapper/t/column_normal_comment.test | 2 +- .../mroonga/wrapper/t/count_star.test | 36 + ...nt_star_mysql_5_7_or_later_with_index.test | 55 + .../wrapper/t/count_star_with_index.test | 7 +- .../wrapper/t/create_table_TODO_SPLIT_ME.test | 4 +- .../t/create_table_comment_combined.test | 4 +- .../wrapper/t/create_table_flags_comment.test | 2 +- .../wrapper/t/create_table_flags_none.test | 2 +- .../t/create_table_flags_parameter.test | 2 +- .../t/create_table_index_flags_none.test | 2 +- ...x_flags_with_position_and_with_weight.test | 2 +- .../t/create_table_normalizer_comment.test | 2 +- ...e_table_normalizer_fulltext_index_bin.test | 40 + .../t/create_table_normalizer_parameter.test | 2 +- .../t/create_table_parser_comment.test | 4 +- ..._filters_index_multiple_token_filters.test | 2 +- ..._token_filters_index_one_token_filter.test | 2 +- ...e_table_token_filters_index_parameter.test | 2 +- .../t/create_table_tokenizer_comment.test | 3 +- .../t/create_table_tokenizer_parameter.test | 3 +- .../wrapper/t/delete_TODO_SPLIT_ME.test | 2 +- .../mroonga/wrapper/t/delete_all.test | 2 +- .../wrapper/t/drop_table_new_connection.test | 46 + .../t/fulltext_boolean_mode_leading_not.test | 3 +- ...t_boolean_mode_multiple_match_against.test | 3 +- ...ma_default_operator_minus_no_operator.test | 2 +- ...pragma_default_operator_minus_with_or.test | 2 +- ...agma_default_operator_minus_with_plus.test | 2 +- ...ragma_default_operator_or_no_operator.test | 2 +- ...pragma_default_operator_or_with_minus.test | 2 +- ..._pragma_default_operator_or_with_plus.test | 2 +- ...gma_default_operator_plus_no_operator.test | 2 +- ...agma_default_operator_plus_with_minus.test | 2 +- ..._pragma_default_operator_plus_with_or.test | 2 +- ..._boolean_mode_pragma_weight_full_spec.test | 2 +- ..._boolean_mode_pragma_weight_no_weight.test | 2 +- ...olean_mode_pragma_weight_omit_section.test | 2 +- .../wrapper/t/fulltext_charset_ascii.test | 2 +- .../wrapper/t/fulltext_charset_cp932.test | 2 +- .../wrapper/t/fulltext_charset_eucjpms.test | 2 +- .../wrapper/t/fulltext_charset_japanese.test | 2 +- .../wrapper/t/fulltext_index_recreate.test | 3 +- .../wrapper/t/fulltext_insert_select.test | 8 +- .../wrapper/t/fulltext_insert_values.test | 3 +- .../wrapper/t/fulltext_many_records.test | 3 +- ..._not_matched_have_where_matched_order.test | 2 +- ...d_and_not_matched_have_where_no_order.test | 19 +- ...d_and_not_matched_no_where_both_order.test | 2 +- ...fulltext_multiple_column_index_delete.test | 3 +- ...fulltext_multiple_column_index_insert.test | 3 +- ...lltext_multiple_column_index_recreate.test | 3 +- ...fulltext_multiple_column_index_update.test | 3 +- .../wrapper/t/fulltext_multiple_index.test | 3 +- .../mroonga/wrapper/t/fulltext_myisam.test | 3 +- .../wrapper/t/fulltext_not_match_against.test | 2 +- .../t/fulltext_order_TODO_SPLIT_ME.test | 5 +- .../wrapper/t/fulltext_order_transaction.test | 13 +- .../t/function_last_insert_id_reference.test | 2 +- .../t/function_last_insert_id_set.test | 2 +- .../mroonga/wrapper/t/geometry_contains.test | 5 +- .../mroonga/wrapper/t/geometry_delete.test | 5 +- .../mroonga/wrapper/t/geometry_update.test | 5 +- .../wrapper/t/index_force_index_not_used.test | 2 +- .../wrapper/t/insert_TODO_SPLIT_ME.test | 2 +- .../mroonga/wrapper/t/insert_bulk.test | 3 +- ...te_multiple_column_primary_key_myisam.test | 4 +- ...e_multiple_column_unique_index_myisam.test | 4 +- .../t/multi_range_read_disk_sweep.test | 7 +- ...ge_read_mysql_5_7_or_later_disk_sweep.test | 44 + ...ptimization_order_limit_TODO_SPLIT_ME.test | 2 +- ...optimization_order_limit_no_direction.test | 2 +- ...imization_order_limit_no_where_clause.test | 2 +- ...tion_order_limit_order_by_primary_key.test | 2 +- .../mroonga/wrapper/t/performance_schema.test | 2 +- .../wrapper/t/repair_table_no_files.test | 12 +- .../wrapper/t/repair_table_no_index_file.test | 11 +- .../mroonga/wrapper/t/temporary_table.test | 3 +- .../wrapper/t/transaction_query_cache.test | 12 +- .../t/transaction_rollback_delete_delete.test | 3 +- .../t/transaction_rollback_delete_update.test | 3 +- .../mroonga/wrapper/t/truncate.test | 3 +- .../mroonga/wrapper/t/update_fulltext.test | 2 +- .../mroonga/wrapper/t/update_int.test | 2 +- .../wrapper/t/variable_dry_write_delete.test | 3 +- .../wrapper/t/variable_dry_write_insert.test | 3 +- .../wrapper/t/variable_dry_write_update.test | 3 +- ...ble_match_escalation_threshold_global.test | 11 +- ...le_match_escalation_threshold_session.test | 5 +- storage/mroonga/packages/apt/Makefile.am | 50 +- storage/mroonga/packages/apt/Vagrantfile | 35 +- storage/mroonga/packages/apt/build-deb.sh | 46 +- storage/mroonga/packages/apt/env.sh.in | 5 +- storage/mroonga/packages/apt/sign-packages.sh | 2 +- .../mroonga/packages/apt/sign-repository.sh | 2 +- .../mroonga/packages/apt/update-repository.sh | 2 +- storage/mroonga/packages/check-utility.sh | 665 - .../mroonga/packages/rpm/centos/Makefile.am | 14 +- .../rpm/centos/mariadb-mroonga.spec.in | 116 +- .../rpm/centos/mysql55-mroonga.spec.in | 131 +- .../centos/mysql56-community-mroonga.spec.in | 153 +- .../centos/percona-server-56-mroonga.spec.in | 137 +- storage/mroonga/packages/source/Makefile.am | 12 +- storage/mroonga/packages/ubuntu/Makefile.am | 41 +- storage/mroonga/packages/ubuntu/upload.rb | 135 +- storage/mroonga/packages/windows/Makefile.am | 12 +- storage/mroonga/packages/windows/README.md | 12 +- .../packages/windows/build-vc2013-msi-32.bat | 8 - .../packages/windows/build-vc2013-msi-64.bat | 8 - .../packages/windows/build-vc2013-zip-32.bat | 8 - .../packages/windows/build-vc2013-zip-64.bat | 8 - .../mroonga/packages/windows/build-vc2013.bat | 4 - .../packages/windows/build-vc2015-msi-32.bat | 2 +- .../packages/windows/build-vc2015-msi-64.bat | 2 +- .../packages/windows/build-vc2015-zip-32.bat | 7 +- .../packages/windows/build-vc2015-zip-64.bat | 7 +- .../mroonga/packages/windows/build-vc2015.bat | 4 +- storage/mroonga/packages/yum/Makefile.am | 17 +- storage/mroonga/packages/yum/Vagrantfile | 18 +- storage/mroonga/packages/yum/build-in-vm.sh | 28 +- storage/mroonga/packages/yum/build-rpm.sh | 93 +- storage/mroonga/packages/yum/env.sh.in | 4 + .../mroonga/packages/yum/update-repository.sh | 4 +- storage/mroonga/plugin_version | 2 +- storage/mroonga/required_groonga_version | 2 +- storage/mroonga/test/run-sql-test.sh | 278 +- .../test/unit/test_mrn_path_mapper.cpp | 2 +- storage/mroonga/tools/prepare-sphinx-html.rb | 8 - storage/mroonga/tools/travis/before_script.sh | 52 +- storage/mroonga/tools/travis/install.sh | 131 +- storage/mroonga/tools/travis/script.sh | 24 +- storage/mroonga/udf/mrn_udf_command.cpp | 194 +- storage/mroonga/udf/mrn_udf_escape.cpp | 196 +- .../mroonga/udf/mrn_udf_highlight_html.cpp | 494 + .../udf/mrn_udf_last_insert_grn_id.cpp | 11 +- storage/mroonga/udf/mrn_udf_normalize.cpp | 212 + storage/mroonga/udf/mrn_udf_query_expand.cpp | 282 + storage/mroonga/udf/mrn_udf_snippet.cpp | 77 +- storage/mroonga/udf/mrn_udf_snippet_html.cpp | 444 + storage/mroonga/udf/sources.am | 6 +- storage/mroonga/vendor/groonga/CMakeLists.txt | 222 +- storage/mroonga/vendor/groonga/Makefile.am | 21 +- storage/mroonga/vendor/groonga/README.md | 13 + storage/mroonga/vendor/groonga/appveyor.yml | 75 +- storage/mroonga/vendor/groonga/autogen.sh | 19 +- storage/mroonga/vendor/groonga/base_version | 2 +- .../vendor/groonga/benchmark/Makefile.am | 83 +- .../benchmark/bench-between-sequential.c | 276 + .../vendor/groonga/benchmark/bench-cache.c | 155 + .../groonga/benchmark/bench-ctx-create.c | 12 +- .../groonga/benchmark/bench-geo-distance.c | 13 +- .../groonga/benchmark/bench-geo-select.c | 13 +- .../vendor/groonga/benchmark/bench-nfkc.c | 275 + .../groonga/benchmark/bench-query-optimizer.c | 12 +- .../groonga/benchmark/bench-range-select.c | 12 +- .../groonga/benchmark/bench-result-set.c | 151 + .../groonga/benchmark/bench-table-factory.c | 13 +- .../vendor/groonga/benchmark/lib/Makefile.am | 3 + .../build/ac_macros/check_functions.m4 | 2 - .../groonga/build/ac_macros/check_headers.m4 | 4 - .../vendor/groonga/build/makefiles/gettext.am | 2 - .../groonga/build/makefiles/sphinx-build.am | 13 +- .../vendor/groonga/build/makefiles/sphinx.am | 107 +- .../vendor/groonga/bundled_lz4_version | 1 + .../groonga/bundled_mecab_naist_jdic_version | 1 + .../vendor/groonga/bundled_mecab_version | 1 + .../groonga/bundled_message_pack_version | 1 + storage/mroonga/vendor/groonga/config.h.cmake | 12 +- storage/mroonga/vendor/groonga/configure.ac | 338 +- .../examples/dictionary/edict/edict-import.sh | 8 +- .../examples/dictionary/html/index.html | 2 +- .../html/js/jquery-ui-1.8.18.custom.min.js | 356 - .../vendor/groonga/groonga-arrow.pc.in | 4 + .../vendor/groonga/groonga-httpd-conf.sh.in | 6 +- .../vendor/groonga/include/Makefile.am | 4 +- .../mroonga/vendor/groonga/include/groonga.h | 39 +- .../vendor/groonga/include/groonga.hpp | 21 + .../groonga/include/groonga/Makefile.am | 27 +- .../vendor/groonga/include/groonga/accessor.h | 34 + .../vendor/groonga/include/groonga/array.h | 89 + .../vendor/groonga/include/groonga/arrow.h | 38 + .../vendor/groonga/include/groonga/arrow.hpp | 21 + .../vendor/groonga/include/groonga/cache.h | 49 + .../vendor/groonga/include/groonga/column.h | 29 + .../vendor/groonga/include/groonga/command.h | 8 +- .../vendor/groonga/include/groonga/config.h | 65 + .../vendor/groonga/include/groonga/dat.h | 100 + .../vendor/groonga/include/groonga/db.h | 68 + .../vendor/groonga/include/groonga/dump.h | 34 + .../vendor/groonga/include/groonga/error.h | 29 + .../vendor/groonga/include/groonga/expr.h | 47 +- .../groonga/include/groonga/file_reader.h | 37 + .../vendor/groonga/include/groonga/geo.h | 36 + .../vendor/groonga/include/groonga/groonga.h | 703 +- .../vendor/groonga/include/groonga/hash.h | 104 + .../vendor/groonga/include/groonga/id.h | 31 + .../vendor/groonga/include/groonga/ii.h | 42 +- .../vendor/groonga/include/groonga/nfkc.h | 11 +- .../groonga/include/groonga/normalizer.h | 8 +- .../vendor/groonga/include/groonga/obj.h | 54 +- .../vendor/groonga/include/groonga/operator.h | 49 + .../vendor/groonga/include/groonga/output.h | 30 +- .../vendor/groonga/include/groonga/pat.h | 102 + .../vendor/groonga/include/groonga/plugin.h | 83 +- .../groonga/include/groonga/portability.h | 59 +- .../include/groonga/request_canceler.h | 8 +- .../groonga/include/groonga/request_timer.h | 53 + .../vendor/groonga/include/groonga/scorer.h | 14 +- .../vendor/groonga/include/groonga/table.h | 246 + .../vendor/groonga/include/groonga/thread.h | 39 + .../vendor/groonga/include/groonga/time.h | 61 + .../vendor/groonga/include/groonga/token.h | 11 +- .../groonga/include/groonga/token_filter.h | 8 +- .../groonga/include/groonga/tokenizer.h | 8 +- .../vendor/groonga/include/groonga/type.h | 40 + .../vendor/groonga/include/groonga/util.h | 14 +- .../groonga/include/groonga/window_function.h | 73 + .../vendor/groonga/include/groonga/windows.h | 31 + .../include/groonga/windows_event_logger.h | 30 + .../mroonga/vendor/groonga/lib/CMakeLists.txt | 76 +- .../mroonga/vendor/groonga/lib/Makefile.am | 44 +- storage/mroonga/vendor/groonga/lib/alloc.c | 961 + storage/mroonga/vendor/groonga/lib/arrow.cpp | 849 + .../groonga/lib/{sources.am => c_sources.am} | 51 +- storage/mroonga/vendor/groonga/lib/cache.c | 1036 + storage/mroonga/vendor/groonga/lib/column.c | 49 + storage/mroonga/vendor/groonga/lib/com.c | 49 +- storage/mroonga/vendor/groonga/lib/command.c | 3 +- storage/mroonga/vendor/groonga/lib/config.c | 289 + .../mroonga/vendor/groonga/lib/cpp_sources.am | 3 + storage/mroonga/vendor/groonga/lib/ctx.c | 1897 +- .../mroonga/vendor/groonga/lib/ctx_impl_mrb.c | 138 +- storage/mroonga/vendor/groonga/lib/dat.cpp | 267 +- .../mroonga/vendor/groonga/lib/dat/array.hpp | 8 +- .../mroonga/vendor/groonga/lib/dat/base.hpp | 8 +- .../mroonga/vendor/groonga/lib/dat/block.hpp | 8 +- .../mroonga/vendor/groonga/lib/dat/check.hpp | 8 +- .../vendor/groonga/lib/dat/cursor-factory.cpp | 2 - .../vendor/groonga/lib/dat/cursor-factory.hpp | 8 +- .../mroonga/vendor/groonga/lib/dat/cursor.hpp | 8 +- .../mroonga/vendor/groonga/lib/dat/dat.hpp | 9 +- .../mroonga/vendor/groonga/lib/dat/entry.hpp | 8 +- .../vendor/groonga/lib/dat/file-impl.cpp | 21 +- .../vendor/groonga/lib/dat/file-impl.hpp | 8 +- .../mroonga/vendor/groonga/lib/dat/file.hpp | 8 +- .../mroonga/vendor/groonga/lib/dat/header.hpp | 8 +- .../vendor/groonga/lib/dat/id-cursor.hpp | 8 +- .../vendor/groonga/lib/dat/key-cursor.hpp | 8 +- .../mroonga/vendor/groonga/lib/dat/key.hpp | 8 +- .../mroonga/vendor/groonga/lib/dat/node.hpp | 8 +- .../groonga/lib/dat/predictive-cursor.hpp | 8 +- .../vendor/groonga/lib/dat/prefix-cursor.hpp | 8 +- .../mroonga/vendor/groonga/lib/dat/string.hpp | 8 +- .../mroonga/vendor/groonga/lib/dat/trie.cpp | 8 + .../mroonga/vendor/groonga/lib/dat/trie.hpp | 8 +- .../mroonga/vendor/groonga/lib/dat/vector.hpp | 8 +- storage/mroonga/vendor/groonga/lib/db.c | 5789 +- storage/mroonga/vendor/groonga/lib/dump.c | 112 + storage/mroonga/vendor/groonga/lib/egn.cpp | 3245 - storage/mroonga/vendor/groonga/lib/error.c | 412 +- storage/mroonga/vendor/groonga/lib/expr.c | 3880 +- .../mroonga/vendor/groonga/lib/expr_code.c | 24 +- .../vendor/groonga/lib/expr_executor.c | 945 + .../mroonga/vendor/groonga/lib/file_lock.c | 121 + .../mroonga/vendor/groonga/lib/file_reader.c | 109 + storage/mroonga/vendor/groonga/lib/geo.c | 136 +- storage/mroonga/vendor/groonga/lib/grn.h | 141 +- .../mroonga/vendor/groonga/lib/grn_alloc.h | 163 + .../mroonga/vendor/groonga/lib/grn_cache.h | 49 + storage/mroonga/vendor/groonga/lib/grn_com.h | 14 +- .../mroonga/vendor/groonga/lib/grn_config.h | 37 + storage/mroonga/vendor/groonga/lib/grn_ctx.h | 312 +- .../mroonga/vendor/groonga/lib/grn_ctx_impl.h | 90 +- .../vendor/groonga/lib/grn_ctx_impl_mrb.h | 8 +- storage/mroonga/vendor/groonga/lib/grn_dat.h | 25 +- storage/mroonga/vendor/groonga/lib/grn_db.h | 224 +- .../vendor/groonga/lib/grn_ecmascript.c | 2759 +- .../vendor/groonga/lib/grn_ecmascript.h | 137 +- .../vendor/groonga/lib/grn_ecmascript.lemon | 212 +- storage/mroonga/vendor/groonga/lib/grn_egn.h | 90 - .../mroonga/vendor/groonga/lib/grn_egn.hpp | 318 - .../mroonga/vendor/groonga/lib/grn_error.h | 12 +- storage/mroonga/vendor/groonga/lib/grn_expr.h | 17 +- .../vendor/groonga/lib/grn_expr_code.h | 8 +- .../vendor/groonga/lib/grn_expr_executor.h | 39 + .../vendor/groonga/lib/grn_file_lock.h | 48 + storage/mroonga/vendor/groonga/lib/grn_geo.h | 15 +- storage/mroonga/vendor/groonga/lib/grn_hash.h | 30 +- storage/mroonga/vendor/groonga/lib/grn_ii.h | 68 +- .../vendor/groonga/lib/grn_index_column.h | 34 + storage/mroonga/vendor/groonga/lib/grn_io.h | 33 +- storage/mroonga/vendor/groonga/lib/grn_load.h | 47 + .../mroonga/vendor/groonga/lib/grn_logger.h | 8 +- storage/mroonga/vendor/groonga/lib/grn_mrb.h | 10 +- .../mroonga/vendor/groonga/lib/grn_msgpack.h | 8 +- storage/mroonga/vendor/groonga/lib/grn_nfkc.h | 39 + .../vendor/groonga/lib/grn_normalizer.h | 8 +- storage/mroonga/vendor/groonga/lib/grn_obj.h | 32 + .../mroonga/vendor/groonga/lib/grn_output.h | 40 +- storage/mroonga/vendor/groonga/lib/grn_pat.h | 50 +- .../mroonga/vendor/groonga/lib/grn_plugin.h | 9 +- storage/mroonga/vendor/groonga/lib/grn_proc.h | 129 +- .../vendor/groonga/lib/grn_raw_string.h | 62 + .../mroonga/vendor/groonga/lib/grn_report.h | 47 + .../vendor/groonga/lib/grn_request_canceler.h | 7 +- .../vendor/groonga/lib/grn_request_timer.h | 28 + storage/mroonga/vendor/groonga/lib/grn_rset.h | 9 +- .../mroonga/vendor/groonga/lib/grn_scanner.h | 40 + .../mroonga/vendor/groonga/lib/grn_scorer.h | 8 +- .../mroonga/vendor/groonga/lib/grn_scorers.h | 8 +- storage/mroonga/vendor/groonga/lib/grn_snip.h | 15 +- .../mroonga/vendor/groonga/lib/grn_store.h | 79 +- storage/mroonga/vendor/groonga/lib/grn_str.h | 17 +- .../mroonga/vendor/groonga/lib/grn_string.h | 26 +- storage/mroonga/vendor/groonga/lib/grn_time.h | 40 + .../vendor/groonga/lib/grn_token_cursor.h | 14 +- .../vendor/groonga/lib/grn_tokenizers.h | 9 +- storage/mroonga/vendor/groonga/lib/grn_ts.h | 48 + storage/mroonga/vendor/groonga/lib/grn_util.h | 23 +- .../vendor/groonga/lib/grn_window_function.h | 40 + .../vendor/groonga/lib/grn_window_functions.h | 26 + .../mroonga/vendor/groonga/lib/grn_windows.h | 33 + storage/mroonga/vendor/groonga/lib/hash.c | 552 +- storage/mroonga/vendor/groonga/lib/icudump.c | 24 +- storage/mroonga/vendor/groonga/lib/id.c | 36 + storage/mroonga/vendor/groonga/lib/ii.c | 7021 +- .../mroonga/vendor/groonga/lib/index_column.c | 194 + storage/mroonga/vendor/groonga/lib/io.c | 865 +- .../mroonga/vendor/groonga/lib/libgroonga.c | 8 - storage/mroonga/vendor/groonga/lib/load.c | 1229 + storage/mroonga/vendor/groonga/lib/logger.c | 302 +- .../mroonga/vendor/groonga/lib/metadata.rc.in | 28 + storage/mroonga/vendor/groonga/lib/mrb.c | 129 +- .../vendor/groonga/lib/mrb/Makefile.am | 3 +- .../vendor/groonga/lib/mrb/mrb_accessor.c | 28 + .../vendor/groonga/lib/mrb/mrb_accessor.h | 6 +- .../vendor/groonga/lib/mrb/mrb_array.c | 10 +- .../vendor/groonga/lib/mrb/mrb_array.h | 6 +- .../mroonga/vendor/groonga/lib/mrb/mrb_bulk.c | 144 +- .../mroonga/vendor/groonga/lib/mrb/mrb_bulk.h | 7 +- .../vendor/groonga/lib/mrb/mrb_cache.c | 130 + .../vendor/groonga/lib/mrb/mrb_cache.h | 33 + .../vendor/groonga/lib/mrb/mrb_column.c | 84 +- .../vendor/groonga/lib/mrb/mrb_column.h | 6 +- .../vendor/groonga/lib/mrb/mrb_command.c | 24 +- .../vendor/groonga/lib/mrb/mrb_command.h | 6 +- .../groonga/lib/mrb/mrb_command_input.h | 6 +- .../groonga/lib/mrb/mrb_command_version.c | 41 + .../groonga/lib/mrb/mrb_command_version.h | 32 + .../vendor/groonga/lib/mrb/mrb_config.c | 90 + .../vendor/groonga/lib/mrb/mrb_config.h | 31 + .../vendor/groonga/lib/mrb/mrb_content_type.h | 6 +- .../vendor/groonga/lib/mrb/mrb_converter.c | 69 +- .../vendor/groonga/lib/mrb/mrb_converter.h | 14 +- .../mroonga/vendor/groonga/lib/mrb/mrb_ctx.c | 130 +- .../mroonga/vendor/groonga/lib/mrb/mrb_ctx.h | 6 +- .../vendor/groonga/lib/mrb/mrb_database.c | 100 +- .../vendor/groonga/lib/mrb/mrb_database.h | 6 +- .../groonga/lib/mrb/mrb_double_array_trie.h | 6 +- .../vendor/groonga/lib/mrb/mrb_error.c | 8 + .../vendor/groonga/lib/mrb/mrb_error.h | 6 +- .../vendor/groonga/lib/mrb/mrb_eval_context.c | 98 + .../vendor/groonga/lib/mrb/mrb_eval_context.h | 32 + .../mroonga/vendor/groonga/lib/mrb/mrb_expr.c | 242 +- .../mroonga/vendor/groonga/lib/mrb/mrb_expr.h | 14 +- .../groonga/lib/mrb/mrb_fixed_size_column.h | 6 +- .../vendor/groonga/lib/mrb/mrb_hash_table.c | 8 +- .../vendor/groonga/lib/mrb/mrb_hash_table.h | 6 +- .../mroonga/vendor/groonga/lib/mrb/mrb_id.h | 6 +- .../vendor/groonga/lib/mrb/mrb_index_column.c | 31 + .../vendor/groonga/lib/mrb/mrb_index_column.h | 6 +- .../vendor/groonga/lib/mrb/mrb_index_cursor.c | 35 +- .../vendor/groonga/lib/mrb/mrb_index_cursor.h | 6 +- .../vendor/groonga/lib/mrb/mrb_indexable.c | 170 + .../vendor/groonga/lib/mrb/mrb_indexable.h | 32 + .../vendor/groonga/lib/mrb/mrb_logger.c | 27 +- .../vendor/groonga/lib/mrb/mrb_logger.h | 6 +- .../vendor/groonga/lib/mrb/mrb_object.c | 134 +- .../vendor/groonga/lib/mrb/mrb_object.h | 6 +- .../vendor/groonga/lib/mrb/mrb_object_flags.c | 1 + .../vendor/groonga/lib/mrb/mrb_object_flags.h | 6 +- .../vendor/groonga/lib/mrb/mrb_operator.c | 1 + .../vendor/groonga/lib/mrb/mrb_operator.h | 6 +- .../vendor/groonga/lib/mrb/mrb_options.h | 6 +- .../groonga/lib/mrb/mrb_patricia_trie.h | 6 +- .../vendor/groonga/lib/mrb/mrb_pointer.c | 77 + .../vendor/groonga/lib/mrb/mrb_pointer.h | 31 + .../vendor/groonga/lib/mrb/mrb_procedure.c | 40 +- .../vendor/groonga/lib/mrb/mrb_procedure.h | 6 +- .../vendor/groonga/lib/mrb/mrb_query_logger.c | 76 + .../vendor/groonga/lib/mrb/mrb_query_logger.h | 32 + .../vendor/groonga/lib/mrb/mrb_record.c | 162 + .../vendor/groonga/lib/mrb/mrb_record.h | 31 + .../vendor/groonga/lib/mrb/mrb_table.c | 176 +- .../vendor/groonga/lib/mrb/mrb_table.h | 6 +- .../vendor/groonga/lib/mrb/mrb_table_cursor.c | 42 +- .../vendor/groonga/lib/mrb/mrb_table_cursor.h | 6 +- .../groonga/lib/mrb/mrb_table_cursor_flags.h | 6 +- .../groonga/lib/mrb/mrb_table_group_flags.h | 6 +- .../groonga/lib/mrb/mrb_table_group_result.c | 18 +- .../groonga/lib/mrb/mrb_table_group_result.h | 7 +- .../groonga/lib/mrb/mrb_table_sort_flags.h | 7 +- .../groonga/lib/mrb/mrb_table_sort_key.c | 4 +- .../groonga/lib/mrb/mrb_table_sort_key.h | 6 +- .../vendor/groonga/lib/mrb/mrb_thread.c | 46 + .../vendor/groonga/lib/mrb/mrb_thread.h | 32 + .../mroonga/vendor/groonga/lib/mrb/mrb_type.h | 6 +- .../lib/mrb/mrb_variable_size_column.h | 6 +- .../mroonga/vendor/groonga/lib/mrb/mrb_void.h | 6 +- .../groonga/lib/mrb/mrb_window_definition.c | 164 + .../groonga/lib/mrb/mrb_window_definition.h | 32 + .../vendor/groonga/lib/mrb/mrb_writer.c | 21 +- .../vendor/groonga/lib/mrb/mrb_writer.h | 6 +- .../groonga/lib/mrb/scripts/Makefile.am | 5 +- .../groonga/lib/mrb/scripts/accessor.rb | 5 + .../vendor/groonga/lib/mrb/scripts/command.rb | 31 +- .../groonga/lib/mrb/scripts/command_input.rb | 15 + .../lib/mrb/scripts/command_line/grndb.rb | 433 +- .../lib/mrb/scripts/command_line_parser.rb | 168 + .../vendor/groonga/lib/mrb/scripts/context.rb | 33 + .../groonga/lib/mrb/scripts/context/rc.rb | 24 +- .../groonga/lib/mrb/scripts/database.rb | 64 +- .../groonga/lib/mrb/scripts/eval_context.rb | 5 + .../groonga/lib/mrb/scripts/expression.rb | 38 +- .../lib/mrb/scripts/expression_rewriter.rb | 22 + .../lib/mrb/scripts/expression_rewriters.rb | 41 + .../mrb/scripts/expression_size_estimator.rb | 168 +- .../lib/mrb/scripts/expression_tree.rb | 9 + .../mrb/scripts/expression_tree/Makefile.am | 9 + .../mrb/scripts/expression_tree/accessor.rb | 14 + .../expression_tree/binary_operation.rb | 67 + .../mrb/scripts/expression_tree/constant.rb | 22 + .../scripts/expression_tree/function_call.rb | 66 + .../scripts/expression_tree/index_column.rb | 14 + .../expression_tree/logical_operation.rb | 33 + .../mrb/scripts/expression_tree/options.rb | 14 + .../mrb/scripts/expression_tree/procedure.rb | 18 + .../mrb/scripts/expression_tree/sources.am | 10 + .../mrb/scripts/expression_tree/variable.rb | 18 + .../mrb/scripts/expression_tree_builder.rb | 111 + .../lib/mrb/scripts/fixed_size_column.rb | 5 + .../vendor/groonga/lib/mrb/scripts/id.rb | 12 + .../lib/mrb/scripts/initialize/post.rb | 9 + .../vendor/groonga/lib/mrb/scripts/logger.rb | 15 +- .../groonga/lib/mrb/scripts/logger/level.rb | 12 +- .../vendor/groonga/lib/mrb/scripts/object.rb | 7 + .../groonga/lib/mrb/scripts/query_logger.rb | 9 + .../lib/mrb/scripts/query_logger/Makefile.am | 9 + .../lib/mrb/scripts/query_logger/flag.rb | 39 + .../lib/mrb/scripts/query_logger/sources.am | 2 + .../vendor/groonga/lib/mrb/scripts/record.rb | 38 + .../vendor/groonga/lib/mrb/scripts/require.rb | 17 +- .../groonga/lib/mrb/scripts/scan_info.rb | 3 + .../lib/mrb/scripts/scan_info_builder.rb | 350 +- .../groonga/lib/mrb/scripts/scan_info_data.rb | 77 +- .../scripts/scan_info_data_size_estimator.rb | 185 + .../vendor/groonga/lib/mrb/scripts/sources.am | 13 + .../vendor/groonga/lib/mrb/scripts/table.rb | 56 +- .../groonga/lib/mrb/scripts/table_cursor.rb | 2 + .../groonga/lib/mrb/scripts/test/empty.rb | 1 - .../lib/mrb/scripts/variable_size_column.rb | 5 + .../mroonga/vendor/groonga/lib/mrb/sources.am | 20 + storage/mroonga/vendor/groonga/lib/nfkc.c | 80221 +--------------- storage/mroonga/vendor/groonga/lib/nfkc.rb | 989 +- storage/mroonga/vendor/groonga/lib/nfkc50.c | 77784 +++++++++++++++ .../mroonga/vendor/groonga/lib/normalizer.c | 8 +- storage/mroonga/vendor/groonga/lib/obj.c | 597 +- storage/mroonga/vendor/groonga/lib/operator.c | 600 +- storage/mroonga/vendor/groonga/lib/output.c | 1277 +- storage/mroonga/vendor/groonga/lib/pat.c | 1044 +- storage/mroonga/vendor/groonga/lib/plugin.c | 442 +- storage/mroonga/vendor/groonga/lib/proc.c | 5881 +- .../vendor/groonga/lib/proc/Makefile.am | 17 + .../vendor/groonga/lib/proc/proc_column.c | 1019 + .../vendor/groonga/lib/proc/proc_config.c | 139 + .../vendor/groonga/lib/proc/proc_dump.c | 1138 + .../groonga/lib/proc/proc_fuzzy_search.c | 467 + .../vendor/groonga/lib/proc/proc_highlight.c | 503 + .../vendor/groonga/lib/proc/proc_in_records.c | 519 + .../vendor/groonga/lib/proc/proc_lock.c | 172 + .../vendor/groonga/lib/proc/proc_object.c | 138 + .../groonga/lib/proc/proc_object_inspect.c | 614 + .../groonga/lib/proc/proc_object_list.c | 413 + .../vendor/groonga/lib/proc/proc_query.c | 118 + .../groonga/lib/proc/proc_query_log_flags.c | 220 + .../vendor/groonga/lib/proc/proc_schema.c | 1226 + .../vendor/groonga/lib/proc/proc_select.c | 3808 + .../vendor/groonga/lib/proc/proc_snippet.c | 319 + .../vendor/groonga/lib/proc/proc_table.c | 910 + .../vendor/groonga/lib/proc/proc_tokenize.c | 433 + .../vendor/groonga/lib/proc/sources.am | 18 + .../mroonga/vendor/groonga/lib/raw_string.c | 38 + storage/mroonga/vendor/groonga/lib/report.c | 98 + .../vendor/groonga/lib/request_canceler.c | 71 +- .../vendor/groonga/lib/request_timer.c | 88 + storage/mroonga/vendor/groonga/lib/scanner.c | 73 + storage/mroonga/vendor/groonga/lib/scorer.c | 14 +- storage/mroonga/vendor/groonga/lib/store.c | 1245 +- storage/mroonga/vendor/groonga/lib/str.c | 259 +- storage/mroonga/vendor/groonga/lib/string.c | 3 + storage/mroonga/vendor/groonga/lib/table.c | 122 + storage/mroonga/vendor/groonga/lib/thread.c | 59 + storage/mroonga/vendor/groonga/lib/time.c | 245 + .../mroonga/vendor/groonga/lib/token_cursor.c | 51 +- .../mroonga/vendor/groonga/lib/token_filter.c | 4 +- .../mroonga/vendor/groonga/lib/tokenizer.c | 2 +- .../mroonga/vendor/groonga/lib/tokenizers.c | 21 +- storage/mroonga/vendor/groonga/lib/ts.c | 906 + .../mroonga/vendor/groonga/lib/ts/Makefile.am | 20 + .../mroonga/vendor/groonga/lib/ts/sources.am | 25 + .../mroonga/vendor/groonga/lib/ts/ts_buf.c | 244 + .../mroonga/vendor/groonga/lib/ts/ts_buf.h | 111 + .../mroonga/vendor/groonga/lib/ts/ts_cursor.c | 163 + .../mroonga/vendor/groonga/lib/ts/ts_cursor.h | 59 + .../mroonga/vendor/groonga/lib/ts/ts_expr.c | 219 + .../mroonga/vendor/groonga/lib/ts/ts_expr.h | 87 + .../vendor/groonga/lib/ts/ts_expr_builder.c | 757 + .../vendor/groonga/lib/ts/ts_expr_builder.h | 128 + .../vendor/groonga/lib/ts/ts_expr_node.c | 5374 ++ .../vendor/groonga/lib/ts/ts_expr_node.h | 128 + .../vendor/groonga/lib/ts/ts_expr_parser.c | 1329 + .../vendor/groonga/lib/ts/ts_expr_parser.h | 107 + .../mroonga/vendor/groonga/lib/ts/ts_log.h | 46 + storage/mroonga/vendor/groonga/lib/ts/ts_op.c | 131 + storage/mroonga/vendor/groonga/lib/ts/ts_op.h | 87 + .../mroonga/vendor/groonga/lib/ts/ts_plan.c | 21 + .../mroonga/vendor/groonga/lib/ts/ts_plan.h | 87 + .../mroonga/vendor/groonga/lib/ts/ts_sorter.c | 2174 + .../mroonga/vendor/groonga/lib/ts/ts_sorter.h | 98 + .../mroonga/vendor/groonga/lib/ts/ts_str.c | 191 + .../mroonga/vendor/groonga/lib/ts/ts_str.h | 106 + .../mroonga/vendor/groonga/lib/ts/ts_types.h | 168 + .../mroonga/vendor/groonga/lib/ts/ts_util.c | 129 + .../mroonga/vendor/groonga/lib/ts/ts_util.h | 61 + storage/mroonga/vendor/groonga/lib/type.c | 87 + storage/mroonga/vendor/groonga/lib/util.c | 404 +- .../vendor/groonga/lib/window_function.c | 464 + .../vendor/groonga/lib/window_functions.c | 405 + storage/mroonga/vendor/groonga/lib/windows.c | 104 + .../vendor/groonga/lib/windows_event_logger.c | 203 + storage/mroonga/vendor/groonga/nginx_version | 2 +- .../vendor/groonga/plugins/CMakeLists.txt | 3 +- .../vendor/groonga/plugins/Makefile.am | 4 +- .../CMakeLists.txt | 23 +- .../plugins/expression_rewriters/Makefile.am | 9 + .../plugins/expression_rewriters/optimizer.rb | 147 + .../plugins/expression_rewriters/sources.am | 2 + .../groonga/plugins/functions/CMakeLists.txt | 103 +- .../groonga/plugins/functions/Makefile.am | 13 + .../groonga/plugins/functions/index_column.c | 266 + .../plugins/functions/index_column_sources.am | 2 + .../vendor/groonga/plugins/functions/math.c | 142 + .../groonga/plugins/functions/math_sources.am | 2 + .../vendor/groonga/plugins/functions/number.c | 187 + .../plugins/functions/number_sources.am | 2 + .../vendor/groonga/plugins/functions/string.c | 299 + .../plugins/functions/string_sources.am | 2 + .../vendor/groonga/plugins/functions/time.c | 376 + .../groonga/plugins/functions/time_sources.am | 2 + .../vendor/groonga/plugins/functions/vector.c | 309 +- .../plugins/query_expanders/Makefile.am | 4 +- .../groonga/plugins/query_expanders/tsv.c | 55 +- .../groonga/plugins/ruby/CMakeLists.txt | 50 +- .../vendor/groonga/plugins/ruby/Makefile.am | 26 +- .../vendor/groonga/plugins/ruby/eval.c | 68 - .../vendor/groonga/plugins/ruby/eval.rb | 36 + .../groonga/plugins/ruby/eval_sources.am | 3 - .../vendor/groonga/plugins/ruby/load.c | 67 - .../groonga/plugins/ruby/load_sources.am | 3 - .../vendor/groonga/plugins/ruby/ruby_plugin.h | 76 - .../vendor/groonga/plugins/ruby/sources.am | 2 + .../vendor/groonga/plugins/sharding.rb | 5 + .../groonga/plugins/sharding/logical_count.rb | 53 +- .../plugins/sharding/logical_enumerator.rb | 79 +- .../plugins/sharding/logical_parameters.rb | 44 + .../plugins/sharding/logical_range_filter.rb | 364 +- .../plugins/sharding/logical_select.rb | 789 +- .../plugins/sharding/logical_shard_list.rb | 28 + .../plugins/sharding/logical_table_remove.rb | 307 +- .../groonga/plugins/sharding/parameters.rb | 10 + .../sharding/range_expression_builder.rb | 51 +- .../groonga/plugins/sharding/sources.am | 3 + .../groonga/plugins/suggest/CMakeLists.txt | 3 +- .../vendor/groonga/plugins/suggest/suggest.c | 21 +- .../vendor/groonga/plugins/table/Makefile.am | 24 - .../vendor/groonga/plugins/table/sources.am | 2 - .../vendor/groonga/plugins/table/table.c | 747 - .../groonga/plugins/token_filters/stem.c | 14 +- .../groonga/plugins/tokenizers/CMakeLists.txt | 11 + .../groonga/plugins/tokenizers/Makefile.am | 6 +- .../vendor/groonga/plugins/tokenizers/mecab.c | 120 +- storage/mroonga/vendor/groonga/ra.rb | 12 - .../mroonga/vendor/groonga/src/CMakeLists.txt | 14 + .../mroonga/vendor/groonga/src/Makefile.am | 4 + storage/mroonga/vendor/groonga/src/grndb.c | 64 +- storage/mroonga/vendor/groonga/src/groonga.c | 1067 +- .../vendor/groonga/src/groonga_benchmark.c | 62 +- .../vendor/groonga/src/httpd/Makefile.am | 2 +- .../nginx-module/ngx_http_groonga_module.c | 739 +- .../vendor/groonga/src/suggest/CMakeLists.txt | 3 +- .../vendor/groonga/src/suggest/Makefile.am | 3 - .../suggest/groonga_suggest_create_dataset.c | 21 +- .../src/suggest/groonga_suggest_httpd.c | 4 +- .../src/suggest/groonga_suggest_learner.c | 4 +- .../mroonga/vendor/groonga/tools/Makefile.am | 1 + .../groonga/tools/check-small-index-limit.rb | 123 + .../tools/groonga-benchmark-indexing.rb | 129 + .../tools/groonga-memory-usage-analyzer.rb | 127 + .../tools/groonga-object-list-checker.rb | 104 + .../groonga/tools/travis-before-script.sh | 11 +- .../vendor/groonga/tools/travis-install.sh | 15 +- .../vendor/groonga/tools/travis-script.sh | 70 +- .../vendor/groonga/vendor/CMakeLists.txt | 5 +- .../mroonga/vendor/groonga/vendor/Makefile.am | 12 +- .../vendor/groonga/vendor/download_lz4.rb | 54 + .../vendor/groonga/vendor/download_mecab.rb | 59 + .../groonga/vendor/download_message_pack.rb | 54 + .../vendor/groonga/vendor/lz4/CMakeLists.txt | 98 + .../vendor/groonga/vendor/lz4/Makefile.am | 2 + .../groonga/vendor/mecab/CMakeLists.txt | 219 + .../vendor/groonga/vendor/mecab/Makefile.am | 4 + .../groonga/vendor/mecab/config.h.cmake | 1 + .../vendor/groonga/vendor/mecab/mecabrc.cmake | 3 + .../vendor/message_pack/CMakeLists.txt | 53 + .../groonga/vendor/message_pack/Makefile.am | 2 + .../groonga/vendor/mruby/CMakeLists.txt | 40 +- .../vendor/groonga/vendor/mruby/Makefile.am | 27 +- .../groonga/vendor/mruby/build_config.rb | 21 +- .../groonga/vendor/mruby/built_sources.am | 5 +- .../groonga/vendor/mruby/mruby_build.rb | 10 + .../vendor/groonga/vendor/mruby/version | 1 + .../groonga/vendor/onigmo/CMakeLists.txt | 72 +- .../vendor/groonga/vendor/onigmo/Makefile.am | 2 + .../groonga-normalizer-mysql/CMakeLists.txt | 8 +- .../groonga-normalizer-mysql/configure.ac | 33 +- .../groonga-normalizer-mysql/doc/text/news.md | 13 +- .../packages/apt/Makefile.am | 2 +- .../packages/apt/Vagrantfile | 12 +- .../packages/apt/sign-packages.sh | 2 +- .../packages/apt/sign-repository.sh | 2 +- .../packages/apt/update-repository.sh | 2 +- .../centos/groonga-normalizer-mysql.spec.in | 3 + .../fedora/groonga-normalizer-mysql.spec.in | 3 + .../packages/ubuntu/Makefile.am | 2 +- .../packages/yum/Makefile.am | 3 +- .../packages/yum/Vagrantfile | 6 +- .../plugins/groonga-normalizer-mysql/version | 2 +- storage/mroonga/version | 2 +- storage/mroonga/version_in_hex | 2 +- storage/mroonga/version_major | 2 +- storage/mroonga/version_micro | 2 +- storage/myisam/mi_extra.c | 2 +- storage/oqgraph/graphcore.cc | 14 +- .../mysql-test/oqgraph/general-Aria.result | 99 +- .../mysql-test/oqgraph/general-MyISAM.result | 99 +- .../mysql-test/oqgraph/general-innodb.result | 99 +- .../oqgraph/regression_1196036.result | 6 +- .../oqgraph/regression_1213120.result | 71 +- storage/oqgraph/oqgraph_shim.h | 6 +- storage/perfschema/pfs.cc | 6 +- storage/sphinx/ha_sphinx.cc | 12 +- storage/tokudb/CMakeLists.txt | 1 + .../third_party/snappy-1.1.2/CMakeLists.txt | 1 + .../third_party/xz-4.999.9beta/configure | 92 - .../third_party/xz-4.999.9beta/configure.ac | 57 - .../third_party/xz-4.999.9beta/m4/libtool.m4 | 6 +- .../mysql-test/tokudb/r/type_blob.result | 2 +- storage/xtradb/btr/btr0btr.cc | 2 +- storage/xtradb/btr/btr0cur.cc | 14 +- storage/xtradb/buf/buf0buf.cc | 58 +- storage/xtradb/buf/buf0flu.cc | 3 - storage/xtradb/buf/buf0lru.cc | 297 +- storage/xtradb/dict/dict0dict.cc | 57 +- storage/xtradb/fil/fil0fil.cc | 186 +- storage/xtradb/fil/fil0pagecompress.cc | 12 +- storage/xtradb/fts/fts0fts.cc | 74 +- storage/xtradb/fts/fts0que.cc | 7 +- storage/xtradb/handler/ha_innodb.cc | 13 +- storage/xtradb/handler/handler0alter.cc | 189 +- storage/xtradb/handler/i_s.cc | 27 +- storage/xtradb/ibuf/ibuf0ibuf.cc | 28 +- storage/xtradb/include/buf0buf.h | 1 + storage/xtradb/include/buf0lru.h | 18 +- storage/xtradb/include/buf0types.h | 11 - storage/xtradb/include/data0type.ic | 2 +- storage/xtradb/include/dict0dict.h | 11 - storage/xtradb/include/fil0fil.h | 15 +- storage/xtradb/include/fts0fts.h | 17 +- storage/xtradb/include/mtr0log.ic | 2 +- storage/xtradb/include/row0merge.h | 7 +- storage/xtradb/lock/lock0lock.cc | 6 +- storage/xtradb/log/log0crypt.cc | 2 +- storage/xtradb/os/os0file.cc | 46 +- storage/xtradb/row/row0import.cc | 27 +- storage/xtradb/row/row0ins.cc | 13 +- storage/xtradb/row/row0log.cc | 29 +- storage/xtradb/row/row0merge.cc | 45 +- storage/xtradb/row/row0mysql.cc | 45 +- storage/xtradb/row/row0quiesce.cc | 4 +- storage/xtradb/row/row0sel.cc | 3 +- storage/xtradb/row/row0umod.cc | 2 +- storage/xtradb/row/row0upd.cc | 2 +- storage/xtradb/srv/srv0srv.cc | 2 +- storage/xtradb/trx/trx0purge.cc | 2 +- storage/xtradb/trx/trx0rec.cc | 26 +- storage/xtradb/trx/trx0trx.cc | 5 +- storage/xtradb/trx/trx0undo.cc | 15 +- storage/xtradb/ut/ut0dbg.cc | 2 +- strings/ctype-utf8.c | 3 - strings/dtoa.c | 8 +- win/packaging/ca/CustomAction.cpp | 45 +- 2179 files changed, 181946 insertions(+), 116418 deletions(-) create mode 100644 mysql-test/r/delimiter_command_case_sensitivity.result create mode 100644 mysql-test/r/mdev13607.result delete mode 100644 mysql-test/r/not_windows.require create mode 100644 mysql-test/r/show_function_with_pad_char_to_full_length.result create mode 100644 mysql-test/suite/galera/r/MW-388.result create mode 100644 mysql-test/suite/galera/r/MW-402.result create mode 100644 mysql-test/suite/galera/t/MW-388.test create mode 100644 mysql-test/suite/galera/t/MW-402.test create mode 100644 mysql-test/suite/innodb/r/table_definition_cache_debug.result create mode 100644 mysql-test/suite/innodb/r/undo_log.result create mode 100644 mysql-test/suite/innodb/t/table_definition_cache_debug.opt create mode 100644 mysql-test/suite/innodb/t/table_definition_cache_debug.test create mode 100644 mysql-test/suite/innodb/t/undo_log.test create mode 100644 mysql-test/suite/innodb_fts/r/concurrent_insert.result create mode 100644 mysql-test/suite/innodb_fts/t/concurrent_insert.test rename mysql-test/suite/{innodb/r/innodb-wl5522-debug-zip.result => innodb_zip/r/wl5522_debug_zip.result} (93%) rename mysql-test/suite/{innodb/t/innodb-wl5522-debug-zip.test => innodb_zip/t/wl5522_debug_zip.test} (84%) create mode 100644 mysql-test/suite/mariabackup/compress_qpress.result create mode 100644 mysql-test/suite/mariabackup/compress_qpress.test create mode 100644 mysql-test/suite/mariabackup/data_directory.result create mode 100644 mysql-test/suite/mariabackup/data_directory.test create mode 100644 mysql-test/suite/mariabackup/partition_datadir.opt create mode 100644 mysql-test/suite/mariabackup/partition_datadir.result create mode 100644 mysql-test/suite/mariabackup/partition_datadir.test create mode 100644 mysql-test/suite/parts/r/partition_alter_maria.result create mode 100644 mysql-test/suite/parts/t/partition_alter_maria.test create mode 100644 mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.opt create mode 100644 mysql-test/t/delimiter_case_mdev_10728.sql create mode 100644 mysql-test/t/delimiter_command_case_sensitivity.test create mode 100644 mysql-test/t/mdev13607.test create mode 100644 mysql-test/t/show_function_with_pad_char_to_full_length.test create mode 100644 storage/mroonga/lib/mrn_column_name.cpp create mode 100644 storage/mroonga/lib/mrn_column_name.hpp create mode 100644 storage/mroonga/lib/mrn_context_pool.cpp create mode 100644 storage/mroonga/lib/mrn_context_pool.hpp create mode 100644 storage/mroonga/lib/mrn_count_skip_checker.cpp create mode 100644 storage/mroonga/lib/mrn_count_skip_checker.hpp create mode 100644 storage/mroonga/lib/mrn_current_thread.hpp create mode 100644 storage/mroonga/lib/mrn_database.cpp create mode 100644 storage/mroonga/lib/mrn_database.hpp create mode 100644 storage/mroonga/lib/mrn_operation.cpp create mode 100644 storage/mroonga/lib/mrn_operation.hpp create mode 100644 storage/mroonga/lib/mrn_operations.cpp create mode 100644 storage/mroonga/lib/mrn_operations.hpp create mode 100644 storage/mroonga/lib/mrn_query_parser.cpp create mode 100644 storage/mroonga/lib/mrn_query_parser.hpp create mode 100644 storage/mroonga/lib/mrn_smart_bitmap.cpp create mode 100644 storage/mroonga/lib/mrn_smart_bitmap.hpp create mode 100644 storage/mroonga/lib/mrn_table_fields_offset_mover.cpp create mode 100644 storage/mroonga/lib/mrn_table_fields_offset_mover.hpp rename storage/mroonga/mysql-test/mroonga/include/mroonga/{have_64bit.inc => check_64bit.inc} (83%) create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zstd.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/check_solaris.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/check_strict_sql_mode.inc delete mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/have_32bit.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb_10_2_or_later.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql_5_7_or_later.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/have_signed_64bit_time_t.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/have_solaris.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/have_strict_sql_mode.inc rename storage/mroonga/mysql-test/mroonga/include/mroonga/{have_version_55.inc => have_version_10_0.inc} (83%) rename storage/mroonga/mysql-test/mroonga/include/mroonga/{have_version_100_or_later.inc => have_version_10_0_or_later.inc} (82%) rename storage/mroonga/mysql-test/mroonga/include/mroonga/{have_version_100.inc => have_version_5_5.inc} (84%) rename storage/mroonga/mysql-test/mroonga/include/mroonga/{have_version_56.inc => have_version_5_6.inc} (90%) rename storage/mroonga/mysql-test/mroonga/include/mroonga/{have_version_56_or_later.inc => have_version_5_6_or_later.inc} (88%) rename storage/mroonga/mysql-test/mroonga/include/mroonga/{have_version_57.inc => have_version_5_7.inc} (90%) create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7_or_later.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_0_or_later.inc rename storage/mroonga/mysql-test/mroonga/include/mroonga/{skip_mariadb_55.inc => skip_mariadb_10_1.inc} (85%) create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1_or_earlier.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_2_or_later.inc rename storage/mroonga/mysql-test/mroonga/include/mroonga/{skip_mariadb_100_or_later.inc => skip_mariadb_5_5.inc} (85%) rename storage/mroonga/mysql-test/mroonga/include/mroonga/{skip_mysql_55.inc => skip_mysql_5_5.inc} (85%) rename storage/mroonga/mysql-test/mroonga/include/mroonga/{skip_mysql_57.inc => skip_mysql_5_7.inc} (91%) create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_7_or_later.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/skip_signed_64bit_time_t.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris.inc delete mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris10.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/skip_strict_sql_mode.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zstd.inc create mode 100644 storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zstd.inc create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_cp932.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_utf8.result rename storage/mroonga/mysql-test/mroonga/storage/r/{alter_table_engine_decimal.result => alter_table_change_engine_decimal.result} (63%) rename storage/mroonga/mysql-test/mroonga/storage/r/{alter_table_change_engine.result => alter_table_change_engine_fulltext_index.result} (64%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/check_table_broken.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/check_table_not_broken.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_strict_sql_mode_out_of_range.result rename storage/mroonga/mysql-test/mroonga/storage/r/{column_datetime_64bit_version_55_out_of_range.result => column_datetime_64bit_version_5_5_out_of_range.result} (65%) rename storage/mroonga/mysql-test/mroonga/storage/r/{column_datetime_64bit_version_56_or_later_out_of_range.result => column_datetime_64bit_version_5_6_or_later_out_of_range.result} (65%) rename storage/mroonga/mysql-test/mroonga/storage/r/{column_datetime_zero_date_strict.result => column_datetime_mariadb_10_2_or_later_zero_date.result} (61%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_month_day.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_date.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_month_day.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_month_day.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_add_column.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_delete.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_drop_column.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_insert.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_reindex.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_update.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_add_column.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_delete.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_drop_column.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_insert.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_add_index.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mysql_5_7_or_later_add_index.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_update.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_zstd.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_zstd.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_json_insert.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_cp932.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_utf8.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/count_star.result rename storage/mroonga/mysql-test/mroonga/storage/r/{create_table_field_flags_comment.result => create_table_column_flags_comment.result} (60%) rename storage/mroonga/mysql-test/mroonga/storage/r/{create_table_field_flags_parameter.result => create_table_column_flags_parameter.result} (59%) rename storage/mroonga/mysql-test/mroonga/storage/r/{create_table_field_groonga_type_comment.result => create_table_column_groonga_type_comment.result} (70%) rename storage/mroonga/mysql-test/mroonga/storage/r/{create_table_field_groonga_type_nonexistent.result => create_table_column_groonga_type_nonexistent.result} (100%) rename storage/mroonga/mysql-test/mroonga/storage/r/{create_table_field_groonga_type_parameter.result => create_table_column_groonga_type_parameter.result} (74%) rename storage/mroonga/mysql-test/mroonga/storage/r/{create_table_field_type_comment.result => create_table_column_type_comment.result} (70%) rename storage/mroonga/mysql-test/mroonga/storage/r/{create_table_field_type_nonexistent.result => create_table_column_type_nonexistent.result} (100%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_medium.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_small.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_fulltext_index_bin.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_index_bin.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/drop_database_no_table.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_add.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_drop.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_existent.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_nonexistent.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_existent.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_nonexistent.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_rename.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_existent.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_nonexistent.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_operator.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_selector.result rename storage/mroonga/mysql-test/mroonga/storage/r/{fulltext_version_100_no_such_key.result => fulltext_version_10_0_no_such_key.result} (100%) rename storage/mroonga/mysql-test/mroonga/storage/r/{fulltext_version_55_no_such_key.result => fulltext_version_5_5_no_such_key.result} (100%) rename storage/mroonga/mysql-test/mroonga/storage/r/{fulltext_version_56_no_such_key.result => fulltext_version_5_6_no_such_key.result} (100%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_command_auto-escape.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_command_special-database-name.result rename storage/mroonga/mysql-test/mroonga/storage/r/{function_escape_success_all.result => function_escape_query_all.result} (100%) rename storage/mroonga/mysql-test/mroonga/storage/r/{function_escape_success_custom.result => function_escape_query_custom.result} (100%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_join.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_match_against.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_named.result rename storage/mroonga/mysql-test/mroonga/storage/r/{function_escape_success_nested.result => function_escape_query_nested.result} (100%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_decimal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_integer.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_real.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_string.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_dynamic_keyword.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_japanese.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_multiple_keywords.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_normalizer.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query_pragma.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_record.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_default.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_normalizer.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_record.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_multiple.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_no_index.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_one.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_pragma.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_dynamic_keyword.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_japanese.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_keywords.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_snippets.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query_pragma.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_record.result rename storage/mroonga/mysql-test/mroonga/storage/r/{geometry_bulk_insert_null_57.result => geometry_strict_sql_mode_bulk_insert_null.result} (58%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/geometry_strict_sql_mode_contains.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_hash_strict_sql_mode_id_primary.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_asc_asc.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_desc_desc.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_strict_sql_mode_update.result rename storage/mroonga/mysql-test/mroonga/storage/r/{index_multiple_column_range_not_used_in_order_by_greater_than.result => index_multiple_column_range_all_used_greater_than.result} (100%) rename storage/mroonga/mysql-test/mroonga/storage/r/{index_multiple_column_range_not_used_in_order_by_greater_than_or_equal.result => index_multiple_column_range_all_used_greater_than_or_equal.result} (100%) rename storage/mroonga/mysql-test/mroonga/storage/r/{index_multiple_column_range_not_used_in_order_by_less_than.result => index_multiple_column_range_all_used_less_than.result} (100%) rename storage/mroonga/mysql-test/mroonga/storage/r/{index_multiple_column_range_not_used_in_order_by_less_than_or_equal.result => index_multiple_column_range_all_used_less_than_or_equal.result} (100%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_max.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_min.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/index_unique_delete_all.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/insert_virtual_column.result delete mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_TODO_SPLIT_ME.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_and.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_between.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_equal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_boolean_mode.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_natural_language_mode.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater_equal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less_equal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_multiple_conditions.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_between.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_equal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater_equal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less_equal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_not_equal.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_multiple_match_againsts.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_cp932.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_name.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_value.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/update_binlog_row.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_new_value.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_same_value.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/variable_enable_operations_recording_insert.result rename storage/mroonga/mysql-test/mroonga/storage/{t/variable_max_n_records_for_estimate_global.result => r/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.result} (65%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_not_found_in_limit.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_not_found_in_limit.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_empty_value.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_null_value.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_empty_value.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_null_value.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_new_value.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_same_value.result create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_cp932.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_utf8.test rename storage/mroonga/mysql-test/mroonga/storage/t/{alter_table_engine_decimal.test => alter_table_change_engine_decimal.test} (84%) rename storage/mroonga/mysql-test/mroonga/storage/t/{alter_table_change_engine.test => alter_table_change_engine_fulltext_index.test} (90%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/check_table_broken.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/check_table_not_broken.test rename storage/mroonga/mysql-test/mroonga/storage/t/{column_datetime_64bit_version_56_or_later_out_of_range.test => column_datetime_64bit_strict_sql_mode_out_of_range.test} (86%) rename storage/mroonga/mysql-test/mroonga/storage/t/{column_datetime_64bit_version_55_out_of_range.test => column_datetime_64bit_version_5_5_out_of_range.test} (89%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_6_or_later_out_of_range.test rename storage/mroonga/mysql-test/mroonga/storage/t/{column_datetime_zero_date_strict.test => column_datetime_mariadb_10_2_or_later_zero_date.test} (88%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_month_day.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_date.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_month_day.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_month_day.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_add_column.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_delete.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_drop_column.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_insert.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_reindex.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_update.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_add_column.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_delete.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_drop_column.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_insert.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_add_index.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mysql_5_7_or_later_add_index.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_update.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zstd.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zstd.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_json_insert.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_cp932.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_utf8.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/count_star.test rename storage/mroonga/mysql-test/mroonga/storage/t/{create_table_field_flags_comment.test => create_table_column_flags_comment.test} (98%) rename storage/mroonga/mysql-test/mroonga/storage/t/{create_table_field_flags_parameter.test => create_table_column_flags_parameter.test} (97%) rename storage/mroonga/mysql-test/mroonga/storage/t/{create_table_field_groonga_type_comment.test => create_table_column_groonga_type_comment.test} (98%) rename storage/mroonga/mysql-test/mroonga/storage/t/{create_table_field_groonga_type_nonexistent.test => create_table_column_groonga_type_nonexistent.test} (98%) rename storage/mroonga/mysql-test/mroonga/storage/t/{create_table_field_groonga_type_parameter.test => create_table_column_groonga_type_parameter.test} (95%) rename storage/mroonga/mysql-test/mroonga/storage/t/{create_table_field_type_comment.test => create_table_column_type_comment.test} (98%) rename storage/mroonga/mysql-test/mroonga/storage/t/{create_table_field_type_nonexistent.test => create_table_column_type_nonexistent.test} (98%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_medium.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_small.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_fulltext_index_bin.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_index_bin.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/drop_database_no_table.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_add.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_drop.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_existent.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_nonexistent.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_existent.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_nonexistent.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_rename.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_existent.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_nonexistent.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_operator.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_selector.test rename storage/mroonga/mysql-test/mroonga/storage/t/{fulltext_version_56_no_such_key.test => fulltext_version_10_0_no_such_key.test} (95%) rename storage/mroonga/mysql-test/mroonga/storage/t/{fulltext_version_55_no_such_key.test => fulltext_version_5_5_no_such_key.test} (95%) rename storage/mroonga/mysql-test/mroonga/storage/t/{fulltext_version_100_no_such_key.test => fulltext_version_5_6_no_such_key.test} (95%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_command_auto-escape.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_command_special-database-name.test rename storage/mroonga/mysql-test/mroonga/storage/t/{function_escape_success_all.test => function_escape_query_all.test} (98%) rename storage/mroonga/mysql-test/mroonga/storage/t/{function_escape_success_custom.test => function_escape_query_custom.test} (98%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_join.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_match_against.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_named.test rename storage/mroonga/mysql-test/mroonga/storage/t/{function_escape_success_nested.test => function_escape_query_nested.test} (98%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_decimal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_integer.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_real.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_string.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_dynamic_keyword.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_japanese.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_multiple_keywords.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_normalizer.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query_pragma.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_record.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_default.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_normalizer.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_record.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_multiple.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_no_index.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_one.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_pragma.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_dynamic_keyword.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_japanese.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_keywords.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_snippets.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query_pragma.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_record.test rename storage/mroonga/mysql-test/mroonga/storage/t/{geometry_bulk_insert_null_57.test => geometry_strict_sql_mode_bulk_insert_null.test} (86%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/geometry_strict_sql_mode_contains.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_hash_strict_sql_mode_id_primary.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_asc_asc.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_desc_desc.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_strict_sql_mode_update.test rename storage/mroonga/mysql-test/mroonga/storage/t/{index_multiple_column_range_not_used_in_order_by_greater_than.test => index_multiple_column_range_all_used_greater_than.test} (98%) rename storage/mroonga/mysql-test/mroonga/storage/t/{index_multiple_column_range_not_used_in_order_by_greater_than_or_equal.test => index_multiple_column_range_all_used_greater_than_or_equal.test} (98%) rename storage/mroonga/mysql-test/mroonga/storage/t/{index_multiple_column_range_not_used_in_order_by_less_than.test => index_multiple_column_range_all_used_less_than.test} (98%) rename storage/mroonga/mysql-test/mroonga/storage/t/{index_multiple_column_range_not_used_in_order_by_less_than_or_equal.test => index_multiple_column_range_all_used_less_than_or_equal.test} (98%) create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_max.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_min.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_all.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/insert_virtual_column.test delete mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_TODO_SPLIT_ME.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_and.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_equal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_boolean_mode.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_natural_language_mode.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_multiple_conditions.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_equal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less_equal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_not_equal.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_multiple_match_againsts.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_cp932.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_name.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_value.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/update_binlog_row.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_new_value.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_same_value.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_not_found_in_limit.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_not_found_in_limit.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_empty_value.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_null_value.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_empty_value.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_null_value.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_new_value.test create mode 100644 storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_same_value.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_cp932.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_utf8.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/check_table_for_upgrade.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_add_column.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_delete.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_drop_column.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_insert.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_reindex.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_update.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_column.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_fulltext_index.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_index.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_delete.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_drop_column.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_insert.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_update.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_cp932.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_utf8.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/count_star.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_mysql_5_7_or_later_with_index.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_normalizer_fulltext_index_bin.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/drop_table_new_connection.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/r/multi_range_read_mysql_5_7_or_later_disk_sweep.result create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_cp932.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_utf8.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/check_table_for_upgrade.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_add_column.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_delete.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_drop_column.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_insert.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_reindex.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_update.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_column.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_fulltext_index.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_index.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_delete.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_drop_column.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_insert.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_update.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_cp932.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_utf8.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/count_star.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_mysql_5_7_or_later_with_index.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_fulltext_index_bin.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/drop_table_new_connection.test create mode 100644 storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_mysql_5_7_or_later_disk_sweep.test delete mode 100755 storage/mroonga/packages/check-utility.sh delete mode 100644 storage/mroonga/packages/windows/build-vc2013-msi-32.bat delete mode 100644 storage/mroonga/packages/windows/build-vc2013-msi-64.bat delete mode 100644 storage/mroonga/packages/windows/build-vc2013-zip-32.bat delete mode 100644 storage/mroonga/packages/windows/build-vc2013-zip-64.bat delete mode 100644 storage/mroonga/packages/windows/build-vc2013.bat create mode 100644 storage/mroonga/udf/mrn_udf_highlight_html.cpp create mode 100644 storage/mroonga/udf/mrn_udf_normalize.cpp create mode 100644 storage/mroonga/udf/mrn_udf_query_expand.cpp create mode 100644 storage/mroonga/udf/mrn_udf_snippet_html.cpp create mode 100644 storage/mroonga/vendor/groonga/benchmark/bench-between-sequential.c create mode 100644 storage/mroonga/vendor/groonga/benchmark/bench-cache.c create mode 100644 storage/mroonga/vendor/groonga/benchmark/bench-nfkc.c create mode 100644 storage/mroonga/vendor/groonga/benchmark/bench-result-set.c create mode 100644 storage/mroonga/vendor/groonga/bundled_lz4_version create mode 100644 storage/mroonga/vendor/groonga/bundled_mecab_naist_jdic_version create mode 100644 storage/mroonga/vendor/groonga/bundled_mecab_version create mode 100644 storage/mroonga/vendor/groonga/bundled_message_pack_version delete mode 100644 storage/mroonga/vendor/groonga/examples/dictionary/html/js/jquery-ui-1.8.18.custom.min.js create mode 100644 storage/mroonga/vendor/groonga/groonga-arrow.pc.in create mode 100644 storage/mroonga/vendor/groonga/include/groonga.hpp create mode 100644 storage/mroonga/vendor/groonga/include/groonga/accessor.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/array.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/arrow.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/arrow.hpp create mode 100644 storage/mroonga/vendor/groonga/include/groonga/cache.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/column.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/config.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/dat.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/db.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/dump.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/error.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/file_reader.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/geo.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/hash.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/id.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/operator.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/pat.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/request_timer.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/table.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/thread.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/time.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/type.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/window_function.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/windows.h create mode 100644 storage/mroonga/vendor/groonga/include/groonga/windows_event_logger.h create mode 100644 storage/mroonga/vendor/groonga/lib/alloc.c create mode 100644 storage/mroonga/vendor/groonga/lib/arrow.cpp rename storage/mroonga/vendor/groonga/lib/{sources.am => c_sources.am} (57%) create mode 100644 storage/mroonga/vendor/groonga/lib/cache.c create mode 100644 storage/mroonga/vendor/groonga/lib/column.c create mode 100644 storage/mroonga/vendor/groonga/lib/config.c create mode 100644 storage/mroonga/vendor/groonga/lib/cpp_sources.am create mode 100644 storage/mroonga/vendor/groonga/lib/dump.c delete mode 100644 storage/mroonga/vendor/groonga/lib/egn.cpp create mode 100644 storage/mroonga/vendor/groonga/lib/expr_executor.c create mode 100644 storage/mroonga/vendor/groonga/lib/file_lock.c create mode 100644 storage/mroonga/vendor/groonga/lib/file_reader.c create mode 100644 storage/mroonga/vendor/groonga/lib/grn_alloc.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_cache.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_config.h delete mode 100644 storage/mroonga/vendor/groonga/lib/grn_egn.h delete mode 100644 storage/mroonga/vendor/groonga/lib/grn_egn.hpp create mode 100644 storage/mroonga/vendor/groonga/lib/grn_expr_executor.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_file_lock.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_index_column.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_load.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_nfkc.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_obj.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_raw_string.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_report.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_request_timer.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_scanner.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_time.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_ts.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_window_function.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_window_functions.h create mode 100644 storage/mroonga/vendor/groonga/lib/grn_windows.h create mode 100644 storage/mroonga/vendor/groonga/lib/id.c create mode 100644 storage/mroonga/vendor/groonga/lib/index_column.c delete mode 100644 storage/mroonga/vendor/groonga/lib/libgroonga.c create mode 100644 storage/mroonga/vendor/groonga/lib/load.c create mode 100644 storage/mroonga/vendor/groonga/lib/metadata.rc.in create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_cache.c create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_cache.h create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_command_version.c create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_command_version.h create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_config.c create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_config.h create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_eval_context.c create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_eval_context.h create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_indexable.c create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_indexable.h create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_pointer.c create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_pointer.h create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_query_logger.c create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_query_logger.h create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_record.c create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_record.h create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_thread.c create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_thread.h create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_window_definition.c create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/mrb_window_definition.h create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/accessor.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/command_input.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/command_line_parser.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_rewriter.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_rewriters.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree/Makefile.am create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree/accessor.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree/binary_operation.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree/constant.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree/function_call.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree/index_column.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree/logical_operation.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree/options.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree/procedure.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree/sources.am create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree/variable.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/expression_tree_builder.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/fixed_size_column.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/id.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/query_logger.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/query_logger/Makefile.am create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/query_logger/flag.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/query_logger/sources.am create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/record.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/scan_info_data_size_estimator.rb delete mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/test/empty.rb create mode 100644 storage/mroonga/vendor/groonga/lib/mrb/scripts/variable_size_column.rb create mode 100644 storage/mroonga/vendor/groonga/lib/nfkc50.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/Makefile.am create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_column.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_config.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_dump.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_fuzzy_search.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_highlight.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_in_records.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_lock.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_object.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_object_inspect.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_object_list.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_query.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_query_log_flags.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_schema.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_select.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_snippet.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_table.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/proc_tokenize.c create mode 100644 storage/mroonga/vendor/groonga/lib/proc/sources.am create mode 100644 storage/mroonga/vendor/groonga/lib/raw_string.c create mode 100644 storage/mroonga/vendor/groonga/lib/report.c create mode 100644 storage/mroonga/vendor/groonga/lib/request_timer.c create mode 100644 storage/mroonga/vendor/groonga/lib/scanner.c create mode 100644 storage/mroonga/vendor/groonga/lib/table.c create mode 100644 storage/mroonga/vendor/groonga/lib/thread.c create mode 100644 storage/mroonga/vendor/groonga/lib/time.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts/Makefile.am create mode 100644 storage/mroonga/vendor/groonga/lib/ts/sources.am create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_buf.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_buf.h create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_cursor.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_cursor.h create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_expr.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_expr.h create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_expr_builder.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_expr_builder.h create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.h create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_expr_parser.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_expr_parser.h create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_log.h create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_op.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_op.h create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_plan.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_plan.h create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_sorter.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_sorter.h create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_str.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_str.h create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_types.h create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_util.c create mode 100644 storage/mroonga/vendor/groonga/lib/ts/ts_util.h create mode 100644 storage/mroonga/vendor/groonga/lib/type.c create mode 100644 storage/mroonga/vendor/groonga/lib/window_function.c create mode 100644 storage/mroonga/vendor/groonga/lib/window_functions.c create mode 100644 storage/mroonga/vendor/groonga/lib/windows.c create mode 100644 storage/mroonga/vendor/groonga/lib/windows_event_logger.c rename storage/mroonga/vendor/groonga/plugins/{table => expression_rewriters}/CMakeLists.txt (57%) create mode 100644 storage/mroonga/vendor/groonga/plugins/expression_rewriters/Makefile.am create mode 100644 storage/mroonga/vendor/groonga/plugins/expression_rewriters/optimizer.rb create mode 100644 storage/mroonga/vendor/groonga/plugins/expression_rewriters/sources.am create mode 100644 storage/mroonga/vendor/groonga/plugins/functions/index_column.c create mode 100644 storage/mroonga/vendor/groonga/plugins/functions/index_column_sources.am create mode 100644 storage/mroonga/vendor/groonga/plugins/functions/math.c create mode 100644 storage/mroonga/vendor/groonga/plugins/functions/math_sources.am create mode 100644 storage/mroonga/vendor/groonga/plugins/functions/number.c create mode 100644 storage/mroonga/vendor/groonga/plugins/functions/number_sources.am create mode 100644 storage/mroonga/vendor/groonga/plugins/functions/string.c create mode 100644 storage/mroonga/vendor/groonga/plugins/functions/string_sources.am create mode 100644 storage/mroonga/vendor/groonga/plugins/functions/time.c create mode 100644 storage/mroonga/vendor/groonga/plugins/functions/time_sources.am delete mode 100644 storage/mroonga/vendor/groonga/plugins/ruby/eval.c create mode 100644 storage/mroonga/vendor/groonga/plugins/ruby/eval.rb delete mode 100644 storage/mroonga/vendor/groonga/plugins/ruby/eval_sources.am delete mode 100644 storage/mroonga/vendor/groonga/plugins/ruby/load.c delete mode 100644 storage/mroonga/vendor/groonga/plugins/ruby/load_sources.am delete mode 100644 storage/mroonga/vendor/groonga/plugins/ruby/ruby_plugin.h create mode 100644 storage/mroonga/vendor/groonga/plugins/ruby/sources.am create mode 100644 storage/mroonga/vendor/groonga/plugins/sharding/logical_parameters.rb create mode 100644 storage/mroonga/vendor/groonga/plugins/sharding/logical_shard_list.rb create mode 100644 storage/mroonga/vendor/groonga/plugins/sharding/parameters.rb delete mode 100644 storage/mroonga/vendor/groonga/plugins/table/Makefile.am delete mode 100644 storage/mroonga/vendor/groonga/plugins/table/sources.am delete mode 100644 storage/mroonga/vendor/groonga/plugins/table/table.c delete mode 100755 storage/mroonga/vendor/groonga/ra.rb create mode 100755 storage/mroonga/vendor/groonga/tools/check-small-index-limit.rb create mode 100755 storage/mroonga/vendor/groonga/tools/groonga-benchmark-indexing.rb create mode 100755 storage/mroonga/vendor/groonga/tools/groonga-memory-usage-analyzer.rb create mode 100755 storage/mroonga/vendor/groonga/tools/groonga-object-list-checker.rb create mode 100755 storage/mroonga/vendor/groonga/vendor/download_lz4.rb create mode 100755 storage/mroonga/vendor/groonga/vendor/download_mecab.rb create mode 100755 storage/mroonga/vendor/groonga/vendor/download_message_pack.rb create mode 100644 storage/mroonga/vendor/groonga/vendor/lz4/CMakeLists.txt create mode 100644 storage/mroonga/vendor/groonga/vendor/lz4/Makefile.am create mode 100644 storage/mroonga/vendor/groonga/vendor/mecab/CMakeLists.txt create mode 100644 storage/mroonga/vendor/groonga/vendor/mecab/Makefile.am create mode 100644 storage/mroonga/vendor/groonga/vendor/mecab/config.h.cmake create mode 100644 storage/mroonga/vendor/groonga/vendor/mecab/mecabrc.cmake create mode 100644 storage/mroonga/vendor/groonga/vendor/message_pack/CMakeLists.txt create mode 100644 storage/mroonga/vendor/groonga/vendor/message_pack/Makefile.am create mode 100644 storage/mroonga/vendor/groonga/vendor/mruby/version diff --git a/Docs/INFO_SRC b/Docs/INFO_SRC index 54aef3c2f..7007a3c3f 100644 --- a/Docs/INFO_SRC +++ b/Docs/INFO_SRC @@ -1,8 +1,8 @@ -commit: f0e9bebd278b27e05d9c66746420b48535f2b86e -date: 2017-09-27 10:22:15 +0200 -build-date: 2017-09-27 12:07:50 +0000 -short: f0e9beb +commit: 05103c84ecc519eae4090b720f48203a648e2ab9 +date: 2017-11-13 18:41:55 +0000 +build-date: 2017-11-13 18:46:50 +0000 +short: 05103c8 branch: HEAD -MariaDB source 10.1.28 +MariaDB source 10.1.29 diff --git a/VERSION b/VERSION index 3d1d889a5..dce8bbe23 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=1 -MYSQL_VERSION_PATCH=28 +MYSQL_VERSION_PATCH=29 diff --git a/client/mysql.cc b/client/mysql.cc index 1c344c7e5..c043d054e 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1065,8 +1065,7 @@ static void fix_history(String *final_command); static COMMANDS *find_command(char *name); static COMMANDS *find_command(char cmd_name); -static bool add_line(String &buffer, char *line, ulong line_length, - char *in_string, bool *ml_comment, bool truncated); +static bool add_line(String &, char *, ulong, char *, bool *, bool); static void remove_cntrl(String &buffer); static void print_table_data(MYSQL_RES *result); static void print_table_data_html(MYSQL_RES *result); @@ -1078,7 +1077,7 @@ static ulong start_timer(void); static void end_timer(ulong start_time,char *buff); static void mysql_end_timer(ulong start_time,char *buff); static void nice_time(double sec,char *buff,bool part_second); -extern "C" sig_handler mysql_end(int sig); +extern "C" sig_handler mysql_end(int sig) __attribute__ ((noreturn)); extern "C" sig_handler handle_sigint(int sig); #if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL) static sig_handler window_resize(int sig); @@ -1095,7 +1094,7 @@ inline bool is_delimiter_command(char *name, ulong len) only name(first DELIMITER_NAME_LEN bytes) is checked. */ return (len >= DELIMITER_NAME_LEN && - !my_strnncoll(charset_info, (uchar*) name, DELIMITER_NAME_LEN, + !my_strnncoll(&my_charset_latin1, (uchar*) name, DELIMITER_NAME_LEN, (uchar *) DELIMITER_NAME, DELIMITER_NAME_LEN)); } diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 7a4b34c40..c103061bb 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -2670,10 +2670,11 @@ int main(int argc, char** argv) if (!argc || opt_version) { - if (!argc) - usage(); if (!opt_version) + { + usage(); retval= ERROR_STOP; + } goto err; } diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index e886cea1c..e80fb199f 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -168,9 +168,14 @@ SETA(CPACK_RPM_server_PACKAGE_REQUIRES "MariaDB-client") IF(WITH_WSREP) -SETA(CPACK_RPM_server_PACKAGE_REQUIRES - "galera" "rsync" "lsof" "grep" "gawk" "iproute" - "coreutils" "findutils" "tar" "which") + SETA(CPACK_RPM_server_PACKAGE_REQUIRES + "galera" "rsync" "lsof" "grep" "gawk" "iproute" + "coreutils" "findutils" "tar") + IF (RPM MATCHES "sles11") + SETA(CPACK_RPM_server_PACKAGE_REQUIRES "util-linux") + ELSE() + SETA(CPACK_RPM_server_PACKAGE_REQUIRES "which") + ENDIF() ENDIF() SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh) diff --git a/cmake/maintainer.cmake b/cmake/maintainer.cmake index 367b78afd..0541cca86 100644 --- a/cmake/maintainer.cmake +++ b/cmake/maintainer.cmake @@ -20,6 +20,11 @@ IF(HAVE_C__Wvla) SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wvla") ENDIF() +MY_CHECK_C_COMPILER_FLAG("-Wno-format-truncation") +IF(HAVE_C__Wno_format_truncation) + SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wno-format-truncation") +ENDIF() + # Common warning flags for GCC and Clang SET(MY_C_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wwrite-strings -Wdeclaration-after-statement") diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake index 894bde389..4c1139298 100644 --- a/cmake/pcre.cmake +++ b/cmake/pcre.cmake @@ -1,11 +1,23 @@ +INCLUDE (CheckCSourceRuns) + SET(WITH_PCRE "auto" CACHE STRING "Which pcre to use (possible values are 'bundled', 'system', or 'auto')") MACRO (CHECK_PCRE) IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto") - CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE) + CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE_STACK_GUARD) + IF(NOT CMAKE_CROSSCOMPILING) + SET(CMAKE_REQUIRED_LIBRARIES "pcre") + CHECK_C_SOURCE_RUNS(" + #include + int main() { + return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256; + }" PCRE_STACK_SIZE_OK) + SET(CMAKE_REQUIRED_LIBRARIES) + ENDIF() ENDIF() - IF(NOT HAVE_PCRE OR WITH_PCRE STREQUAL "bundled") + IF(NOT HAVE_PCRE_STACK_GUARD OR NOT PCRE_STACK_SIZE_OK OR + WITH_PCRE STREQUAL "bundled") IF (WITH_PCRE STREQUAL "system") MESSAGE(FATAL_ERROR "system pcre is not found or unusable") ENDIF() diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index e6d1379ae..b5dc8b9f1 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -26,7 +26,7 @@ ENDIF() OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default}) # Set the patch version -SET(WSREP_PATCH_VERSION "20") +SET(WSREP_PATCH_VERSION "21") # Obtain wsrep API version FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc index 156e0b20e..c019209fa 100644 --- a/extra/mariabackup/backup_copy.cc +++ b/extra/mariabackup/backup_copy.cc @@ -1700,26 +1700,28 @@ copy_back() ut_crc32_init(); /* copy undo tablespaces */ - if (srv_undo_tablespaces > 0) { - dst_dir = (srv_undo_dir && *srv_undo_dir) - ? srv_undo_dir : mysql_data_home; - ds_data = ds_create(dst_dir, DS_TYPE_LOCAL); + dst_dir = (srv_undo_dir && *srv_undo_dir) + ? srv_undo_dir : mysql_data_home; - for (i = 1; i <= srv_undo_tablespaces; i++) { - char filename[20]; - sprintf(filename, "undo%03u", (uint)i); - if (!(ret = copy_or_move_file(filename, filename, - dst_dir, 1))) { - goto cleanup; - } - } + ds_data = ds_create(dst_dir, DS_TYPE_LOCAL); - ds_destroy(ds_data); - ds_data = NULL; + for (i = 1; ; i++) { + char filename[20]; + sprintf(filename, "undo%03u", (uint)i); + if (!file_exists(filename)) { + break; + } + if (!(ret = copy_or_move_file(filename, filename, + dst_dir, 1))) { + goto cleanup; + } } + ds_destroy(ds_data); + ds_data = NULL; + /* copy redo logs */ dst_dir = (srv_log_group_home_dir && *srv_log_group_home_dir) @@ -1844,7 +1846,7 @@ copy_back() } } - /* copy buufer pool dump */ + /* copy buffer pool dump */ if (innobase_buffer_pool_filename) { const char *src_name; diff --git a/extra/mariabackup/changed_page_bitmap.cc b/extra/mariabackup/changed_page_bitmap.cc index 86a873ef6..d5185b189 100644 --- a/extra/mariabackup/changed_page_bitmap.cc +++ b/extra/mariabackup/changed_page_bitmap.cc @@ -538,7 +538,7 @@ xb_msg_missing_lsn_data( lsn_t missing_interval_start, /*! bmp_end_lsn)) { - msg("xtrabackup: incremental backup LSN " LSN_PF + msg("mariabackup: incremental backup LSN " LSN_PF " is larger than than the last checkpoint LSN " LSN_PF "\n", bmp_start_lsn, bmp_end_lsn); return NULL; @@ -700,7 +700,7 @@ xb_page_bitmap_init(void) ¤t_page_end_lsn, bmp_start_lsn))) { - msg("xtrabackup: Warning: changed page bitmap file " + msg("mariabackup: Warning: changed page bitmap file " "\'%s\' corrupted\n", bitmap_file.name); rbt_free(result); free(bitmap_files.files); @@ -805,7 +805,7 @@ xb_page_bitmap_init(void) if (UNIV_UNLIKELY(!last_page_ok)) { - msg("xtrabackup: warning: changed page bitmap file " + msg("mariabackup: warning: changed page bitmap file " "\'%s\' corrupted.\n", bitmap_file.name); rbt_free(result); free(bitmap_files.files); diff --git a/extra/mariabackup/fil_cur.cc b/extra/mariabackup/fil_cur.cc index 820d8e10c..54700ce68 100644 --- a/extra/mariabackup/fil_cur.cc +++ b/extra/mariabackup/fil_cur.cc @@ -1,5 +1,5 @@ /****************************************************** -XtraBackup: hot backup tool for InnoDB +MariaBackup: hot backup tool for InnoDB (c) 2009-2013 Percona LLC and/or its affiliates. Originally Created 3/3/2009 Yasufumi Kinoshita Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko, @@ -173,7 +173,7 @@ xb_fil_cur_open( /* The following call prints an error message */ os_file_get_last_error(TRUE); - msg("[%02u] xtrabackup: error: cannot open " + msg("[%02u] mariabackup: error: cannot open " "tablespace %s\n", thread_n, cursor->abs_path); @@ -202,7 +202,7 @@ xb_fil_cur_open( cursor->file = node->handle; if (stat(cursor->abs_path, &cursor->statinfo)) { - msg("[%02u] xtrabackup: error: cannot stat %s\n", + msg("[%02u] mariabackup: error: cannot stat %s\n", thread_n, cursor->abs_path); xb_fil_cur_close(cursor); @@ -229,7 +229,7 @@ xb_fil_cur_open( msg("[%02u] %s is compressed with page size = " "%lu bytes\n", thread_n, node->name, page_size); if (page_size_shift < 10 || page_size_shift > 14) { - msg("[%02u] xtrabackup: Error: Invalid " + msg("[%02u] mariabackup: Error: Invalid " "page size: %lu.\n", thread_n, page_size); ut_error; } @@ -300,9 +300,9 @@ xb_fil_cur_read( offset + to_read == cursor->statinfo.st_size) { if (to_read < (ib_int64_t) cursor->page_size) { - msg("[%02u] xtrabackup: Warning: junk at the end of " + msg("[%02u] mariabackup: Warning: junk at the end of " "%s:\n", cursor->thread_n, cursor->abs_path); - msg("[%02u] xtrabackup: Warning: offset = %llu, " + msg("[%02u] mariabackup: Warning: offset = %llu, " "to_read = %llu\n", cursor->thread_n, (unsigned long long) offset, @@ -356,13 +356,13 @@ xb_fil_cur_read( page_no < (ib_int64_t) FSP_EXTENT_SIZE * 3) { /* skip doublewrite buffer pages */ xb_a(cursor->page_size == UNIV_PAGE_SIZE); - msg("[%02u] xtrabackup: " + msg("[%02u] mariabackup: " "Page %lu is a doublewrite buffer page, " "skipping.\n", cursor->thread_n, page_no); } else { retry_count--; if (retry_count == 0) { - msg("[%02u] xtrabackup: " + msg("[%02u] mariabackup: " "Error: failed to read page after " "10 retries. File %s seems to be " "corrupted.\n", cursor->thread_n, @@ -370,7 +370,7 @@ xb_fil_cur_read( ret = XB_FIL_CUR_ERROR; break; } - msg("[%02u] xtrabackup: " + msg("[%02u] mariabackup: " "Database page corruption detected at page " "%lu, retrying...\n", cursor->thread_n, page_no); diff --git a/extra/mariabackup/write_filt.cc b/extra/mariabackup/write_filt.cc index cf7753bf3..05981489b 100644 --- a/extra/mariabackup/write_filt.cc +++ b/extra/mariabackup/write_filt.cc @@ -1,5 +1,5 @@ /****************************************************** -XtraBackup: hot backup tool for InnoDB +MariaBackup: hot backup tool for InnoDB (c) 2009-2013 Percona LLC and/or its affiliates. Originally Created 3/3/2009 Yasufumi Kinoshita Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko, @@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "write_filt.h" #include "fil_cur.h" #include "xtrabackup.h" +#include /************************************************************************ Write-through page write filter. */ @@ -68,18 +69,21 @@ wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name, { char meta_name[FN_REFLEN]; xb_delta_info_t info; - ulint buf_size; xb_wf_incremental_ctxt_t *cp = &(ctxt->u.wf_incremental_ctxt); ctxt->cursor = cursor; /* allocate buffer for incremental backup (4096 pages) */ - buf_size = (cursor->page_size / 4 + 1) * cursor->page_size; - cp->delta_buf_base = static_cast(ut_malloc(buf_size)); - memset(cp->delta_buf_base, 0, buf_size); - cp->delta_buf = static_cast - (ut_align(cp->delta_buf_base, UNIV_PAGE_SIZE_MAX)); + cp->delta_buf_size = (cursor->page_size / 4) * cursor->page_size; + cp->delta_buf = (unsigned char *)os_mem_alloc_large(&cp->delta_buf_size); + + if (!cp->delta_buf) { + msg("[%02u] mariabackup: Error: " + "cannot allocate %zu bytes\n", + cursor->thread_n, (size_t) cp->delta_buf_size); + return (FALSE); + } /* write delta meta info */ snprintf(meta_name, sizeof(meta_name), "%s%s", dst_name, @@ -88,7 +92,7 @@ wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name, info.zip_size = cursor->zip_size; info.space_id = cursor->space_id; if (!xb_write_delta_metadata(meta_name, &info)) { - msg("[%02u] xtrabackup: Error: " + msg("[%02u] mariabackup: Error: " "failed to write meta info for %s\n", cursor->thread_n, cursor->rel_path); return(FALSE); @@ -183,10 +187,7 @@ static void wf_incremental_deinit(xb_write_filt_ctxt_t *ctxt) { xb_wf_incremental_ctxt_t *cp = &(ctxt->u.wf_incremental_ctxt); - - if (cp->delta_buf_base != NULL) { - ut_free(cp->delta_buf_base); - } + os_mem_free_large(cp->delta_buf, cp->delta_buf_size); } /************************************************************************ diff --git a/extra/mariabackup/write_filt.h b/extra/mariabackup/write_filt.h index bcab263f1..69655db5b 100644 --- a/extra/mariabackup/write_filt.h +++ b/extra/mariabackup/write_filt.h @@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA /* Incremental page filter context */ typedef struct { - byte *delta_buf_base; + ulint delta_buf_size; byte *delta_buf; ulint npages; } xb_wf_incremental_ctxt_t; diff --git a/extra/mariabackup/wsrep.cc b/extra/mariabackup/wsrep.cc index 7b196725c..3baa9e660 100644 --- a/extra/mariabackup/wsrep.cc +++ b/extra/mariabackup/wsrep.cc @@ -195,7 +195,7 @@ xb_write_galera_info(bool incremental_prepare) fp = fopen(XB_GALERA_INFO_FILENAME, "w"); if (fp == NULL) { - msg("xtrabackup: error: " + msg("mariabackup: error: " "could not create " XB_GALERA_INFO_FILENAME ", errno = %d\n", errno); @@ -204,12 +204,12 @@ xb_write_galera_info(bool incremental_prepare) seqno = wsrep_xid_seqno(&xid); - msg("xtrabackup: Recovered WSREP position: %s:%lld\n", + msg("mariabackup: Recovered WSREP position: %s:%lld\n", uuid_str, (long long) seqno); if (fprintf(fp, "%s:%lld", uuid_str, (long long) seqno) < 0) { - msg("xtrabackup: error: " + msg("mariabackup: error: " "could not write to " XB_GALERA_INFO_FILENAME ", errno = %d\n", errno); diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index f07b1c6d3..2f9761eb0 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -1,5 +1,5 @@ /****************************************************** -XtraBackup: hot backup tool for InnoDB +MariaBackup: hot backup tool for InnoDB (c) 2009-2017 Percona LLC and/or its affiliates Originally Created 3/3/2009 Yasufumi Kinoshita Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko, @@ -837,6 +837,11 @@ struct my_option xb_client_options[] = (uchar*) &opt_incremental_history_uuid, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"remove-original", OPT_REMOVE_ORIGINAL, "Remove .qp files after decompression.", + (uchar *) &opt_remove_original, + (uchar *) &opt_remove_original, + 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE, "This option specifies which types of queries are allowed to complete " "before innobackupex will issue the global lock. Default is all.", @@ -1154,13 +1159,13 @@ debug_sync_point(const char *name) xtrabackup_target_dir); fp = fopen(pid_path, "w"); if (fp == NULL) { - msg("xtrabackup: Error: cannot open %s\n", pid_path); + msg("mariabackup: Error: cannot open %s\n", pid_path); exit(EXIT_FAILURE); } fprintf(fp, "%u\n", (uint) pid); fclose(fp); - msg("xtrabackup: DEBUG: Suspending at debug sync point '%s'. " + msg("mariabackup: DEBUG: Suspending at debug sync point '%s'. " "Resume with 'kill -SIGCONT %u'.\n", name, (uint) pid); debug_sync_resumed= 0; @@ -1170,7 +1175,7 @@ debug_sync_point(const char *name) } /* On resume */ - msg("xtrabackup: DEBUG: removing the pid file.\n"); + msg("mariabackup: DEBUG: removing the pid file.\n"); my_delete(pid_path, MYF(MY_WME)); #endif } @@ -1465,19 +1470,19 @@ innodb_init_param(void) /* Check that values don't overflow on 32-bit systems. */ if (sizeof(ulint) == 4) { if (xtrabackup_use_memory > UINT_MAX32) { - msg("xtrabackup: use-memory can't be over 4GB" + msg("mariabackup: use-memory can't be over 4GB" " on 32-bit systems\n"); } if (innobase_buffer_pool_size > UINT_MAX32) { - msg("xtrabackup: innobase_buffer_pool_size can't be " + msg("mariabackup: innobase_buffer_pool_size can't be " "over 4GB on 32-bit systems\n"); goto error; } if (innobase_log_file_size > UINT_MAX32) { - msg("xtrabackup: innobase_log_file_size can't be " + msg("mariabackup: innobase_log_file_size can't be " "over 4GB on 32-bit systemsi\n"); goto error; @@ -1504,9 +1509,9 @@ innodb_init_param(void) read from MySQL .cnf file */ if (xtrabackup_backup) { - msg("xtrabackup: using the following InnoDB configuration:\n"); + msg("mariabackup: using the following InnoDB configuration:\n"); } else { - msg("xtrabackup: using the following InnoDB configuration " + msg("mariabackup: using the following InnoDB configuration " "for recovery:\n"); } @@ -1516,7 +1521,7 @@ innodb_init_param(void) srv_data_home = (xtrabackup_backup && innobase_data_home_dir ? innobase_data_home_dir : default_path); - msg("xtrabackup: innodb_data_home_dir = %s\n", srv_data_home); + msg("mariabackup: innodb_data_home_dir = %s\n", srv_data_home); /* Set default InnoDB data file size to 10 MB and let it be auto-extending. Thus users can use InnoDB in >= 4.0 without having @@ -1525,7 +1530,7 @@ innodb_init_param(void) if (!innobase_data_file_path) { innobase_data_file_path = (char*) "ibdata1:10M:autoextend"; } - msg("xtrabackup: innodb_data_file_path = %s\n", + msg("mariabackup: innodb_data_file_path = %s\n", innobase_data_file_path); /* Since InnoDB edits the argument in the next call, we make another @@ -1536,7 +1541,7 @@ innodb_init_param(void) ret = (my_bool) srv_parse_data_file_paths_and_sizes( internal_innobase_data_file_path); if (ret == FALSE) { - msg("xtrabackup: syntax error in innodb_data_file_path\n"); + msg("mariabackup: syntax error in innodb_data_file_path\n"); mem_free_and_error: free(internal_innobase_data_file_path); internal_innobase_data_file_path = NULL; @@ -1569,7 +1574,7 @@ innodb_init_param(void) if (xtrabackup_prepare && xtrabackup_incremental_dir) { srv_log_group_home_dir = xtrabackup_incremental_dir; } - msg("xtrabackup: innodb_log_group_home_dir = %s\n", + msg("mariabackup: innodb_log_group_home_dir = %s\n", srv_log_group_home_dir); srv_normalize_path_for_win(srv_log_group_home_dir); @@ -1591,9 +1596,9 @@ innodb_init_param(void) srv_n_log_files = (ulint) innobase_log_files_in_group; srv_log_file_size = (ulint) innobase_log_file_size; - msg("xtrabackup: innodb_log_files_in_group = %ld\n", + msg("mariabackup: innodb_log_files_in_group = %ld\n", srv_n_log_files); - msg("xtrabackup: innodb_log_file_size = %lld\n", + msg("mariabackup: innodb_log_file_size = %lld\n", (long long int) srv_log_file_size); srv_log_buffer_size = (ulint) innobase_log_buffer_size; @@ -1724,7 +1729,7 @@ innodb_init_param(void) return(FALSE); error: - msg("xtrabackup: innodb_init_param(): Error occured.\n"); + msg("mariabackup: innodb_init_param(): Error occured.\n"); return(TRUE); } @@ -1755,7 +1760,7 @@ innodb_init(void) return(FALSE); error: - msg("xtrabackup: innodb_init(): Error occured.\n"); + msg("mariabackup: innodb_init(): Error occured.\n"); return(TRUE); } @@ -1765,7 +1770,7 @@ innodb_end() srv_fast_shutdown = (ulint) innobase_fast_shutdown; innodb_inited = 0; - msg("xtrabackup: starting shutdown with innodb_fast_shutdown = %lu\n", + msg("mariabackup: starting shutdown with innodb_fast_shutdown = %lu\n", srv_fast_shutdown); innodb_shutdown(); @@ -1796,7 +1801,7 @@ xtrabackup_read_metadata(char *filename) fp = fopen(filename,"r"); if(!fp) { - msg("xtrabackup: Error: cannot open %s\n", filename); + msg("mariabackup: Error: cannot open %s\n", filename); return(FALSE); } @@ -1875,7 +1880,7 @@ xtrabackup_stream_metadata(ds_ctxt_t *ds_ctxt) stream = ds_open(ds_ctxt, XTRABACKUP_METADATA_FILENAME, &mystat); if (stream == NULL) { - msg("xtrabackup: Error: cannot open output stream " + msg("mariabackup: Error: cannot open output stream " "for %s\n", XTRABACKUP_METADATA_FILENAME); return(FALSE); } @@ -1908,7 +1913,7 @@ xtrabackup_write_metadata(const char *filepath) fp = fopen(filepath, "w"); if(!fp) { - msg("xtrabackup: Error: cannot open %s\n", filepath); + msg("mariabackup: Error: cannot open %s\n", filepath); return(FALSE); } if (fwrite(buf, len, 1, fp) < 1) { @@ -1958,11 +1963,11 @@ xb_read_delta_metadata(const char *filepath, xb_delta_info_t *info) fclose(fp); if (info->page_size == ULINT_UNDEFINED) { - msg("xtrabackup: page_size is required in %s\n", filepath); + msg("mariabackup: page_size is required in %s\n", filepath); r = FALSE; } if (info->space_id == ULINT_UNDEFINED) { - msg("xtrabackup: Warning: This backup was taken with XtraBackup 2.0.1 " + msg("mariabackup: Warning: This backup was taken with XtraBackup 2.0.1 " "or earlier, some DDL operations between full and incremental " "backups may be handled incorrectly\n"); } @@ -1994,7 +1999,7 @@ xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info) f = ds_open(ds_meta, filename, &mystat); if (f == NULL) { - msg("xtrabackup: Error: cannot open output stream for %s\n", + msg("mariabackup: Error: cannot open output stream for %s\n", filename); return(FALSE); } @@ -2365,14 +2370,14 @@ xtrabackup_copy_datafile(fil_node_t* node, uint thread_n) if (write_filter->init != NULL && !write_filter->init(&write_filt_ctxt, dst_name, &cursor)) { - msg("[%02u] xtrabackup: error: " + msg("[%02u] mariabackup: error: " "failed to initialize page write filter.\n", thread_n); goto error; } dstfile = ds_open(ds_data, dst_name, &cursor.statinfo); if (dstfile == NULL) { - msg("[%02u] xtrabackup: error: " + msg("[%02u] mariabackup: error: " "cannot open the destination stream for %s\n", thread_n, dst_name); goto error; @@ -2422,7 +2427,7 @@ xtrabackup_copy_datafile(fil_node_t* node, uint thread_n) if (write_filter && write_filter->deinit) { write_filter->deinit(&write_filt_ctxt);; } - msg("[%02u] xtrabackup: Error: " + msg("[%02u] mariabackup: Error: " "xtrabackup_copy_datafile() failed.\n", thread_n); return(TRUE); /*ERROR*/ @@ -2434,10 +2439,10 @@ xtrabackup_copy_datafile(fil_node_t* node, uint thread_n) if (write_filter && write_filter->deinit) { write_filter->deinit(&write_filt_ctxt); } - msg("[%02u] xtrabackup: Warning: We assume the " + msg("[%02u] mariabackup: Warning: We assume the " "table was dropped during xtrabackup execution " "and ignore the file.\n", thread_n); - msg("[%02u] xtrabackup: Warning: skipping tablespace %s.\n", + msg("[%02u] mariabackup: Warning: skipping tablespace %s.\n", thread_n, node_name); return(FALSE); } @@ -2588,14 +2593,14 @@ xtrabackup_scan_log_recs( break; } - msg("xtrabackup: error:" + msg("mariabackup: error:" " log block numbers mismatch:\n" - "xtrabackup: error: expected log block no. %lu," + "mariabackup: error: expected log block no. %lu," " but got no. %lu from the log file.\n", (ulong) scanned_no, (ulong) no); if ((no - scanned_no) % blocks_in_group == 0) { - msg("xtrabackup: error:" + msg("mariabackup: error:" " it looks like InnoDB log has wrapped" " around before xtrabackup could" " process all records due to either" @@ -2607,14 +2612,14 @@ xtrabackup_scan_log_recs( } else if (!checksum_is_ok) { /* Garbage or an incompletely written log block */ - msg("xtrabackup: warning: Log block checksum mismatch" + msg("mariabackup: warning: Log block checksum mismatch" " (block no %lu at lsn " LSN_PF "): \n" "expected %lu, calculated checksum %lu\n", (ulong) no, scanned_lsn, (ulong) log_block_get_checksum(log_block), (ulong) log_block_calc_checksum(log_block)); - msg("xtrabackup: warning: this is possible when the " + msg("mariabackup: warning: this is possible when the " "log block has not been fully written by the " "server, will retry later.\n"); *finished = true; @@ -2687,7 +2692,7 @@ xtrabackup_scan_log_recs( } if (ds_write(dst_log_file, log_sys->buf, write_size)) { - msg("xtrabackup: Error: " + msg("mariabackup: Error: " "write to logfile failed\n"); return(false); } @@ -2768,7 +2773,7 @@ xtrabackup_copy_logfile(lsn_t from_lsn, my_bool is_last) error: mutex_exit(&log_sys->mutex); ds_close(dst_log_file); - msg("xtrabackup: Error: xtrabackup_copy_logfile() failed.\n"); + msg("mariabackup: Error: xtrabackup_copy_logfile() failed.\n"); return(TRUE); } @@ -2911,7 +2916,7 @@ data_copy_thread_func( /* copy the datafile */ if(xtrabackup_copy_datafile(node, num)) { - msg("[%02u] xtrabackup: Error: " + msg("[%02u] mariabackup: Error: " "failed to copy datafile.\n", num); exit(EXIT_FAILURE); } @@ -3083,25 +3088,25 @@ xb_load_tablespaces(void) &flushed_lsn, &sum_of_new_sizes); if (err != DB_SUCCESS) { - msg("xtrabackup: Could not open or create data files.\n" - "xtrabackup: If you tried to add new data files, and it " + msg("mariabackup: Could not open or create data files.\n" + "mariabackup: If you tried to add new data files, and it " "failed here,\n" - "xtrabackup: you should now edit innodb_data_file_path in " + "mariabackup: you should now edit innodb_data_file_path in " "my.cnf back\n" - "xtrabackup: to what it was, and remove the new ibdata " + "mariabackup: to what it was, and remove the new ibdata " "files InnoDB created\n" - "xtrabackup: in this failed attempt. InnoDB only wrote " + "mariabackup: in this failed attempt. InnoDB only wrote " "those files full of\n" - "xtrabackup: zeros, but did not yet use them in any way. " + "mariabackup: zeros, but did not yet use them in any way. " "But be careful: do not\n" - "xtrabackup: remove old data files which contain your " + "mariabackup: remove old data files which contain your " "precious data!\n"); return(err); } /* create_new_db must not be TRUE.. */ if (create_new_db) { - msg("xtrabackup: could not find data files at the " + msg("mariabackup: could not find data files at the " "specified datadir\n"); return(DB_ERROR); } @@ -3120,7 +3125,7 @@ xb_load_tablespaces(void) srv_undo_tablespaces_init(), because fil_is_user_tablespace_id() * relies on srv_undo_tablespaces_open to be properly initialized */ - msg("xtrabackup: Generating a list of tablespaces\n"); + msg("mariabackup: Generating a list of tablespaces\n"); err = fil_load_single_table_tablespaces(xb_check_if_open_tablespace); if (err != DB_SUCCESS) { @@ -3168,7 +3173,7 @@ xb_data_files_close(void) } if (i == 1000) { - msg("xtrabackup: Warning: %lu threads created by InnoDB" + msg("mariabackup: Warning: %lu threads created by InnoDB" " had not exited at shutdown!\n", (ulong) os_thread_count); } @@ -3254,12 +3259,12 @@ xb_validate_name( /* perform only basic validation. validate length and path symbols */ if (len > NAME_LEN) { - msg("xtrabackup: name `%s` is too long.\n", name); + msg("mariabackup: name `%s` is too long.\n", name); exit(EXIT_FAILURE); } p = strpbrk(name, "/\\~"); if (p && p - name < NAME_LEN) { - msg("xtrabackup: name `%s` is not valid.\n", name); + msg("mariabackup: name `%s` is not valid.\n", name); exit(EXIT_FAILURE); } } @@ -3338,7 +3343,7 @@ xb_register_table( const char* name) /*!< in: name of table */ { if (strchr(name, '.') == NULL) { - msg("xtrabackup: `%s` is not fully qualified name.\n", name); + msg("mariabackup: `%s` is not fully qualified name.\n", name); exit(EXIT_FAILURE); } @@ -3360,7 +3365,7 @@ xb_add_regex_to_list( if (ret != 0) { regerror(ret, &compiled_regex, errbuf, sizeof(errbuf)); - msg("xtrabackup: error: %s regcomp(%s): %s\n", + msg("mariabackup: error: %s regcomp(%s): %s\n", error_context, regex, errbuf); exit(EXIT_FAILURE); } @@ -3429,7 +3434,7 @@ xb_load_list_file( /* read and store the filenames */ fp = fopen(filename, "r"); if (!fp) { - msg("xtrabackup: cannot open %s\n", + msg("mariabackup: cannot open %s\n", filename); exit(EXIT_FAILURE); } @@ -3438,7 +3443,7 @@ xb_load_list_file( if (p) { *p = '\0'; } else { - msg("xtrabackup: `%s...` name is too long", name_buf); + msg("mariabackup: `%s...` name is too long", name_buf); exit(EXIT_FAILURE); } @@ -3730,19 +3735,19 @@ xtrabackup_backup_func(void) data_thread_ctxt_t *data_threads; #ifdef USE_POSIX_FADVISE - msg("xtrabackup: uses posix_fadvise().\n"); + msg("mariabackup: uses posix_fadvise().\n"); #endif /* cd to datadir */ if (my_setwd(mysql_real_data_home,MYF(MY_WME))) { - msg("xtrabackup: cannot my_setwd %s\n", mysql_real_data_home); + msg("mariabackup: cannot my_setwd %s\n", mysql_real_data_home); exit(EXIT_FAILURE); } - msg("xtrabackup: cd to %s\n", mysql_real_data_home); + msg("mariabackup: cd to %s\n", mysql_real_data_home); - msg("xtrabackup: open files limit requested %u, set to %u\n", + msg("mariabackup: open files limit requested %u, set to %u\n", (uint) xb_open_files_limit, xb_set_max_open_files(xb_open_files_limit)); @@ -3757,7 +3762,7 @@ xtrabackup_backup_func(void) srv_close_files = (bool)xb_close_files; if (srv_close_files) - msg("xtrabackup: warning: close-files specified. Use it " + msg("mariabackup: warning: close-files specified. Use it " "at your own risk. If there are DDL operations like table DROP TABLE " "or RENAME TABLE during the backup, inconsistent backup will be " "produced.\n"); @@ -3779,7 +3784,7 @@ xtrabackup_backup_func(void) } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) { srv_unix_file_flush_method = SRV_UNIX_O_DIRECT; - msg("xtrabackup: using O_DIRECT\n"); + msg("mariabackup: using O_DIRECT\n"); } else if (0 == ut_strcmp(srv_file_flush_method_str, "littlesync")) { srv_unix_file_flush_method = SRV_UNIX_LITTLESYNC; @@ -3787,23 +3792,17 @@ xtrabackup_backup_func(void) srv_unix_file_flush_method = SRV_UNIX_NOSYNC; } else if (0 == ut_strcmp(srv_file_flush_method_str, "ALL_O_DIRECT")) { srv_unix_file_flush_method = SRV_UNIX_ALL_O_DIRECT; - msg("xtrabackup: using ALL_O_DIRECT\n"); + msg("mariabackup: using ALL_O_DIRECT\n"); } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT_NO_FSYNC")) { srv_unix_file_flush_method = SRV_UNIX_O_DIRECT_NO_FSYNC; - msg("xtrabackup: using O_DIRECT_NO_FSYNC\n"); + msg("mariabackup: using O_DIRECT_NO_FSYNC\n"); } else { - msg("xtrabackup: Unrecognized value %s for " + msg("mariabackup: Unrecognized value %s for " "innodb_flush_method\n", srv_file_flush_method_str); exit(EXIT_FAILURE); } - /* We can only use synchronous unbuffered IO on Windows for now */ - if (srv_file_flush_method_str != NULL) { - msg("xtrabackupp: Warning: " - "ignoring innodb_flush_method = %s on Windows.\n", srv_file_flush_method_str); - } - #ifdef _WIN32 srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; srv_use_native_aio = FALSE; @@ -3866,12 +3865,12 @@ xtrabackup_backup_func(void) } if ((log_opened && log_created)) { msg( - "xtrabackup: Error: all log files must be created at the same time.\n" - "xtrabackup: All log files must be created also in database creation.\n" - "xtrabackup: If you want bigger or smaller log files, shut down the\n" - "xtrabackup: database and make sure there were no errors in shutdown.\n" - "xtrabackup: Then delete the existing log files. Edit the .cnf file\n" - "xtrabackup: and start the database again.\n"); + "mariabackup: Error: all log files must be created at the same time.\n" + "mariabackup: All log files must be created also in database creation.\n" + "mariabackup: If you want bigger or smaller log files, shut down the\n" + "mariabackup: database and make sure there were no errors in shutdown.\n" + "mariabackup: Then delete the existing log files. Edit the .cnf file\n" + "mariabackup: and start the database again.\n"); //return(DB_ERROR); exit(EXIT_FAILURE); @@ -3880,7 +3879,7 @@ xtrabackup_backup_func(void) /* log_file_created must not be TRUE, if online */ if (log_file_created) { - msg("xtrabackup: Something wrong with source files...\n"); + msg("mariabackup: Something wrong with source files...\n"); exit(EXIT_FAILURE); } @@ -3890,7 +3889,7 @@ xtrabackup_backup_func(void) if (xtrabackup_extra_lsndir &&!my_stat(xtrabackup_extra_lsndir,&stat_info,MYF(0)) && (my_mkdir(xtrabackup_extra_lsndir,0777,MYF(0)) < 0)) { - msg("xtrabackup: Error: cannot mkdir %d: %s\n", + msg("mariabackup: Error: cannot mkdir %d: %s\n", my_errno, xtrabackup_extra_lsndir); exit(EXIT_FAILURE); } @@ -3898,7 +3897,7 @@ xtrabackup_backup_func(void) /* create target dir if not exist */ if (!xtrabackup_stream_str && !my_stat(xtrabackup_target_dir,&stat_info,MYF(0)) && (my_mkdir(xtrabackup_target_dir,0777,MYF(0)) < 0)){ - msg("xtrabackup: Error: cannot mkdir %d: %s\n", + msg("mariabackup: Error: cannot mkdir %d: %s\n", my_errno, xtrabackup_target_dir); exit(EXIT_FAILURE); } @@ -3984,7 +3983,7 @@ xtrabackup_backup_func(void) memset(&stat_info, 0, sizeof(MY_STAT)); dst_log_file = ds_open(ds_redo, XB_LOG_FILENAME, &stat_info); if (dst_log_file == NULL) { - msg("xtrabackup: error: failed to open the target stream for " + msg("mariabackup: error: failed to open the target stream for " "'%s'.\n", XB_LOG_FILENAME); ut_free(log_hdr_buf_); exit(EXIT_FAILURE); @@ -3998,7 +3997,7 @@ xtrabackup_backup_func(void) + (sizeof "xtrabkup ") - 1)); if (ds_write(dst_log_file, log_hdr_buf, LOG_FILE_HDR_SIZE)) { - msg("xtrabackup: error: write to logfile failed\n"); + msg("mariabackup: error: write to logfile failed\n"); ut_free(log_hdr_buf_); exit(EXIT_FAILURE); } @@ -4034,7 +4033,7 @@ xtrabackup_backup_func(void) /* Populate fil_system with tablespaces to copy */ err = xb_load_tablespaces(); if (err != DB_SUCCESS) { - msg("xtrabackup: error: xb_load_tablespaces() failed with" + msg("mariabackup: error: xb_load_tablespaces() failed with" "error code %lu\n", err); exit(EXIT_FAILURE); } @@ -4050,25 +4049,25 @@ xtrabackup_backup_func(void) changed_page_bitmap = xb_page_bitmap_init(); } if (!changed_page_bitmap) { - msg("xtrabackup: using the full scan for incremental " + msg("mariabackup: using the full scan for incremental " "backup\n"); } else if (incremental_lsn != checkpoint_lsn_start) { /* Do not print that bitmaps are used when dummy bitmap is build for an empty LSN range. */ - msg("xtrabackup: using the changed page bitmap\n"); + msg("mariabackup: using the changed page bitmap\n"); } } ut_a(xtrabackup_parallel > 0); if (xtrabackup_parallel > 1) { - msg("xtrabackup: Starting %u threads for parallel data " + msg("mariabackup: Starting %u threads for parallel data " "files transfer\n", xtrabackup_parallel); } it = datafiles_iter_new(f_system); if (it == NULL) { - msg("xtrabackup: Error: datafiles_iter_new() failed.\n"); + msg("mariabackup: Error: datafiles_iter_new() failed.\n"); exit(EXIT_FAILURE); } @@ -4123,7 +4122,7 @@ xtrabackup_backup_func(void) err = recv_find_max_checkpoint(&max_cp_group, &max_cp_field); if (err != DB_SUCCESS) { - msg("xtrabackup: Error: recv_find_max_checkpoint() failed.\n"); + msg("mariabackup: Error: recv_find_max_checkpoint() failed.\n"); mutex_exit(&log_sys->mutex); goto skip_last_cp; } @@ -4137,14 +4136,14 @@ xtrabackup_backup_func(void) mutex_exit(&log_sys->mutex); - msg("xtrabackup: The latest check point (for incremental): " + msg("mariabackup: The latest check point (for incremental): " "'" LSN_PF "'\n", latest_cp); } skip_last_cp: /* stop log_copying_thread */ log_copying = FALSE; os_event_set(log_copying_stop); - msg("xtrabackup: Stopping log copying thread.\n"); + msg("mariabackup: Stopping log copying thread.\n"); while (log_copying_running) { msg("."); os_thread_sleep(200000); /*0.2 sec*/ @@ -4167,7 +4166,7 @@ xtrabackup_backup_func(void) metadata_last_lsn = log_copy_scanned_lsn; if (!xtrabackup_stream_metadata(ds_meta)) { - msg("xtrabackup: Error: failed to stream metadata.\n"); + msg("mariabackup: Error: failed to stream metadata.\n"); exit(EXIT_FAILURE); } if (xtrabackup_extra_lsndir) { @@ -4176,7 +4175,7 @@ xtrabackup_backup_func(void) sprintf(filename, "%s/%s", xtrabackup_extra_lsndir, XTRABACKUP_METADATA_FILENAME); if (!xtrabackup_write_metadata(filename)) { - msg("xtrabackup: Error: failed to write metadata " + msg("mariabackup: Error: failed to write metadata " "to '%s'.\n", filename); exit(EXIT_FAILURE); } @@ -4198,7 +4197,7 @@ xtrabackup_backup_func(void) wait_throttle = NULL; } - msg("xtrabackup: Transaction log of lsn (" LSN_PF ") to (" LSN_PF + msg("mariabackup: Transaction log of lsn (" LSN_PF ") to (" LSN_PF ") was copied.\n", checkpoint_lsn_start, log_copy_scanned_lsn); xb_filters_free(); @@ -4206,7 +4205,7 @@ xtrabackup_backup_func(void) /* Make sure that the latest checkpoint made it to xtrabackup_logfile */ if (latest_cp > log_copy_scanned_lsn) { - msg("xtrabackup: error: last checkpoint LSN (" LSN_PF + msg("mariabackup: error: last checkpoint LSN (" LSN_PF ") is larger than last copied LSN (" LSN_PF ").\n", latest_cp, log_copy_scanned_lsn); exit(EXIT_FAILURE); @@ -4267,7 +4266,7 @@ xtrabackup_init_temp_log(void) /* The following call prints an error message */ os_file_get_last_error(TRUE); - msg("xtrabackup: Warning: cannot open %s. will try to find.\n", + msg("mariabackup: Warning: cannot open %s. will try to find.\n", src_path); /* check if ib_logfile0 may be xtrabackup_logfile */ @@ -4277,7 +4276,7 @@ xtrabackup_init_temp_log(void) &success,0); if (!success) { os_file_get_last_error(TRUE); - msg(" xtrabackup: Fatal error: cannot find %s.\n", + msg("mariabackup: Fatal error: cannot find %s.\n", src_path); goto error; @@ -4291,7 +4290,7 @@ xtrabackup_init_temp_log(void) if ( ut_memcmp(log_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, (byte*)"xtrabkup", (sizeof "xtrabkup") - 1) == 0) { - msg(" xtrabackup: 'ib_logfile0' seems to be " + msg("mariabackup: 'ib_logfile0' seems to be " "'xtrabackup_logfile'. will retry.\n"); os_file_close(src_file); @@ -4306,8 +4305,7 @@ xtrabackup_init_temp_log(void) goto retry; } - msg(" xtrabackup: Fatal error: cannot find %s.\n", - src_path); + msg("mariabackup: Fatal error: cannot find %s.\n", src_path); os_file_close(src_file); src_file = XB_FILE_UNDEFINED; @@ -4328,7 +4326,7 @@ xtrabackup_init_temp_log(void) if ( ut_memcmp(log_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, (byte*)"xtrabkup", (sizeof "xtrabkup") - 1) != 0 ) { - msg("xtrabackup: notice: xtrabackup_logfile was already used " + msg("mariabackup: notice: xtrabackup_logfile was already used " "to '--prepare'.\n"); goto skip_modify; } else { @@ -4361,7 +4359,7 @@ xtrabackup_init_temp_log(void) } if (!checkpoint_found) { - msg("xtrabackup: No valid checkpoint found.\n"); + msg("mariabackup: No valid checkpoint found.\n"); goto error; } @@ -4467,7 +4465,7 @@ xtrabackup_init_temp_log(void) file_size = os_file_get_size(src_file); } - msg("xtrabackup: xtrabackup_logfile detected: size=" INT64PF ", " + msg("mariabackup: xtrabackup_logfile detected: size=" INT64PF ", " "start_lsn=(" LSN_PF ")\n", file_size, max_lsn); os_file_close(src_file); @@ -4503,7 +4501,7 @@ xtrabackup_init_temp_log(void) free(log_buf); if (src_file != XB_FILE_UNDEFINED) os_file_close(src_file); - msg("xtrabackup: Error: xtrabackup_init_temp_log() failed.\n"); + msg("mariabackup: Error: xtrabackup_init_temp_log() failed.\n"); return(TRUE); /*ERROR*/ } @@ -4555,14 +4553,14 @@ xb_space_create_file( OS_FILE_READ_WRITE, &ret,0); if (!ret) { - msg("xtrabackup: cannot create file %s\n", path); + msg("mariabackup: cannot create file %s\n", path); return ret; } ret = os_file_set_size(path, *file, FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE); if (!ret) { - msg("xtrabackup: cannot set size for file %s\n", path); + msg("mariabackup: cannot set size for file %s\n", path); os_file_close(*file); os_file_delete(0, path); return ret; @@ -4606,7 +4604,7 @@ xb_space_create_file( ut_free(buf); if (!ret) { - msg("xtrabackup: could not write the first page to %s\n", + msg("mariabackup: could not write the first page to %s\n", path); os_file_close(*file); os_file_delete(0, path); @@ -4670,7 +4668,7 @@ xb_delta_open_matching_space( /* Create the database directory if it doesn't exist yet */ if (!os_file_create_directory(dest_dir, FALSE)) { - msg("xtrabackup: error: cannot create dir %s\n", dest_dir); + msg("mariabackup: error: cannot create dir %s\n", dest_dir); return file; } @@ -4703,13 +4701,13 @@ xb_delta_open_matching_space( snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#%lu", dbname, fil_space->id); - msg("xtrabackup: Renaming %s to %s.ibd\n", + msg("mariabackup: Renaming %s to %s.ibd\n", fil_space->name, tmpname); if (!fil_rename_tablespace(NULL, fil_space->id, tmpname, NULL)) { - msg("xtrabackup: Cannot rename %s to %s\n", + msg("mariabackup: Cannot rename %s to %s\n", fil_space->name, tmpname); goto exit; } @@ -4718,7 +4716,7 @@ xb_delta_open_matching_space( if (space_id == ULINT_UNDEFINED) { - msg("xtrabackup: Error: Cannot handle DDL operation on tablespace " + msg("mariabackup: Error: Cannot handle DDL operation on tablespace " "%s\n", dest_space_name); exit(EXIT_FAILURE); } @@ -4730,13 +4728,13 @@ xb_delta_open_matching_space( strncpy(tmpname, dest_space_name, FN_REFLEN); - msg("xtrabackup: Renaming %s to %s\n", + msg("mariabackup: Renaming %s to %s\n", fil_space->name, dest_space_name); if (!fil_rename_tablespace(NULL, fil_space->id, tmpname, NULL)) { - msg("xtrabackup: Cannot rename %s to %s\n", + msg("mariabackup: Cannot rename %s to %s\n", fil_space->name, dest_space_name); goto exit; } @@ -4748,7 +4746,7 @@ xb_delta_open_matching_space( if (!fil_space_create(dest_space_name, space_id, 0, FIL_TABLESPACE, 0, false)) { - msg("xtrabackup: Cannot create tablespace %s\n", + msg("mariabackup: Cannot create tablespace %s\n", dest_space_name); goto exit; } @@ -4782,7 +4780,7 @@ xb_delta_open_matching_space( if (ok) { *success = TRUE; } else { - msg("xtrabackup: Cannot open file %s\n", real_name); + msg("mariabackup: Cannot open file %s\n", real_name); } exit: @@ -4854,11 +4852,11 @@ xtrabackup_apply_delta( page_size = info.page_size; page_size_shift = get_bit_shift(page_size); - msg("xtrabackup: page size for %s is %lu bytes\n", + msg("mariabackup: page size for %s is %lu bytes\n", src_path, page_size); if (page_size_shift < 10 || page_size_shift > UNIV_PAGE_SIZE_SHIFT_MAX) { - msg("xtrabackup: error: invalid value of page_size " + msg("mariabackup: error: invalid value of page_size " "(%lu bytes) read from %s\n", page_size, meta_path); goto error; } @@ -4869,7 +4867,7 @@ xtrabackup_apply_delta( &success,0); if (!success) { os_file_get_last_error(TRUE); - msg("xtrabackup: error: cannot open %s\n", src_path); + msg("mariabackup: error: cannot open %s\n", src_path); goto error; } @@ -4881,7 +4879,7 @@ xtrabackup_apply_delta( dbname, space_name, info.space_id, info.zip_size, dst_path, sizeof(dst_path), &success); if (!success) { - msg("xtrabackup: error: cannot open %s\n", dst_path); + msg("mariabackup: error: cannot open %s\n", dst_path); goto error; } @@ -4920,7 +4918,7 @@ xtrabackup_apply_delta( last_buffer = TRUE; break; default: - msg("xtrabackup: error: %s seems not " + msg("mariabackup: error: %s seems not " ".delta file.\n", src_path); goto error; } @@ -4953,12 +4951,17 @@ xtrabackup_apply_delta( if (offset_on_page == 0xFFFFFFFFUL) break; - success = os_file_write(dst_path, dst_file, - incremental_buffer + - page_in_buffer * page_size, - (offset_on_page << - page_size_shift), - page_size); + uchar *buf = incremental_buffer + page_in_buffer * page_size; + const os_offset_t off = os_offset_t(offset_on_page)*page_size; + + if (off == 0) { + /* Fix tablespace size. */ + os_offset_t n_pages = fsp_get_size_low(static_cast(buf)); + if (!os_file_set_size(dst_path, dst_file, n_pages*page_size)) + goto error; + } + + success = os_file_write(dst_path, dst_file, buf, off, page_size); if (!success) { goto error; } @@ -4969,8 +4972,11 @@ xtrabackup_apply_delta( if (incremental_buffer_base) ut_free(incremental_buffer_base); - if (src_file != XB_FILE_UNDEFINED) + if (src_file != XB_FILE_UNDEFINED) { os_file_close(src_file); + /* Remove .delta file after it was successfully applied.*/ + os_file_delete(0,src_path); + } if (dst_file != XB_FILE_UNDEFINED) os_file_close(dst_file); return TRUE; @@ -4982,7 +4988,7 @@ xtrabackup_apply_delta( os_file_close(src_file); if (dst_file != XB_FILE_UNDEFINED) os_file_close(dst_file); - msg("xtrabackup: Error: xtrabackup_apply_delta(): " + msg("mariabackup: Error: xtrabackup_apply_delta(): " "failed to apply %s to %s.\n", src_path, dst_path); return FALSE; } @@ -5046,7 +5052,7 @@ xb_process_datadir( callback */ { ulint ret; - char dbpath[FN_REFLEN]; + char dbpath[OS_FILE_MAX_PATH]; os_file_dir_t dir; os_file_dir_t dbdir; os_file_stat_t dbinfo; @@ -5091,7 +5097,7 @@ xb_process_datadir( os_file_closedir(dbdir); } else { - msg("xtrabackup: Cannot open dir %s\n", + msg("mariabackup: Cannot open dir %s\n", path); } @@ -5099,7 +5105,7 @@ xb_process_datadir( dir = os_file_opendir(path, FALSE); if (dir == NULL) { - msg("xtrabackup: Cannot open dir %s\n", + msg("mariabackup: Cannot open dir %s\n", path); } @@ -5112,8 +5118,7 @@ xb_process_datadir( goto next_datadir_item; } - sprintf(dbpath, "%s/%s", path, - dbinfo.name); + snprintf(dbpath, sizeof(dbpath), "%s/%s", path, dbinfo.name); srv_normalize_path_for_win(dbpath); dbdir = os_file_opendir(dbpath, FALSE); @@ -5242,7 +5247,7 @@ xtrabackup_close_temp_log(my_bool clear_flag) error: if (src_file != XB_FILE_UNDEFINED) os_file_close(src_file); - msg("xtrabackup: Error: xtrabackup_close_temp_log() failed.\n"); + msg("mariabackup: Error: xtrabackup_close_temp_log() failed.\n"); return(TRUE); /*ERROR*/ } @@ -5271,7 +5276,7 @@ xb_export_cfg_write_index_fields( if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) { - msg("xtrabackup: Error: writing index fields."); + msg("mariabackup: Error: writing index fields."); return(false); } @@ -5285,7 +5290,7 @@ xb_export_cfg_write_index_fields( if (fwrite(row, 1, sizeof(len), file) != sizeof(len) || fwrite(field->name, 1, len, file) != len) { - msg("xtrabackup: Error: writing index column."); + msg("mariabackup: Error: writing index column."); return(false); } @@ -5312,7 +5317,7 @@ xb_export_cfg_write_indexes( mach_write_to_4(row, UT_LIST_GET_LEN(table->indexes)); if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) { - msg("xtrabackup: Error: writing index count."); + msg("mariabackup: Error: writing index count."); return(false); } @@ -5360,7 +5365,7 @@ xb_export_cfg_write_indexes( if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) { - msg("xtrabackup: Error: writing index meta-data."); + msg("mariabackup: Error: writing index meta-data."); return(false); } @@ -5375,7 +5380,7 @@ xb_export_cfg_write_indexes( if (fwrite(row, 1, sizeof(len), file) != sizeof(len) || fwrite(index->name, 1, len, file) != len) { - msg("xtrabackup: Error: writing index name."); + msg("mariabackup: Error: writing index name."); return(false); } @@ -5428,7 +5433,7 @@ xb_export_cfg_write_table( mach_write_to_4(ptr, col->max_prefix); if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) { - msg("xtrabackup: Error: writing table column data."); + msg("mariabackup: Error: writing table column data."); return(false); } @@ -5449,7 +5454,7 @@ xb_export_cfg_write_table( if (fwrite(row, 1, sizeof(len), file) != sizeof(len) || fwrite(col_name, 1, len, file) != len) { - msg("xtrabackup: Error: writing column name."); + msg("mariabackup: Error: writing column name."); return(false); } @@ -5475,7 +5480,7 @@ xb_export_cfg_write_header( mach_write_to_4(value, IB_EXPORT_CFG_VERSION_V1); if (fwrite(&value, 1, sizeof(value), file) != sizeof(value)) { - msg("xtrabackup: Error: writing meta-data version number."); + msg("mariabackup: Error: writing meta-data version number."); return(false); } @@ -5491,7 +5496,7 @@ xb_export_cfg_write_header( if (fwrite(&value, 1, sizeof(value), file) != sizeof(value) || fwrite(hostname, 1, len, file) != len) { - msg("xtrabackup: Error: writing hostname."); + msg("mariabackup: Error: writing hostname."); return(false); } @@ -5506,7 +5511,7 @@ xb_export_cfg_write_header( if (fwrite(&value, 1, sizeof(value), file) != sizeof(value) || fwrite(table->name, 1, len, file) != len) { - msg("xtrabackup: Error: writing table name."); + msg("mariabackup: Error: writing table name."); return(false); } @@ -5517,7 +5522,7 @@ xb_export_cfg_write_header( mach_write_to_8(row, table->autoinc); if (fwrite(row, 1, sizeof(ib_uint64_t), file) != sizeof(ib_uint64_t)) { - msg("xtrabackup: Error: writing table autoinc value."); + msg("mariabackup: Error: writing table autoinc value."); return(false); } @@ -5536,7 +5541,7 @@ xb_export_cfg_write_header( mach_write_to_4(ptr, table->n_cols); if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) { - msg("xtrabackup: Error: writing table meta-data."); + msg("mariabackup: Error: writing table meta-data."); return(false); } @@ -5564,7 +5569,7 @@ xb_export_cfg_write( file = fopen(file_path, "w+b"); if (file == NULL) { - msg("xtrabackup: Error: cannot open %s\n", node->name); + msg("mariabackup: Error: cannot open %s\n", node->name); success = false; } else { @@ -5580,7 +5585,7 @@ xb_export_cfg_write( } if (fclose(file) != 0) { - msg("xtrabackup: Error: cannot close %s\n", node->name); + msg("mariabackup: Error: cannot close %s\n", node->name); success = false; } @@ -5618,7 +5623,7 @@ store_binlog_info( fp = fopen(filename, "w"); if (!fp) { - msg("xtrabackup: failed to open '%s'\n", filename); + msg("mariabackup: failed to open '%s'\n", filename); return(false); } @@ -5642,11 +5647,11 @@ xtrabackup_prepare_func(int argc, char ** argv) if (my_setwd(xtrabackup_real_target_dir,MYF(MY_WME))) { - msg("xtrabackup: cannot my_setwd %s\n", + msg("mariabackup: cannot my_setwd %s\n", xtrabackup_real_target_dir); exit(EXIT_FAILURE); } - msg("xtrabackup: cd to %s\n", xtrabackup_real_target_dir); + msg("mariabackup: cd to %s\n", xtrabackup_real_target_dir); encryption_plugin_prepare_init(argc, argv); @@ -5661,36 +5666,36 @@ xtrabackup_prepare_func(int argc, char ** argv) XTRABACKUP_METADATA_FILENAME); if (!xtrabackup_read_metadata(metadata_path)) { - msg("xtrabackup: Error: failed to read metadata from '%s'\n", + msg("mariabackup: Error: failed to read metadata from '%s'\n", metadata_path); exit(EXIT_FAILURE); } if (!strcmp(metadata_type, "full-backuped")) { - msg("xtrabackup: This target seems to be not prepared yet.\n"); + msg("mariabackup: This target seems to be not prepared yet.\n"); } else if (!strcmp(metadata_type, "log-applied")) { - msg("xtrabackup: This target seems to be already " + msg("mariabackup: This target seems to be already " "prepared with --apply-log-only.\n"); goto skip_check; } else if (!strcmp(metadata_type, "full-prepared")) { - msg("xtrabackup: This target seems to be already prepared.\n"); + msg("mariabackup: This target seems to be already prepared.\n"); } else { - msg("xtrabackup: This target seems not to have correct " + msg("mariabackup: This target seems not to have correct " "metadata...\n"); exit(EXIT_FAILURE); } if (xtrabackup_incremental) { - msg("xtrabackup: error: applying incremental backup " + msg("mariabackup: error: applying incremental backup " "needs target prepared with --apply-log-only.\n"); exit(EXIT_FAILURE); } skip_check: if (xtrabackup_incremental && metadata_to_lsn != incremental_lsn) { - msg("xtrabackup: error: This incremental backup seems " + msg("mariabackup: error: This incremental backup seems " "not to be proper for the target.\n" - "xtrabackup: Check 'to_lsn' of the target and " + "mariabackup: Check 'to_lsn' of the target and " "'from_lsn' of the incremental.\n"); exit(EXIT_FAILURE); } @@ -5727,7 +5732,7 @@ xtrabackup_prepare_func(int argc, char ** argv) if (xtrabackup_incremental) { err = xb_data_files_init(); if (err != DB_SUCCESS) { - msg("xtrabackup: error: xb_data_files_init() failed " + msg("mariabackup: error: xb_data_files_init() failed " "with error code %lu\n", err); goto error_cleanup; } @@ -5777,8 +5782,8 @@ xtrabackup_prepare_func(int argc, char ** argv) srv_n_write_io_threads = 4; } - msg("xtrabackup: Starting InnoDB instance for recovery.\n" - "xtrabackup: Using %lld bytes for buffer pool " + msg("mariabackup: Starting InnoDB instance for recovery.\n" + "mariabackup: Using %lld bytes for buffer pool " "(set by --use-memory parameter)\n", xtrabackup_use_memory); srv_max_buf_pool_modified_pct = (double)max_buf_pool_modified_pct; @@ -5790,54 +5795,8 @@ xtrabackup_prepare_func(int argc, char ** argv) if(innodb_init()) goto error_cleanup; - if (xtrabackup_incremental) { - - it = datafiles_iter_new(fil_system); - if (it == NULL) { - msg("xtrabackup: Error: datafiles_iter_new() failed.\n"); - exit(EXIT_FAILURE); - } - - while ((node = datafiles_iter_next(it)) != NULL) { - byte *header; - ulint size; - ulint actual_size; - mtr_t mtr; - buf_block_t *block; - ulint flags; - - space = node->space; - - /* Align space sizes along with fsp header. We want to process - each space once, so skip all nodes except the first one in a - multi-node space. */ - if (UT_LIST_GET_PREV(chain, node) != NULL) { - continue; - } - - mtr_start(&mtr); - - mtr_s_lock(fil_space_get_latch(space->id, &flags), &mtr); - - block = buf_page_get(space->id, - dict_tf_get_zip_size(flags), - 0, RW_S_LATCH, &mtr); - header = FSP_HEADER_OFFSET + buf_block_get_frame(block); - - size = mtr_read_ulint(header + FSP_SIZE, MLOG_4BYTES, - &mtr); - - mtr_commit(&mtr); - - fil_extend_space_to_desired_size(&actual_size, space->id, size); - } - - datafiles_iter_free(it); - - } /* if (xtrabackup_incremental) */ - if (xtrabackup_export) { - msg("xtrabackup: export option is specified.\n"); + msg("mariabackup: export option is specified.\n"); pfs_os_file_t info_file; char info_file_path[FN_REFLEN]; ibool success; @@ -5854,7 +5813,7 @@ xtrabackup_prepare_func(int argc, char ** argv) it = datafiles_iter_new(fil_system); if (it == NULL) { - msg("xtrabackup: Error: datafiles_iter_new() " + msg("mariabackup: Error: datafiles_iter_new() " "failed.\n"); exit(EXIT_FAILURE); } @@ -5901,7 +5860,7 @@ xtrabackup_prepare_func(int argc, char ** argv) table = dict_table_get_low(table_name); if (!table) { - msg("xtrabackup: error: " + msg("mariabackup: error: " "cannot find dictionary " "record of table %s\n", table_name); @@ -5916,7 +5875,7 @@ xtrabackup_prepare_func(int argc, char ** argv) index = dict_table_get_first_index(table); n_index = UT_LIST_GET_LEN(table->indexes); if (n_index > 31) { - msg("xtrabackup: warning: table '%s' has more " + msg("mariabackup: warning: table '%s' has more " "than 31 indexes, .exp file was not " "generated. Table will fail to import " "on server version prior to 5.6.\n", @@ -5932,7 +5891,7 @@ xtrabackup_prepare_func(int argc, char ** argv) strncpy((char *) page + 12, table_name, 500); - msg("xtrabackup: export metadata of " + msg("mariabackup: export metadata of " "table '%s' to file `%s` " "(%lu indexes)\n", table_name, info_file_path, @@ -5946,7 +5905,7 @@ xtrabackup_prepare_func(int argc, char ** argv) strncpy((char *) page + n_index * 512 + 12, index->name, 500); - msg("xtrabackup: name=%s, " + msg("mariabackup: name=%s, " "id.low=%lu, page=%lu\n", index->name, (ulint)(index->id & @@ -6010,17 +5969,17 @@ xtrabackup_prepare_func(int argc, char ** argv) && srv_start_lsn < incremental_to_lsn) ||(!xtrabackup_incremental && srv_start_lsn < metadata_to_lsn)) { - msg("xtrabackup: error: " + msg("mariabackup: error: " "The transaction log file is corrupted.\n" - "xtrabackup: error: " + "mariabackup: error: " "The log was not applied to the intended LSN!\n"); - msg("xtrabackup: Log applied to lsn " LSN_PF "\n", + msg("mariabackup: Log applied to lsn " LSN_PF "\n", srv_start_lsn); if (xtrabackup_incremental) { - msg("xtrabackup: The intended lsn is " LSN_PF "\n", + msg("mariabackup: The intended lsn is " LSN_PF "\n", incremental_to_lsn); } else { - msg("xtrabackup: The intended lsn is " LSN_PF "\n", + msg("mariabackup: The intended lsn is " LSN_PF "\n", metadata_to_lsn); } exit(EXIT_FAILURE); @@ -6061,7 +6020,7 @@ xtrabackup_prepare_func(int argc, char ** argv) sprintf(filename, "%s/%s", xtrabackup_target_dir, XTRABACKUP_METADATA_FILENAME); if (!xtrabackup_write_metadata(filename)) { - msg("xtrabackup: Error: failed to write metadata " + msg("mariabackup: Error: failed to write metadata " "to '%s'\n", filename); exit(EXIT_FAILURE); } @@ -6069,7 +6028,7 @@ xtrabackup_prepare_func(int argc, char ** argv) if(xtrabackup_extra_lsndir) { sprintf(filename, "%s/%s", xtrabackup_extra_lsndir, XTRABACKUP_METADATA_FILENAME); if (!xtrabackup_write_metadata(filename)) { - msg("xtrabackup: Error: failed to write " + msg("mariabackup: Error: failed to write " "metadata to '%s'\n", filename); exit(EXIT_FAILURE); } @@ -6381,7 +6340,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server) if (optend - argv[i] == 15 && !strncmp(argv[i], "--defaults-file", optend - argv[i])) { - msg("xtrabackup: Error: --defaults-file " + msg("mariabackup: Error: --defaults-file " "must be specified first on the command " "line\n"); exit(EXIT_FAILURE); @@ -6390,7 +6349,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server) !strncmp(argv[i], "--defaults-extra-file", optend - argv[i])) { - msg("xtrabackup: Error: --defaults-extra-file " + msg("mariabackup: Error: --defaults-extra-file " "must be specified first on the command " "line\n"); exit(EXIT_FAILURE); @@ -6441,7 +6400,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server) } if (!server_option) { - msg("xtrabackup: Error:" + msg("mariabackup: Error:" " unknown argument: '%s'\n", opt); exit(EXIT_FAILURE); } @@ -6507,7 +6466,7 @@ int main(int argc, char **argv) if ((!xtrabackup_print_param) && (!xtrabackup_prepare) && (strcmp(mysql_data_home, "./") == 0)) { if (!xtrabackup_print_param) usage(); - msg("\nxtrabackup: Error: Please set parameter 'datadir'\n"); + msg("\nmariabackup: Error: Please set parameter 'datadir'\n"); exit(EXIT_FAILURE); } @@ -6576,7 +6535,7 @@ int main(int argc, char **argv) error = 1; if (error) { - msg("xtrabackup: value '%s' may be wrong format for " + msg("mariabackup: value '%s' may be wrong format for " "incremental option.\n", xtrabackup_incremental); exit(EXIT_FAILURE); } @@ -6586,7 +6545,7 @@ int main(int argc, char **argv) sprintf(filename, "%s/%s", xtrabackup_incremental_basedir, XTRABACKUP_METADATA_FILENAME); if (!xtrabackup_read_metadata(filename)) { - msg("xtrabackup: error: failed to read metadata from " + msg("mariabackup: error: failed to read metadata from " "%s\n", filename); exit(EXIT_FAILURE); } @@ -6599,7 +6558,7 @@ int main(int argc, char **argv) sprintf(filename, "%s/%s", xtrabackup_incremental_dir, XTRABACKUP_METADATA_FILENAME); if (!xtrabackup_read_metadata(filename)) { - msg("xtrabackup: error: failed to read metadata from " + msg("mariabackup: error: failed to read metadata from " "%s\n", filename); exit(EXIT_FAILURE); } @@ -6636,7 +6595,7 @@ int main(int argc, char **argv) } if (xtrabackup_export && innobase_file_per_table == FALSE) { - msg("xtrabackup: auto-enabling --innodb-file-per-table due to " + msg("mariabackup: auto-enabling --innodb-file-per-table due to " "the --export option\n"); innobase_file_per_table = TRUE; } diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c index bfd0c3c63..78940e02c 100644 --- a/extra/my_print_defaults.c +++ b/extra/my_print_defaults.c @@ -98,18 +98,23 @@ static struct my_option my_long_options[] = {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; -void cleanup_and_exit(int exit_code) +static void cleanup_and_exit(int exit_code) __attribute__ ((noreturn)); +static void cleanup_and_exit(int exit_code) { my_end(0); exit(exit_code); } -static void usage(my_bool version) +static void version() { - printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, - MACHINE_TYPE); - if (version) - return; + printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE); +} + + +static void usage() __attribute__ ((noreturn)); +static void usage() +{ + version(); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); puts("Prints all arguments that is give to some program using the default files"); printf("Usage: %s [OPTIONS] [groups]\n", my_progname); @@ -133,12 +138,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), cleanup_and_exit(0); case 'I': case '?': - usage(0); + usage(); case 'v': verbose++; break; case 'V': - usage(1); + version(); + /* fall through */ case '#': DBUG_PUSH(argument ? argument : default_dbug_option); break; @@ -186,7 +192,7 @@ int main(int argc, char **argv) nargs+= array_elements(mysqld_groups); if (nargs < 2) - usage(0); + usage(); load_default_groups=(char**) my_malloc(nargs*sizeof(char*), MYF(MY_WME)); if (!load_default_groups) diff --git a/extra/replace.c b/extra/replace.c index b8c328f29..eabf95383 100644 --- a/extra/replace.c +++ b/extra/replace.c @@ -174,7 +174,7 @@ register char **argv[]; break; case 'V': version=1; - /* fall through */ + /* fall through */ case 'I': case '?': help=1; /* Help text written */ diff --git a/extra/yassl/README b/extra/yassl/README index a3d4f60f5..de1bf5132 100644 --- a/extra/yassl/README +++ b/extra/yassl/README @@ -12,6 +12,14 @@ before calling SSL_new(); *** end Note *** +yaSSL Release notes, version 2.4.4 (8/8/2017) + This release of yaSSL fixes an interop issue. A fix for detecting cipher + suites with non leading zeros is included as yaSSL only supports cipher + suites with leading zeros. Thanks for the report from Security Innovation + and Oracle. + + Users interoping with other SSL stacks should update. + yaSSL Release notes, version 2.4.2 (9/22/2016) This release of yaSSL fixes a medium security vulnerability. A fix for potential AES side channel leaks is included that a local user monitoring diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h index 9ec99b46c..a5ccef102 100644 --- a/extra/yassl/include/openssl/ssl.h +++ b/extra/yassl/include/openssl/ssl.h @@ -1,5 +1,6 @@ /* - Copyright (c) 2005, 2014, Oracle and/or its affiliates. + Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + Use is subject to license terms. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -34,7 +35,7 @@ #include "rsa.h" -#define YASSL_VERSION "2.4.2" +#define YASSL_VERSION "2.4.4" #if defined(__cplusplus) diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp index a481812b3..971a5b665 100644 --- a/extra/yassl/src/yassl_imp.cpp +++ b/extra/yassl/src/yassl_imp.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2014, Oracle and/or its affiliates + Copyright (c) 2005, 2017, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1578,6 +1578,10 @@ void ServerHello::Process(input_buffer& input, SSL& ssl) ssl.SetError(badVersion_error); return; } + if (cipher_suite_[0] != 0x00) { + ssl.SetError(unknown_cipher); + return; + } ssl.set_pending(cipher_suite_[1]); ssl.set_random(random_, server_end); if (id_len_) diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp index ff9c8155d..884e8b5fa 100644 --- a/extra/yassl/src/yassl_int.cpp +++ b/extra/yassl/src/yassl_int.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2014, Oracle and/or its affiliates + Copyright (c) 2005, 2017, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1399,12 +1399,17 @@ void SSL::matchSuite(const opaque* peer, uint length) // start with best, if a match we are good, Ciphers are at odd index // since all SSL and TLS ciphers have 0x00 first byte for (uint i = 1; i < secure_.get_parms().suites_size_; i += 2) - for (uint j = 1; j < length; j+= 2) - if (secure_.use_parms().suites_[i] == peer[j]) { + for (uint j = 0; (j + 1) < length; j+= 2) { + if (peer[j] != 0x00) { + continue; // only 0x00 first byte supported + } + + if (secure_.use_parms().suites_[i] == peer[j + 1]) { secure_.use_parms().suite_[0] = 0x00; - secure_.use_parms().suite_[1] = peer[j]; + secure_.use_parms().suite_[1] = peer[j + 1]; return; } + } SetError(match_error); } @@ -2697,4 +2702,3 @@ extern "C" void yaSSL_CleanUp() yaSSL::sessionsInstance = 0; yaSSL::errorsInstance = 0; } - diff --git a/mysql-test/README b/mysql-test/README index 0fba1cc07..c4ded4e8e 100644 --- a/mysql-test/README +++ b/mysql-test/README @@ -1,74 +1,93 @@ -This directory contains a test suite for the MySQL daemon. To run -the currently existing test cases, simply execute ./mysql-test-run in -this directory. It will fire up the newly built mysqld and test it. +This directory contains test suites for the MariaDB server. To run +currently existing test cases, execute ./mysql-test-run in this directory. -Note that you do not have to have to do "make install", and you could -actually have a co-existing MySQL installation. The tests will not -conflict with it. To run the test suite in a source directory, you -must do make first. +Some tests are known to fail on some platforms or be otherwise unreliable. +The file "unstable-tests" contains the list of such tests along with +a comment for every test. +To exclude them from the test run, execute + # ./mysql-test-run --skip-test-list=unstable-tests -All tests must pass. If one or more of them fail on your system, please -read the following manual section for instructions on how to report the -problem: +In general you do not have to have to do "make install", and you can have +a co-existing MariaDB installation, the tests will not conflict with it. +To run the tests in a source directory, you must do "make" first. + +In Red Hat distributions, you should run the script as user "mysql". +The user is created with nologin shell, so the best bet is something like + # su - + # cd /usr/share/mysql-test + # su -s /bin/bash mysql -c "./mysql-test-run --skip-test-list=unstable-tests" + +This will use the installed MariaDB executables, but will run a private +copy of the server process (using data files within /usr/share/mysql-test), +so you need not start the mysqld service beforehand. + +You can omit --skip-test-list option if you want to check whether +the listed failures occur for you. + +To clean up afterwards, remove the created "var" subdirectory, e.g. + # su -s /bin/bash - mysql -c "rm -rf /usr/share/mysql-test/var" + +If one or more tests fail on your system on reasons other than listed +in lists of unstable tests, please read the following manual section +for instructions on how to report the problem: https://mariadb.com/kb/en/reporting-bugs If you want to use an already running MySQL server for specific tests, use the --extern option to mysql-test-run. Please note that in this mode, -the test suite expects you to provide the names of the tests to run. +you are expected to provide names of the tests to run. + For example, here is the command to run the "alias" and "analyze" tests with an external server: -mysql-test-run --extern socket=/tmp/mysql.sock alias analyze + # mysql-test-run --extern socket=/tmp/mysql.sock alias analyze -To match your setup, you might also need to provide --socket, --user, and -other relevant options. +To match your setup, you might need to provide other relevant options. -With no test cases named on the command line, mysql-test-run falls back -to the normal "non-extern" behavior. The reason for this is that some -tests cannot run with an external server. +With no test names on the command line, mysql-test-run will attempt +to execute the default set of tests, which will certainly fail, because +many tests cannot run with an external server (they need to control the +options with which the server is started, restart the server during +execution, etc.) You can create your own test cases. To create a test case, create a new file in the t subdirectory using a text editor. The file should have a .test extension. For example: - xemacs t/test_case_name.test + # xemacs t/test_case_name.test - In the file, put a set of SQL statements that create some tables, - load test data, and run some queries to manipulate it. +In the file, put a set of SQL statements that create some tables, +load test data, and run some queries to manipulate it. - We would appreciate it if you name your test tables t1, t2, t3 ... (to not - conflict too much with existing tables). +Your test should begin by dropping the tables you are going to create and +end by dropping them again. This ensures that you can run the test over +and over again. - Your test should begin by dropping the tables you are going to create and - end by dropping them again. This ensures that you can run the test over - and over again. - - If you are using mysqltest commands (like result file names) in your - test case, you should create the result file as follows: +If you are using mysqltest commands in your test case, you should create +the result file as follows: - mysql-test-run --record test_case_name + # mysql-test-run --record test_case_name - or + or - mysqltest --record < t/test_case_name.test + # mysqltest --record < t/test_case_name.test - If you only have a simple test cases consisting of SQL statements and - comments, you can create the test case in one of the following ways: +If you only have a simple test case consisting of SQL statements and +comments, you can create the result file in one of the following ways: - mysql-test-run --record test_case_name + # mysql-test-run --record test_case_name - mysql test < t/test_case_name.test > r/test_case_name.result + # mysql test < t/test_case_name.test > r/test_case_name.result - mysqltest --record --database test --result-file=r/test_case_name.result < t/test_case_name.test + # mysqltest --record --database test --result-file=r/test_case_name.result < t/test_case_name.test - When this is done, take a look at r/test_case_name.result - - If the result is incorrect, you have found a bug. In this case, you should - edit the test result to the correct results so that we can verify - that the bug is corrected in future releases. +When this is done, take a look at r/test_case_name.result . +If the result is incorrect, you have found a bug. In this case, you should +edit the test result to the correct results so that we can verify that +the bug is corrected in future releases. If you want to submit your test case you can send it -to maria-developers@lists.launchpad.com or attach it to a bug report on +to maria-developers@lists.launchpad.net or attach it to a bug report on http://mariadb.org/jira/. If the test case is really big or if it contains 'not public' data, diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test index 20b5ded6e..435de640c 100644 --- a/mysql-test/include/check-testcase.test +++ b/mysql-test/include/check-testcase.test @@ -79,6 +79,8 @@ call mtr.check_testcase(); let $datadir=`select @@datadir`; list_files $datadir mysql_upgrade_info; +list_files $datadir/test #sql*; +list_files $datadir/mysql #sql*; --enable_query_log diff --git a/mysql-test/include/have_debug.inc b/mysql-test/include/have_debug.inc index 5df3080a6..a035031e4 100644 --- a/mysql-test/include/have_debug.inc +++ b/mysql-test/include/have_debug.inc @@ -2,8 +2,3 @@ # suite.pm will make sure that all tests including this file # will be skipped unless this is a debug build. # -# The test below is redundant - -if (`select version() not like '%debug%'`) { - --skip Needs a debug build -} diff --git a/mysql-test/include/have_example_plugin.inc b/mysql-test/include/have_example_plugin.inc index 5571c3458..c0da490dd 100644 --- a/mysql-test/include/have_example_plugin.inc +++ b/mysql-test/include/have_example_plugin.inc @@ -1,14 +1,4 @@ # -# Check if server has support for loading plugins +# suite.pm will make sure that all tests including this file +# will be skipped unless dynamic ha_example plugin is available # -if (`SELECT @@have_dynamic_loading != 'YES'`) { - --skip Example plugin requires dynamic loading -} - -# -# Check if the variable EXAMPLE_PLUGIN is set -# -if (!$HA_EXAMPLE_SO) { - --skip Need example plugin -} - diff --git a/mysql-test/include/have_innodb.inc b/mysql-test/include/have_innodb.inc index 021970423..b89797d58 100644 --- a/mysql-test/include/have_innodb.inc +++ b/mysql-test/include/have_innodb.inc @@ -2,9 +2,3 @@ # suite.pm will make sure that all tests including this file # will be skipped unless innodb or xtradb is enabled # -# The test below is redundant - -if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED')`) -{ - --skip Test requires InnoDB. -} diff --git a/mysql-test/include/have_xtradb.inc b/mysql-test/include/have_xtradb.inc index 478b9926e..d12802e05 100644 --- a/mysql-test/include/have_xtradb.inc +++ b/mysql-test/include/have_xtradb.inc @@ -2,10 +2,3 @@ # suite.pm will make sure that all tests including this file # will be skipped unless xtradb is enabled # -# The test below is redundant - -if (!`SELECT count(*) FROM information_schema.plugins WHERE - plugin_name = 'innodb' AND plugin_status = 'active' AND - plugin_description LIKE '%xtradb%'`){ - skip Needs XtraDB engine; -} diff --git a/mysql-test/include/not_embedded.inc b/mysql-test/include/not_embedded.inc index 88185af3b..4c168f719 100644 --- a/mysql-test/include/not_embedded.inc +++ b/mysql-test/include/not_embedded.inc @@ -2,9 +2,3 @@ # suite.pm will make sure that all tests including this file # will be skipped unless this is an embedded test run # -# The test below is redundant - -if (`select version() like '%embedded%'`) { - This should never happen; -} - diff --git a/mysql-test/include/not_windows.inc b/mysql-test/include/not_windows.inc index 924027107..083730954 100644 --- a/mysql-test/include/not_windows.inc +++ b/mysql-test/include/not_windows.inc @@ -1,4 +1,4 @@ ---require r/not_windows.require -disable_query_log; -select convert(@@version_compile_os using latin1) NOT IN ("Win32","Win64","Windows") as "TRUE"; -enable_query_log; +# +# suite.pm will make sure that all tests including this file +# will be skipped unless this is on Windows +# diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index d7e902259..17e2dc9b0 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -1359,6 +1359,58 @@ rename table t2 to t1; execute stmt1; deallocate prepare stmt1; drop table t2; +# +# MDEV-8960 Can't refer the same column twice in one ALTER TABLE +# +CREATE TABLE t1 ( +`a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, +ALTER COLUMN `consultant_id` DROP DEFAULT; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `consultant_id` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +DROP TABLE t1; +CREATE TABLE t1 ( +`a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, +ALTER COLUMN `consultant_id` SET DEFAULT 2; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `consultant_id` int(11) NOT NULL DEFAULT '2' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +DROP TABLE t1; +CREATE TABLE t1 ( +`a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, +ALTER COLUMN `consultant_id` DROP DEFAULT; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `consultant_id` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +DROP TABLE t1; +CREATE TABLE t1 ( +`a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, +ALTER COLUMN `consultant_id` DROP DEFAULT, +MODIFY COLUMN `consultant_id` BIGINT; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `consultant_id` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +DROP TABLE t1; CREATE TABLE t1 ( id INT(11) NOT NULL, x_param INT(11) DEFAULT NULL, @@ -2122,59 +2174,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 DROP TABLE t1; # -# MDEV-8960 Can't refer the same column twice in one ALTER TABLE -# -CREATE TABLE t1 ( -`a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, -ALTER COLUMN `consultant_id` DROP DEFAULT; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `consultant_id` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -DROP TABLE t1; -CREATE TABLE t1 ( -`a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, -ALTER COLUMN `consultant_id` SET DEFAULT 2; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `consultant_id` int(11) NOT NULL DEFAULT '2' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -DROP TABLE t1; -CREATE TABLE t1 ( -`a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, -ALTER COLUMN `consultant_id` DROP DEFAULT; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `consultant_id` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -DROP TABLE t1; -CREATE TABLE t1 ( -`a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, -ALTER COLUMN `consultant_id` DROP DEFAULT, -MODIFY COLUMN `consultant_id` BIGINT; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `consultant_id` bigint(20) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -DROP TABLE t1; -# -# Start of 10.1 tests +# End of 10.0 tests # # # MDEV-7374 : Losing connection to MySQL while running ALTER TABLE @@ -2197,3 +2197,6 @@ t1 CREATE TABLE `t1` ( KEY `i1` (`a`) COMMENT 'comment2' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +# +# End of 10.1 tests +# diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index 9ceb7efde..6fc1c9628 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -220,6 +220,22 @@ a d 3 11120436154190595086 drop table t1, t2; End of 5.0 tests +# +# Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE +# (SIG 6 -STRINGS/CTYPE-UTF8.C:5151) +# +set @@sql_mode=''; +CREATE TABLE t1(c1 SET('','')CHARACTER SET ucs2); +Warnings: +Note 1291 Column 'c1' has duplicated value '' in SET +INSERT INTO t1 VALUES(990101.102); +Warnings: +Warning 1265 Data truncated for column 'c1' at row 1 +SELECT COALESCE(c1)FROM t1 ORDER BY 1; +COALESCE(c1) + +DROP TABLE t1; +set @@sql_mode=default; CREATE TABLE t1(a YEAR); SELECT 1 FROM t1 WHERE a=1 AND CASE 1 WHEN a THEN 1 ELSE 1 END; 1 diff --git a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result index b5774548d..d10d5f4bf 100644 --- a/mysql-test/r/ctype_gbk.result +++ b/mysql-test/r/ctype_gbk.result @@ -5100,6 +5100,24 @@ E05B DROP TABLE t1; # Start of ctype_E05C.inc # +# MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant +# +SET NAMES latin1; +CREATE TABLE t1 (a TEXT CHARACTER SET gbk); +INSERT INTO t1 VALUES (0xEE5D); +SELECT a<>0xEE5D AS a FROM t1; +a +0 +CREATE VIEW v1 AS SELECT a<>0xEE5D AS a FROM t1; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`a` <> 0xee5d) AS `a` from `t1` latin1 latin1_swedish_ci +SELECT * FROM v1; +a +0 +DROP VIEW v1; +DROP TABLE t1; +# # End of 10.0 tests # # diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result index c6f190101..85035982c 100644 --- a/mysql-test/r/ctype_latin1.result +++ b/mysql-test/r/ctype_latin1.result @@ -7972,6 +7972,24 @@ SELECT _latin1 0x7E, _latin1 X'7E', _latin1 B'01111110'; _latin1 0x7E _latin1 X'7E' _latin1 B'01111110' ~ ~ ~ # +# MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant +# +SET NAMES latin1; +CREATE TABLE t1 (a TEXT CHARACTER SET latin1); +INSERT INTO t1 VALUES (0xC0); +SELECT a<>0xEE5D AS a FROM t1; +a +1 +CREATE VIEW v1 AS SELECT a<>0xC0 AS a FROM t1; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`a` <> 0xc0) AS `a` from `t1` latin1 latin1_swedish_ci +SELECT * FROM v1; +a +0 +DROP VIEW v1; +DROP TABLE t1; +# # End of 10.0 tests # # diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 9402acc9e..f9f0acf72 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -4586,6 +4586,36 @@ NO_ENGINE_SUBSTITUTION SET sql_mode=DEFAULT; SET NAMES utf8; # +# MDEV-13972 crash in Item_func_sec_to_time::get_date +# +SELECT SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2)); +SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2)) +838:59:59.999999 +Warnings: +Warning 1292 Truncated incorrect time value: '77760000' +# +# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +# +CREATE TABLE t1 (c1 VARCHAR(32766) CHARACTER SET ucs2); +DESCRIBE t1; +Field Type Null Key Default Extra +c1 varchar(32766) YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(32767) CHARACTER SET ucs2); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 text YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(32768) CHARACTER SET ucs2); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 mediumtext YES NULL +DROP TABLE t1; +# # End of 5.5 tests # # diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result index 645db153a..22b0e9c0f 100644 --- a/mysql-test/r/ctype_utf32.result +++ b/mysql-test/r/ctype_utf32.result @@ -1678,6 +1678,21 @@ NO_ENGINE_SUBSTITUTION SET sql_mode=DEFAULT; SET NAMES utf8; # +# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +# +CREATE TABLE t1 (c1 VARCHAR(16383) CHARACTER SET utf32); +DESCRIBE t1; +Field Type Null Key Default Extra +c1 varchar(16383) YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(16384) CHARACTER SET utf32); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 mediumtext YES NULL +DROP TABLE t1; +# # End of 5.5 tests # # diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 2b53f43cf..ca585f9e3 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -6274,6 +6274,28 @@ Warnings: SET sql_mode=DEFAULT; DROP TABLE t1; # +# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +# +CREATE TABLE t1 (c1 VARCHAR(21844) CHARACTER SET utf8); +DESCRIBE t1; +Field Type Null Key Default Extra +c1 varchar(21844) YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(21845) CHARACTER SET utf8); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 text YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(21846) CHARACTER SET utf8); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 mediumtext YES NULL +DROP TABLE t1; +# # End of 5.5 tests # # diff --git a/mysql-test/r/delete_returning.result b/mysql-test/r/delete_returning.result index 0618b495a..3a95de0cd 100644 --- a/mysql-test/r/delete_returning.result +++ b/mysql-test/r/delete_returning.result @@ -199,3 +199,15 @@ i 2 DROP PROCEDURE p1; DROP TABLE t1; +# +# MDEV-13776: DELETE ... RETURNING with sql_mode='ONLY_FULL_GROUP_BY' +# +set @sql_mode_save= @@sql_mode; +set sql_mode='ONLY_FULL_GROUP_BY'; +CREATE TABLE t1 (id INT); +INSERT INTO t1 VALUE(1),(2),(3); +DELETE FROM t1 WHERE id > 2 RETURNING *; +id +3 +set sql_mode=@sql_mode_save; +DROP TABLE t1; diff --git a/mysql-test/r/delimiter_command_case_sensitivity.result b/mysql-test/r/delimiter_command_case_sensitivity.result new file mode 100644 index 000000000..6ed281c75 --- /dev/null +++ b/mysql-test/r/delimiter_command_case_sensitivity.result @@ -0,0 +1,2 @@ +1 +1 diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result index 776fe6278..e1d494d33 100644 --- a/mysql-test/r/errors.result +++ b/mysql-test/r/errors.result @@ -27,7 +27,7 @@ create table t1 (a int(256)); ERROR 42000: Display width out of range for 'a' (max = 255) set sql_mode='traditional'; create table t1 (a varchar(66000)); -ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead set sql_mode=default; CREATE TABLE t1 (a INT); SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index 1855fa725..c80ea5d13 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -811,9 +811,17 @@ PREPARE s FROM "SELECT 1 FROM t1 WHERE 1 < ALL (SELECT @:= (1 IN (SELECT 1 FROM EXECUTE s; 1 DROP TABLE t1; +# # End of 5.3 tests # -# Start of 10.0 tests +create table t1 (a int); +insert t1 values (1),(2),(3); +select * from t1 where 1 in (a, name_const('a', null)); +a +1 +drop table t1; +# +# End of 5.5 tests # # # MDEV-10020 InnoDB NOT IN Query Crash When One Item Is NULL @@ -829,7 +837,7 @@ SELECT * FROM t1 WHERE b NOT IN (NULL, '', 'A'); a b DROP TABLE t1; # -# Start of 10.1 tests +# End of 10.0 tests # # # MDEV-8755 Equal field propagation is not performed any longer for the IN list when multiple comparison types diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index b184a9b63..545d51517 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -1446,3 +1446,17 @@ SELECT CONCAT(NAME_CONST('name',15),'오'); CONCAT(NAME_CONST('name',15),'오') 15오 SET NAMES latin1; +# +# MDEV-14116 INET6_NTOA output is set as null to varchar(39) variable +# +CREATE PROCEDURE p1() +BEGIN +DECLARE ip_full_addr varchar(39) DEFAULT ""; +SELECT INET6_NTOA(UNHEX('20000000000000000000000000000000')) into ip_full_addr; +SELECT ip_full_addr; +END; +$$ +CALL p1(); +ip_full_addr +2000:: +DROP PROCEDURE p1; diff --git a/mysql-test/r/func_regexp_pcre.result b/mysql-test/r/func_regexp_pcre.result index 7712b76e3..cda1c2e7e 100644 --- a/mysql-test/r/func_regexp_pcre.result +++ b/mysql-test/r/func_regexp_pcre.result @@ -883,32 +883,32 @@ SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral, 1 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp -SELECT CONCAT(REPEAT('100,',133),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; -CONCAT(REPEAT('100,',133),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' +SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' 1 SELECT CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp -SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); -REGEXP_INSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') 1 SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp -SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); -LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) -535 +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) +243 SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp -SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); -LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) 0 SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 76daecf82..371dffdd3 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -2771,7 +2771,33 @@ SELECT 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2; 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2 3 # -# Start of 10.0 tests +# MDEV-11819 NO_ZERO_IN_DATE: Incorrect generated column value +# +SET sql_mode='NO_ZERO_IN_DATE'; +CREATE TABLE t1 (a TIME(6)); +INSERT INTO t1 SELECT timediff(timestamp'2008-12-31 23:59:59.000001',timestamp'2008-12-30 01:01:01.000002'); +SELECT * FROM t1; +a +46:58:57.999999 +DROP TABLE t1; +SET sql_mode=DEFAULT; +# +# MDEV-13972 crash in Item_func_sec_to_time::get_date +# +DO TO_DAYS(SEC_TO_TIME(TIME(CEILING(UUID())))); +DO TO_DAYS(SEC_TO_TIME(MAKEDATE('',RAND(~(''))))); +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect time value: '20000101' +SELECT SEC_TO_TIME(MAKEDATE(0,RAND(~0))); +SEC_TO_TIME(MAKEDATE(0,RAND(~0))) +838:59:59 +Warnings: +Warning 1292 Truncated incorrect time value: '20000101' +# +# End of 5.5 tests # # # MDEV-8205 timediff returns null when comparing decimal time to time string value diff --git a/mysql-test/r/gis-precise.result b/mysql-test/r/gis-precise.result index 3824ba6af..89e5c2374 100644 --- a/mysql-test/r/gis-precise.result +++ b/mysql-test/r/gis-precise.result @@ -486,6 +486,25 @@ ST_Touches(ST_PolygonFromText('POLYGON((0 0,0 5,5 5,5 0,0 0))'),ST_PointFromText select ST_Touches(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)')); ST_Touches(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)')) 0 +SELECT ST_RELATE( +ST_DIFFERENCE( +GEOMETRYFROMTEXT(' + MULTILINESTRING( + ( 12841 36140, 8005 31007, 26555 31075, 52765 41191, + 28978 6548, 45720 32057, 53345 3221 ), + ( 8304 59107, 25233 31592, 40502 25303, 8205 42940 ), + ( 7829 7305, 58841 56759, 64115 8512, 37562 54145, 2210 14701 ), + ( 20379 2805, 40807 27770, 28147 14883, 26439 29383, 55663 5086 ), + ( 35944 64702, 14433 23728, 49317 26241, 790 16941 ) + ) + '), +GEOMETRYFROMTEXT('POINT(46061 13545)') +), +GEOMETRYFROMTEXT('POINT(4599 60359)'), +'F*FFFF**F' + ) as relate_res; +relate_res +0 DROP TABLE IF EXISTS p1; CREATE PROCEDURE p1(dist DOUBLE, geom TEXT) BEGIN diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index cee479761..2b5a53630 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -2069,3 +2069,35 @@ Opened_tables 3 drop database mysqltest; drop database db1; set global sql_mode=default; +USE test; +# +# End of 10.0 tests +# +# +# Start of 10.1 tests +# +# +# MDEV-13242 Wrong results for queries with row constructors and information_schema +# +CREATE TABLE tt1(c1 INT); +CREATE TABLE tt2(c2 INT); +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (('tt1', 'c1')); +count(*) +1 +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (('tt2', 'c2')); +count(*) +1 +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (('tt1','c1'),('tt2', 'c2')); +count(*) +2 +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (SELECT 'tt1','c1' FROM dual UNION SELECT 'tt2', 'c2' FROM dual); +count(*) +2 +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name='tt1' AND column_name='c1') OR (table_name='tt2' AND column_name='c2'); +count(*) +2 +SELECT column_name FROM information_schema.columns WHERE (table_name, column_name) IN (('tt1','c1'),('tt2', 'c2')) ORDER BY column_name; +column_name +c1 +c2 +DROP TABLE tt1, tt2; diff --git a/mysql-test/r/mdev13607.result b/mysql-test/r/mdev13607.result new file mode 100644 index 000000000..08848bc64 --- /dev/null +++ b/mysql-test/r/mdev13607.result @@ -0,0 +1,469 @@ +# +# Bug mdev-13607: overflow of current_record_count +# +CREATE TABLE t1 (id INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES +(1),(2),(3),(4),(5),(6),(7),(8),(9),(10), +(11),(12),(13),(14),(15),(16),(17),(18),(19),(20), +(21),(22),(23),(24),(25),(26),(27),(28),(29),(30), +(31),(32),(33),(34),(35),(36),(37),(38),(39),(40), +(41),(42),(43),(44),(45),(46),(47),(48),(49),(50); +CREATE TABLE t2 (id INT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2); +CREATE TABLE t3 (id INT) ENGINE=InnoDB; +INSERT INTO t3 VALUES (1),(2); +ANALYZE TABLE t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status OK +test.t3 analyze status OK +explain SELECT * FROM +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_1 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_2 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_3 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_4 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_5 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_6 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_7 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_8 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_9 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_10 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_11 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_12 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_13 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_14 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_15 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_16 +; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY r1 ALL NULL NULL NULL NULL 2 +1 PRIMARY d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +1 PRIMARY r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +17 DERIVED r1 ALL NULL NULL NULL NULL 2 +17 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +17 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r1 ALL NULL NULL NULL NULL 2 +16 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +16 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r1 ALL NULL NULL NULL NULL 2 +15 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +15 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r1 ALL NULL NULL NULL NULL 2 +14 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +14 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r1 ALL NULL NULL NULL NULL 2 +13 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +13 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r1 ALL NULL NULL NULL NULL 2 +12 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +12 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r1 ALL NULL NULL NULL NULL 2 +11 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +11 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r1 ALL NULL NULL NULL NULL 2 +10 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +10 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r1 ALL NULL NULL NULL NULL 2 +9 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +9 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r1 ALL NULL NULL NULL NULL 2 +8 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +8 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r1 ALL NULL NULL NULL NULL 2 +7 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +7 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r1 ALL NULL NULL NULL NULL 2 +6 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +6 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r1 ALL NULL NULL NULL NULL 2 +5 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +5 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r1 ALL NULL NULL NULL NULL 2 +4 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +4 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r1 ALL NULL NULL NULL NULL 2 +3 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +3 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +DROP TABLE t1,t2,t3; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 9b6adb214..e114f424e 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1699,7 +1699,14 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (v varchar(65535)); -ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs +Warnings: +Note 1246 Converting column 'v' from VARCHAR to TEXT +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` text +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; set storage_engine=MyISAM; set @save_concurrent_insert=@@concurrent_insert; set global concurrent_insert=1; diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 94aaee0c5..8463c3074 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -1250,3 +1250,4 @@ DELIMITER ; ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; +mysqlbinlog Ver VER for OS at ARCH diff --git a/mysql-test/r/not_windows.require b/mysql-test/r/not_windows.require deleted file mode 100644 index 09aae1ed1..000000000 --- a/mysql-test/r/not_windows.require +++ /dev/null @@ -1,2 +0,0 @@ -TRUE -1 diff --git a/mysql-test/r/partition_datatype.result b/mysql-test/r/partition_datatype.result index fa58df3de..eb09d8196 100644 --- a/mysql-test/r/partition_datatype.result +++ b/mysql-test/r/partition_datatype.result @@ -314,12 +314,14 @@ bbbb drop table t1; create table t1 (a varchar(3070)) partition by key (a); ERROR HY000: The total length of the partitioning fields is too large +create table t1 (a varchar(65532) not null) partition by key (a); +ERROR HY000: The total length of the partitioning fields is too large create table t1 (a varchar(65533)) partition by key (a); -ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs +ERROR HY000: A BLOB field is not allowed in partition function create table t1 (a varchar(65534) not null) partition by key (a); -ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs +ERROR HY000: A BLOB field is not allowed in partition function create table t1 (a varchar(65535)) partition by key (a); -ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs +ERROR HY000: A BLOB field is not allowed in partition function create table t1 (a bit(27), primary key (a)) engine=myisam partition by hash (a) (partition p0, partition p1, partition p2); diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index b24fe55e1..94f1a51de 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -4189,4 +4189,147 @@ Warnings: Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`c` AS `c` from `test`.`t1` where 0 deallocate prepare stmt2; drop table t1; +# +# MDEV-9208: Function->Function->View = Mysqld segfault +# (Server crashes in Dependency_marker::visit_field on 2nd +# execution with merged subquery) +# +CREATE TABLE t1 (i1 INT); +insert into t1 values(1),(2); +CREATE TABLE t2 (i2 INT); +insert into t2 values(1),(2); +prepare stmt from " + select 1 from ( + select + if (i1<0, 0, 0) as f1, + (select f1) as f2 + from t1, t2 + ) sq +"; +execute stmt; +1 +1 +1 +1 +1 +execute stmt; +1 +1 +1 +1 +1 +drop table t1,t2; +# +# MDEV-9619: Assertion `null_ref_table' failed in virtual +# table_map Item_direct_view_ref::used_tables() const on 2nd +# execution of PS +# +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES ('a'),('b'); +CREATE TABLE t2 (f2 VARCHAR(10)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('c'),('d'); +PREPARE stmt FROM "SELECT * FROM v1 WHERE f1 = SOME ( SELECT f2 FROM t2 )"; +EXECUTE stmt; +f1 +EXECUTE stmt; +f1 +insert into t1 values ('c'); +EXECUTE stmt; +f1 +c +EXECUTE stmt; +f1 +c +deallocate prepare stmt; +drop view v1; +drop table t1,t2; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES ('a'),('b'); +CREATE TABLE t2 (f2 VARCHAR(10)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('c'),('d'); +PREPARE stmt FROM "SELECT * FROM v1 WHERE (f1,f1) = SOME ( SELECT f2,f2 FROM t2 )"; +EXECUTE stmt; +f1 +EXECUTE stmt; +f1 +insert into t1 values ('c'); +EXECUTE stmt; +f1 +c +EXECUTE stmt; +f1 +c +deallocate prepare stmt; +drop view v1; +drop table t1,t2; +CREATE TABLE t1 (column1 INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (3),(9); +CREATE TABLE t2 (column2 INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1),(4); +CREATE TABLE t3 (column3 INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (6),(8); +CREATE TABLE t4 (column4 INT) ENGINE=MyISAM; +INSERT INTO t4 VALUES (2),(5); +PREPARE stmt FROM " +SELECT ( + SELECT MAX( table1.column1 ) AS field1 + FROM t1 AS table1 + WHERE (111,table3.column3) IN ( SELECT 111,table2.column2 AS field2 FROM t2 AS table2 ) +) AS sq +FROM t3 AS table3, t4 AS table4 GROUP BY sq +"; +EXECUTE stmt; +sq +NULL +EXECUTE stmt; +sq +NULL +deallocate prepare stmt; +drop table t1,t2,t3,t4; +create table t1 (a int, b int, c int); +create table t2 (x int, y int, z int); +create table t3 as select * from t1; +insert into t1 values (1,2,3),(4,5,6),(100,200,300),(400,500,600); +insert into t2 values (1,2,3),(7,8,9),(100,200,300),(400,500,600); +insert into t3 values (1,2,3),(11,12,13),(100,0,0),(400,500,600); +set @optimizer_switch_save=@@optimizer_switch; +set @join_cache_level_save=@@join_cache_level; +set optimizer_switch='materialization=off'; +set join_cache_level=0; +select * from t1 where (select a,b from t3 where t3.c=t1.c) in (select x,y from t2 where t1.c= t2.z); +a b c +1 2 3 +400 500 600 +prepare stmt from "select * from t1 where (select a,b from t3 where t3.c=t1.c) in (select x,y from t2 where t1.c= t2.z)"; +EXECUTE stmt; +a b c +1 2 3 +400 500 600 +EXECUTE stmt; +a b c +1 2 3 +400 500 600 +create view v1 as select * from t1; +create view v2 as select * from t2; +create view v3 as select * from t3; +select * from v1 where (select a,b from v3 where v3.c=v1.c) in (select x,y from v2 where v1.c= v2.z); +a b c +1 2 3 +400 500 600 +prepare stmt from "select * from v1 where (select a,b from v3 where v3.c=v1.c) in (select x,y from v2 where v1.c= v2.z)"; +EXECUTE stmt; +a b c +1 2 3 +400 500 600 +EXECUTE stmt; +a b c +1 2 3 +400 500 600 +set optimizer_switch=@optimizer_switch_save; +set join_cache_level=@join_cache_level_save; +deallocate prepare stmt; +drop view v1,v2,v3; +drop table t1,t2,t3; # End of 5.5 tests diff --git a/mysql-test/r/range_vs_index_merge.result b/mysql-test/r/range_vs_index_merge.result index 6813c40a5..bc46a4fdd 100644 --- a/mysql-test/r/range_vs_index_merge.result +++ b/mysql-test/r/range_vs_index_merge.result @@ -1807,4 +1807,85 @@ id state capital 7 Pennsylvania Harrisburg 8 Virginia Richmond DROP TABLE t1; +# +# mdev-11574: do not build index merge of two indexes when +# one index is an infix of the other index +# +set names utf8; +CREATE DATABASE world; +use world; +CREATE TABLE Country ( +Code char(3) NOT NULL default '', +Name char(52) NOT NULL default '', +SurfaceArea float(10,2) NOT NULL default '0.00', +Population int(11) NOT NULL default '0', +Capital int(11) default NULL, +PRIMARY KEY (Code), +UNIQUE INDEX (Name) +); +CREATE TABLE City ( +ID int(11) NOT NULL auto_increment, +Name char(35) NOT NULL default '', +Country char(3) NOT NULL default '', +Population int(11) NOT NULL default '0', +PRIMARY KEY (ID), +INDEX (Population), +INDEX (Country) +); +CREATE TABLE CountryLanguage ( +Country char(3) NOT NULL default '', +Language char(30) NOT NULL default '', +Percentage float(3,1) NOT NULL default '0.0', +PRIMARY KEY (Country, Language), +INDEX (Percentage) +); +DROP INDEX Country ON City; +CREATE INDEX CountryName ON City(Country,Name); +CREATE INDEX Name ON City(Name); +select * from City +where +Country='FIN' AND Name IN ('Lahti','Imatra') OR +Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR +Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR +Country='DEU' AND Name IN ('Berlin', 'Bonn') OR +Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR +Country='PRT' AND Name IN ('Braga', 'Porto') OR +Country='FRA' AND Name IN ('Paris', 'Marcel') OR +Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR +Country='NOR' AND Name IN ('Oslo', 'Bergen') OR +Country='ITA' AND Name IN ('Napoli', 'Venezia'); +ID Name Country Population +175 Antwerpen BEL 446525 +176 Gent BEL 224180 +3068 Berlin DEU 3386667 +3087 Bonn DEU 301048 +3242 Lahti FIN 96921 +2974 Paris FRA 2125246 +1466 Napoli ITA 1002619 +1474 Venezia ITA 277305 +2808 Bergen NOR 230948 +2807 Oslo NOR 508726 +2928 Warszawa POL 1615369 +2931 Wroclaw POL 636765 +2918 Braga PRT 90535 +2915 Porto PRT 273060 +3580 Moscow RUS 8389200 +3581 St Petersburg RUS 4694000 +3048 Stockholm SWE 750348 +3051 Uppsala SWE 189569 +explain select * from City +where +Country='FIN' AND Name IN ('Lahti','Imatra') OR +Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR +Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR +Country='DEU' AND Name IN ('Berlin', 'Bonn') OR +Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR +Country='PRT' AND Name IN ('Braga', 'Porto') OR +Country='FRA' AND Name IN ('Paris', 'Marcel') OR +Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR +Country='NOR' AND Name IN ('Oslo', 'Bergen') OR +Country='ITA' AND Name IN ('Napoli', 'Venezia'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE City range CountryName,Name CountryName 38 NULL 22 Using index condition; Using where +DROP DATABASE world; set session optimizer_switch='index_merge_sort_intersection=default'; diff --git a/mysql-test/r/range_vs_index_merge_innodb.result b/mysql-test/r/range_vs_index_merge_innodb.result index 13fbc0ac3..a6ec20053 100644 --- a/mysql-test/r/range_vs_index_merge_innodb.result +++ b/mysql-test/r/range_vs_index_merge_innodb.result @@ -1808,5 +1808,86 @@ id state capital 7 Pennsylvania Harrisburg 8 Virginia Richmond DROP TABLE t1; +# +# mdev-11574: do not build index merge of two indexes when +# one index is an infix of the other index +# +set names utf8; +CREATE DATABASE world; +use world; +CREATE TABLE Country ( +Code char(3) NOT NULL default '', +Name char(52) NOT NULL default '', +SurfaceArea float(10,2) NOT NULL default '0.00', +Population int(11) NOT NULL default '0', +Capital int(11) default NULL, +PRIMARY KEY (Code), +UNIQUE INDEX (Name) +); +CREATE TABLE City ( +ID int(11) NOT NULL auto_increment, +Name char(35) NOT NULL default '', +Country char(3) NOT NULL default '', +Population int(11) NOT NULL default '0', +PRIMARY KEY (ID), +INDEX (Population), +INDEX (Country) +); +CREATE TABLE CountryLanguage ( +Country char(3) NOT NULL default '', +Language char(30) NOT NULL default '', +Percentage float(3,1) NOT NULL default '0.0', +PRIMARY KEY (Country, Language), +INDEX (Percentage) +); +DROP INDEX Country ON City; +CREATE INDEX CountryName ON City(Country,Name); +CREATE INDEX Name ON City(Name); +select * from City +where +Country='FIN' AND Name IN ('Lahti','Imatra') OR +Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR +Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR +Country='DEU' AND Name IN ('Berlin', 'Bonn') OR +Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR +Country='PRT' AND Name IN ('Braga', 'Porto') OR +Country='FRA' AND Name IN ('Paris', 'Marcel') OR +Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR +Country='NOR' AND Name IN ('Oslo', 'Bergen') OR +Country='ITA' AND Name IN ('Napoli', 'Venezia'); +ID Name Country Population +175 Antwerpen BEL 446525 +176 Gent BEL 224180 +3068 Berlin DEU 3386667 +3087 Bonn DEU 301048 +3242 Lahti FIN 96921 +2974 Paris FRA 2125246 +1466 Napoli ITA 1002619 +1474 Venezia ITA 277305 +2808 Bergen NOR 230948 +2807 Oslo NOR 508726 +2928 Warszawa POL 1615369 +2931 Wroclaw POL 636765 +2918 Braga PRT 90535 +2915 Porto PRT 273060 +3580 Moscow RUS 8389200 +3581 St Petersburg RUS 4694000 +3048 Stockholm SWE 750348 +3051 Uppsala SWE 189569 +explain select * from City +where +Country='FIN' AND Name IN ('Lahti','Imatra') OR +Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR +Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR +Country='DEU' AND Name IN ('Berlin', 'Bonn') OR +Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR +Country='PRT' AND Name IN ('Braga', 'Porto') OR +Country='FRA' AND Name IN ('Paris', 'Marcel') OR +Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR +Country='NOR' AND Name IN ('Oslo', 'Bergen') OR +Country='ITA' AND Name IN ('Napoli', 'Venezia'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE City range CountryName,Name CountryName 38 NULL 20 Using index condition; Using where +DROP DATABASE world; set session optimizer_switch='index_merge_sort_intersection=default'; SET SESSION STORAGE_ENGINE=DEFAULT; diff --git a/mysql-test/r/read_only.result b/mysql-test/r/read_only.result index 0673acacf..0640360f4 100644 --- a/mysql-test/r/read_only.result +++ b/mysql-test/r/read_only.result @@ -51,6 +51,9 @@ delete t1 from t1,t3 where t1.a=t3.a; drop table t1; insert into t1 values(1); ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +drop temporary table if exists t1; +Warnings: +Note 1051 Unknown table 'test.t1' connection default; set global read_only=0; lock table t1 write; diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 654b00d68..585ab3054 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -962,7 +962,7 @@ def information_schema COLUMNS COLUMNS TABLE_CATALOG TABLE_CATALOG 253 1536 3 N def information_schema COLUMNS COLUMNS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33 def information_schema COLUMNS COLUMNS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33 def information_schema COLUMNS COLUMNS COLUMN_NAME COLUMN_NAME 253 192 1 N 1 0 33 -def information_schema COLUMNS COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 589815 0 Y 16 0 33 +def information_schema COLUMNS COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 589788 0 Y 16 0 33 def information_schema COLUMNS COLUMNS IS_NULLABLE IS_NULLABLE 253 9 2 N 1 0 33 def information_schema COLUMNS COLUMNS DATA_TYPE DATA_TYPE 253 192 3 N 1 0 33 def information_schema COLUMNS COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 96 0 Y 0 0 33 @@ -987,7 +987,7 @@ def information_schema COLUMNS COLUMNS COLUMN_NAME Field 253 192 1 N 1 0 33 def information_schema COLUMNS COLUMNS COLUMN_TYPE Type 252 589815 7 N 17 0 33 def information_schema COLUMNS COLUMNS IS_NULLABLE Null 253 9 2 N 1 0 33 def information_schema COLUMNS COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33 -def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589815 0 Y 16 0 33 +def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589788 0 Y 16 0 33 def information_schema COLUMNS COLUMNS EXTRA Extra 253 81 0 N 1 0 33 Field Type Null Key Default Extra c int(11) NO PRI NULL diff --git a/mysql-test/r/show_function_with_pad_char_to_full_length.result b/mysql-test/r/show_function_with_pad_char_to_full_length.result new file mode 100644 index 000000000..785cab7b3 --- /dev/null +++ b/mysql-test/r/show_function_with_pad_char_to_full_length.result @@ -0,0 +1,24 @@ +create function f() returns int return 1; +show function status; +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +T f T T T T T T T T T +set sql_mode = 'PAD_CHAR_TO_FULL_LENGTH'; +show function status; +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +T f T T T T T T T T T +drop function f; +select @@sql_mode; +@@sql_mode +PAD_CHAR_TO_FULL_LENGTH +create function f() returns int return 1; +select ROUTINE_NAME from information_schema.ROUTINES where ROUTINE_NAME='f'; +ROUTINE_NAME +f +set sql_mode = 'PAD_CHAR_TO_FULL_LENGTH'; +select ROUTINE_NAME from information_schema.ROUTINES where ROUTINE_NAME='f'; +ROUTINE_NAME +f +drop function f; +select @@sql_mode; +@@sql_mode +PAD_CHAR_TO_FULL_LENGTH diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 9dcd59754..68efe3df8 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -1240,9 +1240,9 @@ Warning 1364 Field 'i' doesn't have a default value DROP TABLE t1; set @@sql_mode='traditional'; create table t1(a varchar(65537)); -ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead create table t1(a varbinary(65537)); -ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead set @@sql_mode='traditional'; create table t1(a int, b date not null); alter table t1 modify a bigint unsigned not null; diff --git a/mysql-test/r/subselect_exists2in.result b/mysql-test/r/subselect_exists2in.result index 5deb2dfa9..d47e446fe 100644 --- a/mysql-test/r/subselect_exists2in.result +++ b/mysql-test/r/subselect_exists2in.result @@ -934,5 +934,42 @@ f2 foo set optimizer_switch= @optimizer_switch_save; DROP TABLE t1; +# +# MDEV-14164: Unknown column error when adding aggregate to function +# in oracle style procedure FOR loop +# +CREATE TABLE t1(id INT, val INT); +CREATE PROCEDURE p1() +BEGIN +DECLARE cur1 CURSOR FOR SELECT * FROM ( +SELECT DISTINCT id FROM t1) a +WHERE NOT EXISTS (SELECT * FROM ( SELECT id FROM t1) b +WHERE a.id=b.id); +OPEN cur1; +CLOSE cur1; +OPEN cur1; +CLOSE cur1; +END; +// +CALL p1(); +DROP PROCEDURE p1; +DROP TABLE t1; +CREATE TABLE t1(id INT, val INT); +CREATE PROCEDURE p1() +BEGIN +SELECT * FROM (SELECT DISTINCT id FROM t1) a +WHERE NOT a.id IN (SELECT b.id FROM t1 b); +SELECT * FROM (SELECT DISTINCT id FROM t1) a +WHERE NOT EXISTS (SELECT * FROM t1 b WHERE a.id=b.id); +END; +// +CALL p1(); +id +id +CALL p1(); +id +id +DROP PROCEDURE p1; +DROP TABLE t1; # End of 10.0 tests set optimizer_switch=default; diff --git a/mysql-test/r/subselect_mat_cost_bugs.result b/mysql-test/r/subselect_mat_cost_bugs.result index 57b0526c6..df6b543ba 100644 --- a/mysql-test/r/subselect_mat_cost_bugs.result +++ b/mysql-test/r/subselect_mat_cost_bugs.result @@ -502,3 +502,20 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index idx idx 5 NULL 5 Using where; Using index 2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away drop table t1; +# +# MDEV-13135: subquery with ON expression subject to +# semi-join optimizations +# +CREATE TABLE t1 (a INT); +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT a AS v_a FROM t1; +INSERT INTO t1 VALUES (1),(3); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (3),(4); +SELECT * FROM t1 WHERE a NOT IN ( +SELECT b FROM t2 INNER JOIN v1 ON (b IN ( SELECT a FROM t1 )) +WHERE v_a = b +); +a +1 +DROP VIEW v1; +DROP TABLE t1,t2; diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result index 639a97be2..4136eb4df 100644 --- a/mysql-test/r/type_bit.result +++ b/mysql-test/r/type_bit.result @@ -806,3 +806,27 @@ SUM(a) NULL DROP TABLE t1; End of 5.1 tests +# +# Start of 10.1 tests +# +# +# MDEV-8867 Wrong field type or metadata for COALESCE(bit_column, 1) +# +CREATE TABLE t1 (val bit(1)); +INSERT INTO t1 VALUES (0); +CREATE TABLE t2 AS SELECT COALESCE(val, 1) AS c FROM t1; +SELECT * FROM t2; +c +0 +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `c` decimal(1,0) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; +SELECT COALESCE(val, 1) FROM t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def COALESCE(val, 1) 246 2 1 Y 32896 0 63 +COALESCE(val, 1) +0 +DROP TABLE t1; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 132de86e2..223d26ad6 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -37,7 +37,7 @@ ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT CREATE TABLE t2 (a char(256)); ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead CREATE TABLE t1 (a varchar(70000) default "hello"); -ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead CREATE TABLE t2 (a blob default "hello"); ERROR 42000: BLOB/TEXT column 'a' can't have a default value drop table if exists t1,t2; diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index d2587d719..661dcabbc 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -843,5 +843,16 @@ Warning 1292 Incorrect datetime value: '1' Warning 1292 Incorrect datetime value: '1' DROP TABLE t1; # +# MDEV-14221 Assertion `0' failed in Item::field_type_for_temporal_comparison +# +CREATE TABLE t1 (d DATE); +INSERT INTO t1 VALUES ('1985-05-13'),('1989-12-24'); +SELECT d, COUNT(*) FROM t1 GROUP BY d WITH ROLLUP HAVING CASE d WHEN '2017-05-25' THEN 0 ELSE 1 END; +d COUNT(*) +1985-05-13 1 +1989-12-24 1 +NULL 2 +DROP TABLE t1; +# # End of 10.1 tests # diff --git a/mysql-test/r/type_varchar.result b/mysql-test/r/type_varchar.result index e15b029e9..882b7f551 100644 --- a/mysql-test/r/type_varchar.result +++ b/mysql-test/r/type_varchar.result @@ -513,7 +513,76 @@ Warning 1292 Truncated incorrect DOUBLE value: 's ' Warning 1292 Truncated incorrect DOUBLE value: ' ' DROP TABLE t1; # -# Start of 10.0 tests +# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +# +CREATE TABLE t1 (c1 VARBINARY(65532)); +DESCRIBE t1; +Field Type Null Key Default Extra +c1 varbinary(65532) YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARBINARY(65533)); +Warnings: +Note 1246 Converting column 'c1' from VARBINARY to BLOB +DESCRIBE t1; +Field Type Null Key Default Extra +c1 blob YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARBINARY(65534)); +Warnings: +Note 1246 Converting column 'c1' from VARBINARY to BLOB +DESCRIBE t1; +Field Type Null Key Default Extra +c1 blob YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARBINARY(65535)); +Warnings: +Note 1246 Converting column 'c1' from VARBINARY to BLOB +DESCRIBE t1; +Field Type Null Key Default Extra +c1 blob YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARBINARY(65536)); +Warnings: +Note 1246 Converting column 'c1' from VARBINARY to BLOB +DESCRIBE t1; +Field Type Null Key Default Extra +c1 mediumblob YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(65532)); +DESCRIBE t1; +Field Type Null Key Default Extra +c1 varchar(65532) YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(65533)); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 text YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(65534)); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 text YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(65535)); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 text YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(65536)); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 mediumtext YES NULL +DROP TABLE t1; +# +# End of 5.5 tests # # # MDEV-6950 Bad results with joins comparing DATE and INT/ENUM/VARCHAR columns diff --git a/mysql-test/suite/encryption/r/encryption_force.result b/mysql-test/suite/encryption/r/encryption_force.result index de5f7da60..9d42b360e 100644 --- a/mysql-test/suite/encryption/r/encryption_force.result +++ b/mysql-test/suite/encryption/r/encryption_force.result @@ -34,11 +34,11 @@ t4 CREATE TABLE `t4` ( /*!50100 PARTITION BY HASH (a) PARTITIONS 2 */ alter table t1 encrypted=no; -ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED' alter table t2 encrypted=yes; alter table t3 encrypted=default; alter table t4 encrypted=no; -ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/encryption/r/filekeys_encfile.result b/mysql-test/suite/encryption/r/filekeys_encfile.result index add6f312f..6d5baa1b7 100644 --- a/mysql-test/suite/encryption/r/filekeys_encfile.result +++ b/mysql-test/suite/encryption/r/filekeys_encfile.result @@ -14,7 +14,7 @@ t1 CREATE TABLE `t1` ( `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encrypted`=yes `encryption_key_id`=2 alter table t1 encryption_key_id=3; -ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/encryption/r/filekeys_encfile_file.result b/mysql-test/suite/encryption/r/filekeys_encfile_file.result index add6f312f..6d5baa1b7 100644 --- a/mysql-test/suite/encryption/r/filekeys_encfile_file.result +++ b/mysql-test/suite/encryption/r/filekeys_encfile_file.result @@ -14,7 +14,7 @@ t1 CREATE TABLE `t1` ( `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encrypted`=yes `encryption_key_id`=2 alter table t1 encryption_key_id=3; -ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/encryption/r/innodb-encryption-alter.result b/mysql-test/suite/encryption/r/innodb-encryption-alter.result index 5869c5d70..9ff0f4920 100644 --- a/mysql-test/suite/encryption/r/innodb-encryption-alter.result +++ b/mysql-test/suite/encryption/r/innodb-encryption-alter.result @@ -43,11 +43,10 @@ CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNOD Warnings: Warning 140 InnoDB: Ignored ENCRYPTION_KEY_ID 1 when encryption is disabled ALTER TABLE t1 ENCRYPTION_KEY_ID=99; -ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID' SHOW WARNINGS; Level Code Message Warning 140 InnoDB: ENCRYPTION_KEY_ID 99 not available -Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") -Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +Error 1478 Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID' set innodb_default_encryption_key_id = 1; drop table t1,t2; diff --git a/mysql-test/suite/encryption/t/encryption_force.test b/mysql-test/suite/encryption/t/encryption_force.test index 3e09dd918..3c6f03918 100644 --- a/mysql-test/suite/encryption/t/encryption_force.test +++ b/mysql-test/suite/encryption/t/encryption_force.test @@ -22,13 +22,11 @@ show create table t2; show create table t3; show create table t4; ---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ ---error ER_CANT_CREATE_TABLE +--error ER_ILLEGAL_HA_CREATE_OPTION alter table t1 encrypted=no; alter table t2 encrypted=yes; alter table t3 encrypted=default; ---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ ---error ER_CANT_CREATE_TABLE +--error ER_ILLEGAL_HA_CREATE_OPTION alter table t4 encrypted=no; show create table t1; diff --git a/mysql-test/suite/encryption/t/filekeys_goodtest.inc b/mysql-test/suite/encryption/t/filekeys_goodtest.inc index 146a57041..5317eeb3d 100644 --- a/mysql-test/suite/encryption/t/filekeys_goodtest.inc +++ b/mysql-test/suite/encryption/t/filekeys_goodtest.inc @@ -7,8 +7,7 @@ insert t1 values (12345, repeat('1234567890', 20)); alter table t1 encryption_key_id=2; show create table t1; ---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ ---error ER_CANT_CREATE_TABLE +--error ER_ILLEGAL_HA_CREATE_OPTION alter table t1 encryption_key_id=3; show create table t1; alter table t1 encryption_key_id=33; @@ -17,4 +16,3 @@ alter table t1 encryption_key_id=4; show create table t1; drop table t1; - diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test index 316ece1c1..9420fb74a 100644 --- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test +++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test @@ -33,10 +33,8 @@ DROP TABLE t1; CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB; SHOW CREATE TABLE t1; CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO ENCRYPTION_KEY_ID=1; ---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ ---error 1005 +--error ER_ILLEGAL_HA_CREATE_OPTION ALTER TABLE t1 ENCRYPTION_KEY_ID=99; ---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ SHOW WARNINGS; set innodb_default_encryption_key_id = 1; diff --git a/mysql-test/suite/galera/r/MW-388.result b/mysql-test/suite/galera/r/MW-388.result new file mode 100644 index 000000000..17d347a11 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-388.result @@ -0,0 +1,46 @@ +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB; +CREATE PROCEDURE insert_proc () +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +GET DIAGNOSTICS CONDITION 1 @errno = MYSQL_ERRNO; +END; +INSERT INTO t1 VALUES (1, 'node 1'),(2, 'node 1'); +INSERT INTO t1 VALUES (3, 'node 1'); +END| +SET GLOBAL wsrep_slave_threads = 2; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +INSERT INTO t1 VALUES (1, 'node 2');; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; +SET SESSION wsrep_sync_wait = 0; +SET SESSION DEBUG_SYNC = 'wsrep_after_replication SIGNAL wsrep_after_replication_reached WAIT_FOR wsrep_after_replication_continue'; +CALL insert_proc ();; +SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_replication_reached"; +SET GLOBAL DEBUG = ""; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET DEBUG_SYNC = "now SIGNAL wsrep_after_replication_continue"; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +SELECT @errno = 1213; +@errno = 1213 +1 +SELECT * FROM t1; +f1 f2 +1 node 2 +3 node 1 +SELECT * FROM t1; +f1 f2 +1 node 2 +3 node 1 +SET GLOBAL wsrep_slave_threads = DEFAULT; +DROP TABLE t1; +DROP PROCEDURE insert_proc; +SET GLOBAL debug = NULL; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET debug_sync='RESET'; +SELECT @@debug_sync; +@@debug_sync +ON - current signal: '' diff --git a/mysql-test/suite/galera/r/MW-402.result b/mysql-test/suite/galera/r/MW-402.result new file mode 100644 index 000000000..fdcf6e324 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-402.result @@ -0,0 +1,192 @@ +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON DELETE CASCADE); +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE c SET f2=1 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM p WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +SELECT * FROM c; +f1 p_id f2 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE c SET f2=2 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE p set f1=11 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +11 0 +SELECT * FROM c; +f1 p_id f2 +1 11 0 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE c SET p_id=2 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE p set f1=11 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +11 0 +SELECT * FROM c; +f1 p_id f2 +1 11 0 +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p set f1=21 WHERE f1 = 11; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE c SET p_id=2 where f1=1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +11 0 +SELECT * FROM c; +f1 p_id f2 +1 2 0 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) +ON DELETE CASCADE, +CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); +INSERT INTO c VALUES (1, 1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p2 SET f2=2 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM p1 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +SELECT * FROM p1; +f1 f2 +SELECT * FROM p2; +f1 f2 +1 2 +SELECT * FROM c; +f1 p1_id p2_id f2 +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) +ON DELETE CASCADE, +CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1) +ON DELETE CASCADE); +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); +INSERT INTO c VALUES (1, 1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +DELETE FROM p2 WHERE f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM p1 WHERE f1=1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p1; +f1 f2 +SELECT * FROM p2; +f1 f2 +1 0 +SELECT * FROM c; +f1 p1_id p2_id f2 +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; diff --git a/mysql-test/suite/galera/t/MW-388.test b/mysql-test/suite/galera/t/MW-388.test new file mode 100644 index 000000000..209695dca --- /dev/null +++ b/mysql-test/suite/galera/t/MW-388.test @@ -0,0 +1,76 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB; + +DELIMITER |; +CREATE PROCEDURE insert_proc () +BEGIN + DECLARE CONTINUE HANDLER FOR SQLEXCEPTION + BEGIN + GET DIAGNOSTICS CONDITION 1 @errno = MYSQL_ERRNO; + END; + INSERT INTO t1 VALUES (1, 'node 1'),(2, 'node 1'); + INSERT INTO t1 VALUES (3, 'node 1'); +END| +DELIMITER ;| + +# We need two slave threads here to guarantee progress. +# If we use only one thread the following could happen +# in node_1: +# We block the only slave thread in wsrep_apply_cb and we +# issue an INSERT (by calling the stored procedure) that will +# try to acquire galera's local monitor in pre_commit(). +# This usually works fine, except for when a commit cut event +# sneaks in the slave queue and gets a local seqno smaller than +# that of the INSERT. Because there is only one slave thread, +# commit cut is not processed and therefore does not advance +# local monitor, and our INSERT remains stuck there. +SET GLOBAL wsrep_slave_threads = 2; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; + +--connection node_2 +--send INSERT INTO t1 VALUES (1, 'node 2'); + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; + +--connection node_1 +SET SESSION wsrep_sync_wait = 0; +SET SESSION DEBUG_SYNC = 'wsrep_after_replication SIGNAL wsrep_after_replication_reached WAIT_FOR wsrep_after_replication_continue'; +--send CALL insert_proc (); + +--connection node_1a +SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_replication_reached"; + + +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL wsrep_after_replication_continue"; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +--connection node_2 +--reap + +--connection node_1 +# We expect no errors here, because the handler in insert_proc() caught the deadlock error +--reap +SELECT @errno = 1213; +SELECT * FROM t1; + +--connection node_2 +SELECT * FROM t1; + +--connection node_1 +SET GLOBAL wsrep_slave_threads = DEFAULT; +DROP TABLE t1; +DROP PROCEDURE insert_proc; + +SET GLOBAL debug = NULL; +SET debug_sync='RESET'; + +# Make sure no pending signals are leftover to surprise subsequent tests. +SELECT @@debug_sync; diff --git a/mysql-test/suite/galera/t/MW-402.test b/mysql-test/suite/galera/t/MW-402.test new file mode 100644 index 000000000..80f368b50 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-402.test @@ -0,0 +1,228 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +# +# we must open connection node_1a here, MW-369.inc will use it later +# +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 + +# +# cascading delete operation is replicated from node2 +# and this conflicts with an update for child table in node1 +# +# As a result, the update should fail for certification error +# +--connection node_1 + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON DELETE CASCADE); + + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = UPDATE c SET f2=1 where f1=1 +--let $mw_369_child_query = DELETE FROM p WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# cascading update operation is replicated from node2 +# and this conflicts with an update for child table in node1 +# +# As a result, the update should fail for certification error +# +--connection node_1 + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); + + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = UPDATE c SET f2=2 where f1=1 +--let $mw_369_child_query = UPDATE p set f1=11 WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# ON UPDATE CASCADE tests +# Here we update primary key of parent table to cause cascaded update +# on child table +# +# cascading update operation is replicated from node2 +# and this conflicts with an update for child table in node1 +# +# As a result, the update should fail for certification error +# +--connection node_1 + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); + + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = UPDATE c SET p_id=2 where f1=1 +--let $mw_369_child_query = UPDATE p set f1=11 WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +# same as previous, but statements in different order +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +--let $mw_369_parent_query = UPDATE p set f1=21 WHERE f1 = 11 +--let $mw_369_child_query = UPDATE c SET p_id=2 where f1=1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# CASCADE DELETE tests with two parent tables +# Here we cause cascaded operation on child table through +# one parent table and have other operation on the other +# parent table +# +# cascading update operation is replicated from node2 +# but this does not conflict with an update for the other parent table in node1 +# +# As a result, the update on p2 should succeed +# +--connection node_1 + +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) + ON DELETE CASCADE, + CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); + +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); + +INSERT INTO c VALUES (1, 1, 1, 0); + +--let $mw_369_parent_query = UPDATE p2 SET f2=2 where f1=1 +--let $mw_369_child_query = DELETE FROM p1 WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--reap + +--connection node_2 +SELECT * FROM p1; +SELECT * FROM p2; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; + +# +# CASCADE DELETE tests with two parent tables +# Here we cause cascaded operation on child table through +# one parent table and issue other delete operation through the +# other parent table. The cascade progresses to same child table row where +# we should see the conflict to happen +# +# As a result, the update on p2 should fail +# +--connection node_1 + +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) + ON DELETE CASCADE, + CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1) + ON DELETE CASCADE); + +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); + +INSERT INTO c VALUES (1, 1, 1, 0); + +--let $mw_369_parent_query = DELETE FROM p2 WHERE f1=1 +--let $mw_369_child_query = DELETE FROM p1 WHERE f1=1 + +--connection node_1a +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p1; +SELECT * FROM p2; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; \ No newline at end of file diff --git a/mysql-test/suite/galera/t/galera_ftwrl.test b/mysql-test/suite/galera/t/galera_ftwrl.test index de8310e52..739255609 100644 --- a/mysql-test/suite/galera/t/galera_ftwrl.test +++ b/mysql-test/suite/galera/t/galera_ftwrl.test @@ -29,12 +29,11 @@ SELECT * FROM t1; UNLOCK TABLES; -SHOW TABLES; -SELECT COUNT(*) = 1 FROM t1; - --disable_query_log --eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig"; --enable_query_log -DROP TABLE t1; +SHOW TABLES; +SELECT COUNT(*) = 1 FROM t1; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_suspend_slave.test b/mysql-test/suite/galera/t/galera_suspend_slave.test index dcc4a8d14..aa4543cf8 100644 --- a/mysql-test/suite/galera/t/galera_suspend_slave.test +++ b/mysql-test/suite/galera/t/galera_suspend_slave.test @@ -25,7 +25,7 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; my $pid_filename = $ENV{'NODE_2_PIDFILE'}; my $mysqld_pid = `cat $pid_filename`; chomp($mysqld_pid); - system("kill -19 $mysqld_pid"); + system("kill -SIGSTOP $mysqld_pid"); exit(0); EOF @@ -37,7 +37,7 @@ INSERT INTO t1 VALUES (1); my $pid_filename = $ENV{'NODE_2_PIDFILE'}; my $mysqld_pid = `cat $pid_filename`; chomp($mysqld_pid); - system("kill -18 $mysqld_pid"); + system("kill -SIGCONT $mysqld_pid"); exit(0); EOF diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf index fe3bcb1e8..91aa53ad7 100644 --- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf +++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf @@ -14,6 +14,9 @@ wsrep-causal-reads=ON wsrep-sync-wait=15 [mysqld.1] +#galera_port=@OPT.port +#ist_port=@OPT.port +#sst_port=@OPT.port wsrep-cluster-address='gcomm://' wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S' diff --git a/mysql-test/suite/innodb/r/innodb-16k.result b/mysql-test/suite/innodb/r/innodb-16k.result index 9e6e5145f..77ff688f1 100644 --- a/mysql-test/suite/innodb/r/innodb-16k.result +++ b/mysql-test/suite/innodb/r/innodb-16k.result @@ -331,9 +331,10 @@ CREATE INDEX t1e ON t1 (e(767)); UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c; CREATE INDEX t1f ON t1 (f(767)); +BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d; -ERROR HY000: Undo log record is too big. +ROLLBACK; BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d, @@ -366,8 +367,9 @@ UPDATE t1 SET r=@e; CREATE INDEX t1s ON t1 (s(767)); UPDATE t1 SET s=@e; CREATE INDEX t1t ON t1 (t(767)); +BEGIN; UPDATE t1 SET t=@e; -ERROR HY000: Undo log record is too big. +ROLLBACK; CREATE INDEX t1u ON t1 (u(767)); ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs CREATE INDEX t1ut ON t1 (u(767), t(767)); @@ -546,11 +548,11 @@ PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767)) ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; INSERT INTO bug12547647 VALUES (5,REPEAT('khdfo5AlOq',1900),REPEAT('g',7751)); COMMIT; +BEGIN; UPDATE bug12547647 SET c = REPEAT('b',16928); -ERROR HY000: Undo log record is too big. SHOW WARNINGS; Level Code Message -Error 1713 Undo log record is too big. +ROLLBACK; DROP TABLE bug12547647; SET SESSION innodb_strict_mode = off; CREATE TABLE t1( diff --git a/mysql-test/suite/innodb/r/innodb-32k.result b/mysql-test/suite/innodb/r/innodb-32k.result index 2253ba558..f9635fefc 100644 --- a/mysql-test/suite/innodb/r/innodb-32k.result +++ b/mysql-test/suite/innodb/r/innodb-32k.result @@ -228,13 +228,14 @@ aa=@c,ba=@c,ca=@c,da=@c,ea=@c,fa=@c,ga=@c,ha=@c,ia=@c,ja=@c, ka=@c,la=@c,ma=@c,na=@c,oa=@c,pa=@c,qa=@c,ra=@c,sa=@c,ta=@c,ua=@c, va=@c,wa=@c,xa=@c,ya=@c,za=@c; CREATE INDEX t1f17 ON t1 (v(767)); +BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d, v=@d,w=@d,x=@d,y=@d,z=@d, aa=@d,ba=@d,ca=@d,da=@d,ea=@d,fa=@d,ga=@d,ha=@d,ia=@d,ja=@d, ka=@d,la=@d,ma=@d,na=@d,oa=@d,pa=@d,qa=@d,ra=@d,sa=@d,ta=@d,ua=@d, va=@d,wa=@d,xa=@d,ya=@d,za=@d; -ERROR HY000: Undo log record is too big. +ROLLBACK; BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d; diff --git a/mysql-test/suite/innodb/r/innodb-64k.result b/mysql-test/suite/innodb/r/innodb-64k.result index 0ce744e9e..dc938f236 100644 --- a/mysql-test/suite/innodb/r/innodb-64k.result +++ b/mysql-test/suite/innodb/r/innodb-64k.result @@ -263,6 +263,7 @@ kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c, vc=@c,wc=@c,xc=@c,yc=@c,zc=@c; COMMIT; CREATE INDEX tg1f2 ON t1 (ia(767),ja(767)); +BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d, v=@d,w=@d,x=@d,y=@d,z=@d, @@ -275,7 +276,7 @@ vb=@d,wb=@d,xb=@d,yb=@d,zb=@d, ac=@d,bc=@d,cc=@d,dc=@d,ec=@d,fc=@d,gc=@d,hc=@d,ic=@d,jc=@d, kc=@d,lc=@d,mc=@d,nc=@d,oc=@d,pc=@d,qc=@d,rc=@d,sc=@d,tc=@d,uc=@d, vc=@d,wc=@d,xc=@d,yc=@d,zc=@d; -ERROR HY000: Undo log record is too big. +ROLLBACK; BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d; diff --git a/mysql-test/suite/innodb/r/innodb-alter-table.result b/mysql-test/suite/innodb/r/innodb-alter-table.result index c4460a722..34a05d398 100644 --- a/mysql-test/suite/innodb/r/innodb-alter-table.result +++ b/mysql-test/suite/innodb/r/innodb-alter-table.result @@ -185,3 +185,44 @@ ticket CREATE TABLE `ticket` ( KEY `org_id` (`org_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE ticket; +CREATE TABLE t ( +id bigint(20) unsigned NOT NULL auto_increment, +d date NOT NULL, +a bigint(20) unsigned NOT NULL, +b smallint(5) unsigned DEFAULT NULL, +PRIMARY KEY (id,d) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs STATS_SAMPLE_PAGES=2 +PARTITION BY RANGE COLUMNS(d) +( +PARTITION p20170914 VALUES LESS THAN ('2017-09-15') ENGINE = InnoDB, +PARTITION p99991231 VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB); +insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10); +insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10); +replace into t(d,a,b) select '2017-09-15',rand()*10000,rand()*10 from t t1, t t2, t t3, t t4; +select count(*) from t where d ='2017-09-15'; +count(*) +18 +ALTER TABLE t CHANGE b c smallint(5) unsigned , ADD KEY idx_d_a (d, a); +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `d` date NOT NULL, + `a` bigint(20) unsigned NOT NULL, + `c` smallint(5) unsigned DEFAULT NULL, + PRIMARY KEY (`id`,`d`), + KEY `idx_d_a` (`d`,`a`) +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs STATS_SAMPLE_PAGES=2 +/*!50500 PARTITION BY RANGE COLUMNS(d) +(PARTITION p20170914 VALUES LESS THAN ('2017-09-15') ENGINE = InnoDB, + PARTITION p99991231 VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB) */ +analyze table t; +Table Op Msg_type Msg_text +test.t analyze status OK +select count(*) from t where d ='2017-09-15'; +count(*) +18 +select count(*) from t force index(primary) where d ='2017-09-15'; +count(*) +18 +DROP TABLE t; diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result index 80a187c3e..fadbcce33 100644 --- a/mysql-test/suite/innodb/r/innodb-alter.result +++ b/mysql-test/suite/innodb/r/innodb-alter.result @@ -540,9 +540,6 @@ ERROR 42000: Key column 'c2' doesn't exist in table ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY; ERROR 42000: Key column 'c2' doesn't exist in table ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY. -ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE; SHOW CREATE TABLE t1n; Table Create Table t1n CREATE TABLE `t1n` ( @@ -559,9 +556,6 @@ ALTER TABLE t1n DROP INDEX c4; ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE; ERROR 42S21: Duplicate column name 'c1' ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY. -ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE; SHOW CREATE TABLE t1n; Table Create Table t1n CREATE TABLE `t1n` ( @@ -640,10 +634,11 @@ CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL; ALTER TABLE t1o DROP INDEX ct, DROP INDEX FTS_DOC_ID_INDEX, CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL; ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id); -call mtr.add_suppression("Error: no matching column for .FTS_DOC_ID. in index .ct.--temporary-- of table .test...t1o"); ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ADD FULLTEXT INDEX(ct); -ERROR HY000: Incorrect key file for table 't1o'; try to repair it +ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, +ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot drop or rename FTS_DOC_ID. Try ALGORITHM=COPY. DROP TABLE sys_indexes; CREATE TABLE sys_indexes SELECT i.* FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES i INNER JOIN sys_tables st ON i.TABLE_ID=st.TABLE_ID; @@ -651,9 +646,16 @@ SELECT i.NAME,i.POS,i.MTYPE,i.PRTYPE,i.LEN FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS i INNER JOIN sys_tables st ON i.TABLE_ID=st.TABLE_ID; NAME POS MTYPE PRTYPE LEN +FTS_DOC_ID 0 6 1800 8 +c2 1 6 1027 4 +ct 2 5 524540 10 +cu 3 5 524540 10 SELECT si.NAME,i.POS,i.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS i INNER JOIN sys_indexes si ON i.INDEX_ID=si.INDEX_ID; NAME POS NAME +PRIMARY 0 FTS_DOC_ID +FTS_DOC_ID_INDEX 0 FTS_DOC_ID +ct 0 ct SELECT i.* FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS i INNER JOIN sys_foreign sf ON i.ID = sf.ID; ID FOR_COL_NAME REF_COL_NAME POS diff --git a/mysql-test/suite/innodb/r/innodb-get-fk.result b/mysql-test/suite/innodb/r/innodb-get-fk.result index ee17f2628..aa1bff8f1 100644 --- a/mysql-test/suite/innodb/r/innodb-get-fk.result +++ b/mysql-test/suite/innodb/r/innodb-get-fk.result @@ -40,6 +40,9 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` ( CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a comment about tables' +SET GLOBAL innodb_buffer_pool_load_now = ON; +SET GLOBAL innodb_buffer_pool_dump_now = ON; +SET GLOBAL innodb_buffer_pool_load_abort = ON; ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables"; SHOW CREATE TABLE `repro`.`crew_role_assigned`; Table Create Table diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result index 98de5db3c..072f1d1e4 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result @@ -38,12 +38,11 @@ innodb_redundant CREATE TABLE `innodb_redundant` ( `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT alter table innodb_redundant page_compressed=1; -ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'PAGE_COMPRESSED' show warnings; Level Code Message Warning 140 InnoDB: PAGE_COMPRESSED table can't have ROW_TYPE=REDUNDANT -Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") -Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +Error 1478 Table storage engine 'InnoDB' does not support the create option 'PAGE_COMPRESSED' show create table innodb_redundant; Table Create Table innodb_redundant CREATE TABLE `innodb_redundant` ( diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result index cc4df79c1..9b1097b3a 100644 --- a/mysql-test/suite/innodb/r/innodb-table-online.result +++ b/mysql-test/suite/innodb/r/innodb-table-online.result @@ -3,6 +3,8 @@ call mtr.add_suppression("InnoDB: Error: table 'test/t1'"); call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd file for"); SET @global_innodb_file_per_table_orig = @@global.innodb_file_per_table; SET GLOBAL innodb_file_per_table = on; +SET @file_format = @@GLOBAL.innodb_file_format; +SET GLOBAL innodb_file_format = Barracuda; CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(255) NOT NULL) ENGINE = InnoDB; INSERT INTO t1 VALUES (1,1,''), (2,2,''), (3,3,''), (4,4,''), (5,5,''); @@ -203,7 +205,8 @@ t1 CREATE TABLE `t1` ( ALTER TABLE t1 ROW_FORMAT=REDUNDANT; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done'; SET lock_wait_timeout = 10; -ALTER TABLE t1 ROW_FORMAT=COMPACT, ALGORITHM = INPLACE; +ALTER TABLE t1 ROW_FORMAT=COMPACT +PAGE_COMPRESSED = YES PAGE_COMPRESSION_LEVEL = 1, ALGORITHM = INPLACE; # session default INSERT INTO t1 SELECT 80 + c1, c2, c3 FROM t1; INSERT INTO t1 SELECT 160 + c1, c2, c3 FROM t1; @@ -438,5 +441,6 @@ SET DEBUG_SYNC = 'RESET'; SET GLOBAL innodb_monitor_disable = module_ddl; DROP TABLE t1; SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig; +SET GLOBAL innodb_file_format = @file_format; SET GLOBAL innodb_monitor_enable = default; SET GLOBAL innodb_monitor_disable = default; diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result index 92ae1d52b..66b7d246e 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result @@ -1,26 +1,15 @@ -call mtr.add_suppression("InnoDB: Page for tablespace .* "); -call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS="); -call mtr.add_suppression("InnoDB: Corruption: Block in space_id .* in file .* corrupted"); -call mtr.add_suppression("InnoDB: Based on page type .*"); -FLUSH TABLES; SET GLOBAL innodb_file_per_table = 1; -DROP DATABASE IF EXISTS test_wl5522; -Warnings: -Note 1008 Can't drop database 'test_wl5522'; database doesn't exist CREATE DATABASE test_wl5522; -SET SESSION debug_dbug="+d,ib_discard_before_commit_crash"; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); +SET SESSION debug_dbug="+d,ib_discard_before_commit_crash"; ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; ERROR HY000: Lost connection to MySQL server during query DROP TABLE test_wl5522.t1; SET GLOBAL innodb_file_per_table = 1; -SELECT @@innodb_file_per_table; -@@innodb_file_per_table -1 -SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); +SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; ERROR HY000: Lost connection to MySQL server during query DROP TABLE test_wl5522.t1; @@ -37,19 +26,18 @@ ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; SELECT COUNT(*) FROM test_wl5522.t1; ERROR HY000: Tablespace has been discarded for table 't1' restore: t1 .ibd and .cfg files -SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; SELECT * FROM test_wl5522.t1; ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; ERROR HY000: Lost connection to MySQL server during query -SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; SELECT COUNT(*) FROM test_wl5522.t1; ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; ERROR HY000: Lost connection to MySQL server during query unlink: t1.ibd unlink: t1.cfg -# Restart and reconnect to the server DROP TABLE test_wl5522.t1; SET GLOBAL innodb_file_per_table = 1; SELECT @@innodb_file_per_table; @@ -495,7 +483,7 @@ c4 VARCHAR(2048), INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB; -SET GLOBAL INNODB_PURGE_STOP_NOW=ON; +START TRANSACTION WITH CONSISTENT SNAPSHOT; SET GLOBAL innodb_disable_background_merge=ON; SET GLOBAL innodb_monitor_reset = ibuf_merges; SET GLOBAL innodb_monitor_reset = ibuf_merges_insert; @@ -660,7 +648,7 @@ FROM information_schema.innodb_metrics WHERE name = 'ibuf_merges_inserts' AND count > 0; name SET GLOBAL innodb_disable_background_merge=OFF; -SET GLOBAL INNODB_PURGE_RUN_NOW=ON; +COMMIT; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 ( c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -796,8 +784,8 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=latin1 DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; -INSERT INTO test_wl5522.t1 VALUES -(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); +INSERT IGNORE INTO test_wl5522.t1 VALUES +(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 2731)); Warnings: Warning 1265 Data truncated for column 'c2' at row 1 INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; @@ -832,7 +820,7 @@ ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; SELECT COUNT(*) FROM test_wl5522.t1; ERROR HY000: Tablespace has been discarded for table 't1' restore: t1 .ibd and .cfg files -SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; +SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Data structure corruption SET SESSION debug_dbug=@saved_debug_dbug; diff --git a/mysql-test/suite/innodb/r/innodb-wl5980-alter.result b/mysql-test/suite/innodb/r/innodb-wl5980-alter.result index 2a1b61b44..6cf3ad4fc 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5980-alter.result +++ b/mysql-test/suite/innodb/r/innodb-wl5980-alter.result @@ -1010,9 +1010,6 @@ ERROR 42000: Key column 'c2' doesn't exist in table ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY; ERROR 42000: Key column 'c2' doesn't exist in table ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY. -ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE; ### files in MYSQL_DATA_DIR/test FTS_AUX_INDEX_1.ibd FTS_AUX_INDEX_2.ibd @@ -1113,9 +1110,6 @@ tt.ibd ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE; ERROR 42S21: Duplicate column name 'c1' ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY. -ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE; ### files in MYSQL_DATA_DIR/test FTS_AUX_INDEX_1.ibd FTS_AUX_INDEX_2.ibd @@ -1201,13 +1195,9 @@ tt.isl t1c.ibd t1p.ibd tt.ibd -call mtr.add_suppression("Error: no matching column for .FTS_DOC_ID. in index .ct.--temporary-- of table .test...t1o"); ALTER TABLE t1o ADD FULLTEXT INDEX(ct), CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ALGORITHM=INPLACE; -ERROR HY000: Incorrect key file for table 't1o'; try to repair it -ALTER TABLE t1o CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE; -ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE; ### files in MYSQL_DATA_DIR/test FTS_AUX_INDEX_1.ibd FTS_AUX_INDEX_2.ibd @@ -1249,6 +1239,9 @@ tt.isl t1c.ibd t1p.ibd tt.ibd +ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, +LOCK=NONE; +ERROR 0A000: LOCK=NONE is not supported. Reason: Cannot drop or rename FTS_DOC_ID. Try LOCK=SHARED. SELECT sc.pos FROM information_schema.innodb_sys_columns sc INNER JOIN information_schema.innodb_sys_tables st ON sc.TABLE_ID=st.TABLE_ID @@ -1352,9 +1345,6 @@ tt.isl tt.ibd ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ADD FULLTEXT INDEX(ct); -ERROR HY000: Incorrect key file for table 't1o'; try to repair it -ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE; -ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE; ### files in MYSQL_DATA_DIR/test FTS_AUX_INDEX_1.ibd FTS_AUX_INDEX_2.ibd diff --git a/mysql-test/suite/innodb/r/table_definition_cache_debug.result b/mysql-test/suite/innodb/r/table_definition_cache_debug.result new file mode 100644 index 000000000..a72d4baad --- /dev/null +++ b/mysql-test/suite/innodb/r/table_definition_cache_debug.result @@ -0,0 +1,16 @@ +SET @save_tdc= @@GLOBAL.table_definition_cache; +SET @save_toc= @@GLOBAL.table_open_cache; +SET GLOBAL table_definition_cache= 400; +SET GLOBAL table_open_cache= 1024; +CREATE TABLE to_be_evicted(a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB; +INSERT INTO to_be_evicted VALUES(1,2),(2,1); +SET DEBUG_SYNC = 'row_log_apply_before SIGNAL scanned WAIT_FOR got_duplicate'; +ALTER TABLE to_be_evicted ADD UNIQUE INDEX(b); +SET DEBUG_SYNC = 'now WAIT_FOR scanned'; +BEGIN; +INSERT INTO to_be_evicted VALUES(3, 2); +SET DEBUG_SYNC = 'now SIGNAL got_duplicate'; +ERROR 23000: Duplicate entry '2' for key 'b' +COMMIT; +SET DEBUG_SYNC = RESET; +FLUSH TABLES; diff --git a/mysql-test/suite/innodb/r/undo_log.result b/mysql-test/suite/innodb/r/undo_log.result new file mode 100644 index 000000000..a40c6b5b3 --- /dev/null +++ b/mysql-test/suite/innodb/r/undo_log.result @@ -0,0 +1,142 @@ +CREATE TABLE test_tab ( +a_str_18 mediumtext, +b_str_3 varchar(32) DEFAULT NULL, +a_str_13 mediumtext, +b_str_5 varchar(40) DEFAULT NULL, +b_str_6 varchar(50) DEFAULT NULL, +b_str_7 char(32) DEFAULT NULL, +b_str_8 varchar(32) DEFAULT NULL, +b_str_9 varchar(255) DEFAULT NULL, +a_str_28 char(255) DEFAULT NULL, +a_str_27 varchar(255) DEFAULT NULL, +b_str_10 varchar(32) DEFAULT NULL, +a_str_26 varchar(255) DEFAULT NULL, +a_str_6 varchar(50) DEFAULT NULL, +b_str_11 varchar(32) DEFAULT NULL, +b_str_12 varchar(255) DEFAULT NULL, +b_str_13 char(32) DEFAULT NULL, +b_str_14 varchar(32) DEFAULT NULL, +b_str_15 char(32) DEFAULT NULL, +b_str_16 char(32) DEFAULT NULL, +b_str_17 varchar(32) DEFAULT NULL, +b_str_18 varchar(32) DEFAULT NULL, +a_str_25 varchar(40) DEFAULT NULL, +b_str_19 varchar(255) DEFAULT NULL, +a_str_23 varchar(40) DEFAULT NULL, +b_str_20 varchar(32) DEFAULT NULL, +a_str_21 varchar(255) DEFAULT NULL, +a_str_20 varchar(255) DEFAULT NULL, +a_str_39 varchar(255) DEFAULT NULL, +a_str_38 varchar(255) DEFAULT NULL, +a_str_37 varchar(255) DEFAULT NULL, +b_str_21 char(32) DEFAULT NULL, +b_str_23 varchar(80) DEFAULT NULL, +b_str_24 varchar(32) DEFAULT NULL, +b_str_25 varchar(32) DEFAULT NULL, +b_str_26 char(32) NOT NULL DEFAULT '', +b_str_27 varchar(255) DEFAULT NULL, +a_str_36 varchar(255) DEFAULT NULL, +a_str_33 varchar(100) DEFAULT NULL, +a_ref_10 char(32) DEFAULT NULL, +b_str_28 char(32) DEFAULT NULL, +b_str_29 char(32) DEFAULT NULL, +a_ref_6 char(32) DEFAULT NULL, +a_ref_12 varchar(32) DEFAULT NULL, +a_ref_11 varchar(32) DEFAULT NULL, +a_str_49 varchar(40) DEFAULT NULL, +b_str_30 varchar(32) DEFAULT NULL, +a_ref_3 varchar(32) DEFAULT NULL, +a_str_48 varchar(40) DEFAULT NULL, +a_ref_1 char(32) DEFAULT NULL, +b_str_31 varchar(32) DEFAULT NULL, +b_str_32 varchar(255) DEFAULT NULL, +b_str_33 char(32) DEFAULT NULL, +b_str_34 varchar(32) DEFAULT NULL, +a_str_47 varchar(40) DEFAULT NULL, +b_str_36 varchar(255) DEFAULT NULL, +a_str_46 varchar(40) DEFAULT NULL, +a_str_45 varchar(255) DEFAULT NULL, +b_str_38 varchar(32) DEFAULT NULL, +b_str_39 char(32) DEFAULT NULL, +b_str_40 varchar(32) DEFAULT NULL, +a_str_41 varchar(255) DEFAULT NULL, +b_str_41 varchar(32) DEFAULT NULL, +PRIMARY KEY (b_str_26), +UNIQUE KEY a_str_47 (a_str_47), +UNIQUE KEY a_str_49 (a_str_49), +UNIQUE KEY a_str_33 (a_str_33), +UNIQUE KEY a_str_46 (a_str_46), +UNIQUE KEY a_str_48 (a_str_48), +KEY b_str_18 (b_str_18), +KEY a_str_26 (a_str_26), +KEY b_str_27 (b_str_27,b_str_19), +KEY b_str_41 (b_str_41), +KEY b_str_15 (b_str_15), +KEY a_str_20 (a_str_20), +KEY b_str_17 (b_str_17), +KEY b_str_40 (b_str_40), +KEY b_str_24 (b_str_24), +KEY b_str_10 (b_str_10), +KEY b_str_16 (b_str_16), +KEY b_str_29 (b_str_29), +KEY a_str_41 (a_str_41), +KEY b_str_7 (b_str_7), +KEY a_str_45 (a_str_45), +KEY a_str_28 (a_str_28), +KEY a_str_37 (a_str_37), +KEY b_str_6 (b_str_6), +KEY a_ref_6 (a_ref_6), +KEY b_str_34 (b_str_34), +KEY b_str_38 (b_str_38), +KEY a_ref_10 (a_ref_10), +KEY b_str_21 (b_str_21), +KEY b_str_23 (b_str_23,b_str_19), +KEY b_str_33 (b_str_33), +KEY a_ref_12 (a_ref_12), +KEY a_str_18 (a_str_18(255)), +KEY a_str_39 (a_str_39), +KEY a_str_27 (a_str_27), +KEY a_str_25 (a_str_25), +KEY b_str_9 (b_str_9), +KEY a_str_23 (a_str_23), +KEY b_str_8 (b_str_8), +KEY a_str_21 (a_str_21), +KEY b_str_3 (b_str_3), +KEY b_str_30 (b_str_30), +KEY b_str_12 (b_str_12), +KEY b_str_25 (b_str_25), +KEY b_str_13 (b_str_13), +KEY a_str_38 (a_str_38), +KEY a_str_13 (a_str_13(255)), +KEY a_str_36 (a_str_36), +KEY b_str_28 (b_str_28), +KEY b_str_19 (b_str_19), +KEY b_str_11 (b_str_11), +KEY a_ref_1 (a_ref_1), +KEY b_str_20 (b_str_20), +KEY b_str_14 (b_str_14), +KEY a_ref_3 (a_ref_3), +KEY b_str_39 (b_str_39), +KEY b_str_32 (b_str_32), +KEY a_str_6 (a_str_6), +KEY b_str_5 (b_str_5), +KEY b_str_31 (b_str_31), +KEY a_ref_11 (a_ref_11) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; +BEGIN; +INSERT INTO test_tab (b_str_26, a_str_13, a_str_18) VALUES +('a', REPEAT('f',4031), REPEAT('g', 4031)); +UPDATE test_tab SET a_str_13=REPEAT('h',4032), a_str_18=REPEAT('i',4032); +SELECT 'Reducing length to 4030'; +Reducing length to 4030 +Reducing length to 4030 +UPDATE test_tab SET a_str_13=REPEAT('j',4030), a_str_18=REPEAT('k',4030); +UPDATE test_tab SET a_str_13=REPEAT('l',4031), a_str_18=REPEAT('m',4031); +ROLLBACK; +SELECT COUNT(*) FROM test_tab; +COUNT(*) +0 +CHECK TABLE test_tab; +Table Op Msg_type Msg_text +test.test_tab check status OK +DROP TABLE test_tab; diff --git a/mysql-test/suite/innodb/t/innodb-16k.test b/mysql-test/suite/innodb/t/innodb-16k.test index 3cd90a00d..d7922429f 100644 --- a/mysql-test/suite/innodb/t/innodb-16k.test +++ b/mysql-test/suite/innodb/t/innodb-16k.test @@ -328,10 +328,10 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, # because the UNDO records will be smaller. CREATE INDEX t1f ON t1 (f(767)); ---error 1713 +BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d; - +ROLLBACK; BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d, @@ -371,8 +371,9 @@ UPDATE t1 SET s=@e; # that CANNOT be updated. CREATE INDEX t1t ON t1 (t(767)); ---error 1713 +BEGIN; UPDATE t1 SET t=@e; +ROLLBACK; # The function dict_index_too_big_for_undo() prevents us from adding # one more index. But it is too late. The record is already too big. @@ -515,9 +516,10 @@ INSERT INTO bug12547647 VALUES (5,REPEAT('khdfo5AlOq',1900),REPEAT('g',7751)); COMMIT; # The following used to cause a hang while doing infinite undo log allocation. ---error 1713 +BEGIN; UPDATE bug12547647 SET c = REPEAT('b',16928); SHOW WARNINGS; +ROLLBACK; DROP TABLE bug12547647; diff --git a/mysql-test/suite/innodb/t/innodb-32k.test b/mysql-test/suite/innodb/t/innodb-32k.test index 65c1d4bbc..356746e8e 100644 --- a/mysql-test/suite/innodb/t/innodb-32k.test +++ b/mysql-test/suite/innodb/t/innodb-32k.test @@ -294,13 +294,14 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, CREATE INDEX t1f17 ON t1 (v(767)); ---error 1713 +BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d, v=@d,w=@d,x=@d,y=@d,z=@d, aa=@d,ba=@d,ca=@d,da=@d,ea=@d,fa=@d,ga=@d,ha=@d,ia=@d,ja=@d, ka=@d,la=@d,ma=@d,na=@d,oa=@d,pa=@d,qa=@d,ra=@d,sa=@d,ta=@d,ua=@d, va=@d,wa=@d,xa=@d,ya=@d,za=@d; +ROLLBACK; BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; diff --git a/mysql-test/suite/innodb/t/innodb-64k.test b/mysql-test/suite/innodb/t/innodb-64k.test index a947de25d..049854427 100644 --- a/mysql-test/suite/innodb/t/innodb-64k.test +++ b/mysql-test/suite/innodb/t/innodb-64k.test @@ -304,7 +304,7 @@ COMMIT; CREATE INDEX tg1f2 ON t1 (ia(767),ja(767)); ---error 1713 +BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d, v=@d,w=@d,x=@d,y=@d,z=@d, @@ -317,6 +317,7 @@ UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, ac=@d,bc=@d,cc=@d,dc=@d,ec=@d,fc=@d,gc=@d,hc=@d,ic=@d,jc=@d, kc=@d,lc=@d,mc=@d,nc=@d,oc=@d,pc=@d,qc=@d,rc=@d,sc=@d,tc=@d,uc=@d, vc=@d,wc=@d,xc=@d,yc=@d,zc=@d; +ROLLBACK; BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; diff --git a/mysql-test/suite/innodb/t/innodb-alter-table.test b/mysql-test/suite/innodb/t/innodb-alter-table.test index 97f0075f3..0cf456ad1 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-table.test +++ b/mysql-test/suite/innodb/t/innodb-alter-table.test @@ -1,4 +1,5 @@ --source include/innodb_page_size.inc +--source include/have_partition.inc # # MMDEV-8386: MariaDB creates very big tmp file and hangs on xtradb @@ -171,3 +172,35 @@ ALTER TABLE ticket SHOW CREATE TABLE ticket; DROP TABLE ticket; + +# +# MDEV-13838: Wrong result after altering a partitioned table +# + +CREATE TABLE t ( +id bigint(20) unsigned NOT NULL auto_increment, +d date NOT NULL, +a bigint(20) unsigned NOT NULL, +b smallint(5) unsigned DEFAULT NULL, +PRIMARY KEY (id,d) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs STATS_SAMPLE_PAGES=2 +PARTITION BY RANGE COLUMNS(d) +( +PARTITION p20170914 VALUES LESS THAN ('2017-09-15') ENGINE = InnoDB, +PARTITION p99991231 VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB); + +insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10); +insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10); + +replace into t(d,a,b) select '2017-09-15',rand()*10000,rand()*10 from t t1, t t2, t t3, t t4; + +select count(*) from t where d ='2017-09-15'; + +ALTER TABLE t CHANGE b c smallint(5) unsigned , ADD KEY idx_d_a (d, a); +SHOW CREATE TABLE t; +analyze table t; + +select count(*) from t where d ='2017-09-15'; +select count(*) from t force index(primary) where d ='2017-09-15'; + +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/innodb-alter.test b/mysql-test/suite/innodb/t/innodb-alter.test index 67f637a18..af7548270 100644 --- a/mysql-test/suite/innodb/t/innodb-alter.test +++ b/mysql-test/suite/innodb/t/innodb-alter.test @@ -298,21 +298,12 @@ SHOW CREATE TABLE t1n; ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=INPLACE; --error ER_KEY_COLUMN_DOES_NOT_EXITS ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY; -# FIXME: MDEV-13668 InnoDB unnecessarily rebuilds table -# when renaming a column and adding index ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE; -ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE; SHOW CREATE TABLE t1n; ALTER TABLE t1n DROP INDEX c4; --error ER_DUP_FIELDNAME ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE; -# FIXME: MDEV-13668 ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE; -ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE; SHOW CREATE TABLE t1n; DROP TABLE t1n; @@ -370,16 +361,12 @@ CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL; ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id); -# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE -call mtr.add_suppression("Error: no matching column for .FTS_DOC_ID. in index .ct.--temporary-- of table .test...t1o"); ---error ER_NOT_KEYFILE ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ADD FULLTEXT INDEX(ct); -# FIXME: MDEV-9469 (enable this) -#--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON -#ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, -#ALGORITHM=INPLACE; -#end of MDEV-9469 FIXME + +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, +ALGORITHM=INPLACE; DROP TABLE sys_indexes; CREATE TABLE sys_indexes SELECT i.* FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES i @@ -494,6 +481,3 @@ eval ALTER TABLE $source_db.t1 DROP INDEX index2, algorithm=inplace; eval DROP TABLE $source_db.t1; eval DROP DATABASE $source_db; eval DROP DATABASE $dest_db; - - - diff --git a/mysql-test/suite/innodb/t/innodb-get-fk.test b/mysql-test/suite/innodb/t/innodb-get-fk.test index 339a79686..46eb7dd02 100644 --- a/mysql-test/suite/innodb/t/innodb-get-fk.test +++ b/mysql-test/suite/innodb/t/innodb-get-fk.test @@ -40,6 +40,11 @@ CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `rep ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only'; SHOW CREATE TABLE `repro`.`crew_role_assigned`; +# These should be ignored in innodb_read_only mode. +SET GLOBAL innodb_buffer_pool_load_now = ON; +SET GLOBAL innodb_buffer_pool_dump_now = ON; +SET GLOBAL innodb_buffer_pool_load_abort = ON; + -- let $restart_parameters= -- source include/restart_mysqld.inc diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test index 41d844d26..d8a85d7f2 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test @@ -32,10 +32,8 @@ create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row show warnings; create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant; show create table innodb_redundant; ---replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/ ---error 1005 +--error ER_ILLEGAL_HA_CREATE_OPTION alter table innodb_redundant page_compressed=1; ---replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/ show warnings; show create table innodb_redundant; alter table innodb_redundant row_format=compact page_compressed=1; diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test index 938025359..b9c9dc085 100644 --- a/mysql-test/suite/innodb/t/innodb-table-online.test +++ b/mysql-test/suite/innodb/t/innodb-table-online.test @@ -14,6 +14,9 @@ call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd fi # DISCARD TABLESPACE needs file-per-table SET @global_innodb_file_per_table_orig = @@global.innodb_file_per_table; SET GLOBAL innodb_file_per_table = on; +# PAGE_COMPRESSED needs innodb_file_format!=Antelope +SET @file_format = @@GLOBAL.innodb_file_format; +SET GLOBAL innodb_file_format = Barracuda; # Save the initial number of concurrent sessions. --source include/count_sessions.inc @@ -215,7 +218,8 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done # Ensure that the ALTER TABLE will be executed even with some concurrent DML. SET lock_wait_timeout = 10; --send -ALTER TABLE t1 ROW_FORMAT=COMPACT, ALGORITHM = INPLACE; +ALTER TABLE t1 ROW_FORMAT=COMPACT +PAGE_COMPRESSED = YES PAGE_COMPRESSION_LEVEL = 1, ALGORITHM = INPLACE; # Generate some log (delete-mark, delete-unmark, insert etc.) # while the index creation is blocked. Some of this may run @@ -443,6 +447,7 @@ DROP TABLE t1; --source include/wait_until_count_sessions.inc SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig; +SET GLOBAL innodb_file_format = @file_format; --disable_warnings SET GLOBAL innodb_monitor_enable = default; SET GLOBAL innodb_monitor_disable = default; diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test index aa9722386..11bdd4305 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test +++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test @@ -1,4 +1,4 @@ -# Not supported in embedded +# mysql-test-run.pl --embedded cannot restart the server. --source include/not_embedded.inc # Adding big test option for this test. @@ -15,12 +15,6 @@ -- source include/have_innodb.inc -call mtr.add_suppression("InnoDB: Page for tablespace .* "); -call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS="); -call mtr.add_suppression("InnoDB: Corruption: Block in space_id .* in file .* corrupted"); -call mtr.add_suppression("InnoDB: Based on page type .*"); -FLUSH TABLES; - let MYSQLD_DATADIR =`SELECT @@datadir`; let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522\\t1.ibd'/; @@ -28,51 +22,36 @@ let $strerrfix=/ (\(.+\))//; SET GLOBAL innodb_file_per_table = 1; -DROP DATABASE IF EXISTS test_wl5522; CREATE DATABASE test_wl5522; -##### Before DISCARD commit crash -SET SESSION debug_dbug="+d,ib_discard_before_commit_crash"; - CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); -# Write file to make mysql-test-run.pl start up the server again ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--let $_server_id= `SELECT @@server_id` +--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect -# Execute the statement that causes the crash +--exec echo wait > $_expect_file_name +SET SESSION debug_dbug="+d,ib_discard_before_commit_crash"; --error 2013 ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect +--source include/start_mysqld.inc DROP TABLE test_wl5522.t1; -#### Before DISCARD commit crash -##### After DISCARD commit crash SET GLOBAL innodb_file_per_table = 1; -SELECT @@innodb_file_per_table; - -SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); -# Write file to make mysql-test-run.pl start up the server again ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - -# Execute the statement that causes the crash +--exec echo wait > $_expect_file_name +SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; --error 2013 ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect +--source include/start_mysqld.inc DROP TABLE test_wl5522.t1; -#### After DISCARD commit crash SET GLOBAL innodb_file_per_table = 1; @@ -106,59 +85,35 @@ do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF -##### Before commit crash -SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; - --error ER_TABLESPACE_DISCARDED SELECT * FROM test_wl5522.t1; -# Write file to make mysql-test-run.pl start up the server again ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - -# Execute the statement that causes the crash +--exec echo wait > $_expect_file_name +SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; --error 2013 ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect - -#### Before commit crash +--source include/start_mysqld.inc # Check that the DD is consistent after recovery -##### Before checkpoint crash -SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; - --error ER_TABLESPACE_DISCARDED SELECT COUNT(*) FROM test_wl5522.t1; -# Don't start up the server right away. ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - -# Execute the statement that causes the crash +--exec echo wait > $_expect_file_name +SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; --error 2013 ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; # After the above test the results are non-deterministic, # delete the old tablespace files and drop the table, # recreate the table and do a proper import. --- source include/wait_until_disconnected.inc perl; do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF ---echo # Restart and reconnect to the server ---enable_reconnect ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---source include/wait_until_connected_again.inc ---disable_reconnect - -#### Before checkpoint crash - -# After the above test the results are non-deterministic, recreate the table -# and do a proper import. +--source include/start_mysqld.inc DROP TABLE test_wl5522.t1; @@ -198,6 +153,7 @@ SET SESSION debug_dbug="+d,ib_export_io_write_failure_1"; FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; + SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -1087,7 +1043,9 @@ CREATE TABLE test_wl5522.t1 ( INDEX idx3(c4(512))) Engine=InnoDB; # Stop purge so that it doesn't remove the delete marked entries. -SET GLOBAL INNODB_PURGE_STOP_NOW=ON; +connect (purge_control,localhost,root); +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection default; # Disable change buffer merge from the master thread, additionally # enable aggressive flushing so that more changes are buffered. @@ -1157,7 +1115,10 @@ SELECT name SET GLOBAL innodb_disable_background_merge=OFF; # Enable normal operation -SET GLOBAL INNODB_PURGE_RUN_NOW=ON; +connection purge_control; +COMMIT; +disconnect purge_control; +connection default; DROP TABLE test_wl5522.t1; @@ -1195,8 +1156,8 @@ DROP TABLE test_wl5522.t1; # a Btree that has several levels CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; -INSERT INTO test_wl5522.t1 VALUES - (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); +INSERT IGNORE INTO test_wl5522.t1 VALUES + (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 2731)); INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; @@ -1262,7 +1223,7 @@ do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF -SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; +SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; --replace_regex /'.*t1.cfg'/'t1.cfg'/ @@ -1484,6 +1445,8 @@ call mtr.add_suppression("but tablespace with that id or name does not exist"); call mtr.add_suppression("Failed to find tablespace for table '\"test_wl5522\".\"t1\"' in the cache"); call mtr.add_suppression("Could not find a valid tablespace file for 'test_wl5522.*t1'"); call mtr.add_suppression("while reading index meta-data, expected to read 44 bytes but read only 0 bytes"); +call mtr.add_suppression("Page for tablespace.*that index is not found from configuration file"); +call mtr.add_suppression("Invalid FSP_SPACE_FLAGS=0x0"); --enable_query_log #cleanup diff --git a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test index a3ae83753..2815a6fc6 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test +++ b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test @@ -447,12 +447,7 @@ ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=INPLACE; --error ER_KEY_COLUMN_DOES_NOT_EXITS ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY; -# FIXME: MDEV-13668 InnoDB unnecessarily rebuilds table -# when renaming a column and adding index ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE; -ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE; --echo ### files in MYSQL_DATA_DIR/test --replace_regex $regexp @@ -474,11 +469,7 @@ ALTER TABLE t1n DROP INDEX c4; --error ER_DUP_FIELDNAME ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE; -# FIXME: MDEV-13668 ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE; -ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE; --echo ### files in MYSQL_DATA_DIR/test --replace_regex $regexp @@ -500,17 +491,10 @@ ALTER TABLE t1o MODIFY c1 BIGINT UNSIGNED NOT NULL; --replace_regex $regexp --list_files $MYSQL_TMP_DIR/alt_dir/test -# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE -call mtr.add_suppression("Error: no matching column for .FTS_DOC_ID. in index .ct.--temporary-- of table .test...t1o"); ---error ER_NOT_KEYFILE ALTER TABLE t1o ADD FULLTEXT INDEX(ct), CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ALGORITHM=INPLACE; -ALTER TABLE t1o CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE; -ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE; -# end of MDEV-9469 FIXME - --echo ### files in MYSQL_DATA_DIR/test --replace_regex $regexp --list_files $MYSQL_DATA_DIR/test @@ -519,11 +503,9 @@ ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE; --list_files $MYSQL_TMP_DIR/alt_dir/test # This would create a hidden FTS_DOC_ID column, which cannot be done online. -# FIXME: MDEV-9469 (enable this) -#--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON -#ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, -#LOCK=NONE; -#end of MDEV-9469 FIXME +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, +LOCK=NONE; # This should not show duplicates. SELECT sc.pos FROM information_schema.innodb_sys_columns sc @@ -534,7 +516,6 @@ WHERE st.NAME='test/t1o' AND sc.NAME='FTS_DOC_ID'; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE t1o; -# FIXME: MDEV-13668 ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, DROP INDEX ct, LOCK=NONE; @@ -572,15 +553,9 @@ ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id); --replace_regex $regexp --list_files $MYSQL_TMP_DIR/alt_dir/test -# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE ---error ER_NOT_KEYFILE ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ADD FULLTEXT INDEX(ct); -ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE; -ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE; -#end of MDEV-9469 FIXME - --echo ### files in MYSQL_DATA_DIR/test --replace_regex $regexp --list_files $MYSQL_DATA_DIR/test diff --git a/mysql-test/suite/innodb/t/table_definition_cache_debug.opt b/mysql-test/suite/innodb/t/table_definition_cache_debug.opt new file mode 100644 index 000000000..6195e055d --- /dev/null +++ b/mysql-test/suite/innodb/t/table_definition_cache_debug.opt @@ -0,0 +1 @@ +--innodb-open-files=13 diff --git a/mysql-test/suite/innodb/t/table_definition_cache_debug.test b/mysql-test/suite/innodb/t/table_definition_cache_debug.test new file mode 100644 index 000000000..57d64d684 --- /dev/null +++ b/mysql-test/suite/innodb/t/table_definition_cache_debug.test @@ -0,0 +1,66 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +SET @save_tdc= @@GLOBAL.table_definition_cache; +SET @save_toc= @@GLOBAL.table_open_cache; + +# InnoDB plugin essentially ignores table_definition_cache size +# and hard-wires it to 400, which also is the minimum allowed value. +SET GLOBAL table_definition_cache= 400; +SET GLOBAL table_open_cache= 1024; + +CREATE TABLE to_be_evicted(a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB; +INSERT INTO to_be_evicted VALUES(1,2),(2,1); + +connect(ddl,localhost,root,,); +SET DEBUG_SYNC = 'row_log_apply_before SIGNAL scanned WAIT_FOR got_duplicate'; +--send +ALTER TABLE to_be_evicted ADD UNIQUE INDEX(b); + +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR scanned'; + +# During the ADD UNIQUE INDEX, start a transaction that inserts a duplicate +# and then hogs the table lock, so that the unique index cannot be dropped. +BEGIN; +INSERT INTO to_be_evicted VALUES(3, 2); +SET DEBUG_SYNC = 'now SIGNAL got_duplicate'; + +connection ddl; +--error ER_DUP_ENTRY +reap; + +disconnect ddl; +connection default; +# Release the table lock. +COMMIT; +SET DEBUG_SYNC = RESET; + +# Allow cache eviction. +FLUSH TABLES; +--disable_query_log + +# Pollute the cache with many tables, so that our table will be evicted. +let $N=1000; +let $loop=$N; +while ($loop) +{ + eval CREATE TABLE t_$loop(id INT)ENGINE=InnoDB; + dec $loop; +} + +# Hopefully let InnoDB evict the tables. +sleep 10; + +let $loop=$N; +while ($loop) +{ + eval DROP TABLE t_$loop; + dec $loop; +} + +SET GLOBAL table_definition_cache= @save_tdc; +SET GLOBAL table_open_cache= @save_toc; + +DROP TABLE to_be_evicted; diff --git a/mysql-test/suite/innodb/t/undo_log.test b/mysql-test/suite/innodb/t/undo_log.test new file mode 100644 index 000000000..c1a98793d --- /dev/null +++ b/mysql-test/suite/innodb/t/undo_log.test @@ -0,0 +1,139 @@ +--source include/have_innodb.inc +CREATE TABLE test_tab ( +a_str_18 mediumtext, +b_str_3 varchar(32) DEFAULT NULL, +a_str_13 mediumtext, +b_str_5 varchar(40) DEFAULT NULL, +b_str_6 varchar(50) DEFAULT NULL, +b_str_7 char(32) DEFAULT NULL, +b_str_8 varchar(32) DEFAULT NULL, +b_str_9 varchar(255) DEFAULT NULL, +a_str_28 char(255) DEFAULT NULL, +a_str_27 varchar(255) DEFAULT NULL, +b_str_10 varchar(32) DEFAULT NULL, +a_str_26 varchar(255) DEFAULT NULL, +a_str_6 varchar(50) DEFAULT NULL, +b_str_11 varchar(32) DEFAULT NULL, +b_str_12 varchar(255) DEFAULT NULL, +b_str_13 char(32) DEFAULT NULL, +b_str_14 varchar(32) DEFAULT NULL, +b_str_15 char(32) DEFAULT NULL, +b_str_16 char(32) DEFAULT NULL, +b_str_17 varchar(32) DEFAULT NULL, +b_str_18 varchar(32) DEFAULT NULL, +a_str_25 varchar(40) DEFAULT NULL, +b_str_19 varchar(255) DEFAULT NULL, +a_str_23 varchar(40) DEFAULT NULL, +b_str_20 varchar(32) DEFAULT NULL, +a_str_21 varchar(255) DEFAULT NULL, +a_str_20 varchar(255) DEFAULT NULL, +a_str_39 varchar(255) DEFAULT NULL, +a_str_38 varchar(255) DEFAULT NULL, +a_str_37 varchar(255) DEFAULT NULL, +b_str_21 char(32) DEFAULT NULL, +b_str_23 varchar(80) DEFAULT NULL, +b_str_24 varchar(32) DEFAULT NULL, +b_str_25 varchar(32) DEFAULT NULL, +b_str_26 char(32) NOT NULL DEFAULT '', +b_str_27 varchar(255) DEFAULT NULL, +a_str_36 varchar(255) DEFAULT NULL, +a_str_33 varchar(100) DEFAULT NULL, +a_ref_10 char(32) DEFAULT NULL, +b_str_28 char(32) DEFAULT NULL, +b_str_29 char(32) DEFAULT NULL, +a_ref_6 char(32) DEFAULT NULL, +a_ref_12 varchar(32) DEFAULT NULL, +a_ref_11 varchar(32) DEFAULT NULL, +a_str_49 varchar(40) DEFAULT NULL, +b_str_30 varchar(32) DEFAULT NULL, +a_ref_3 varchar(32) DEFAULT NULL, +a_str_48 varchar(40) DEFAULT NULL, +a_ref_1 char(32) DEFAULT NULL, +b_str_31 varchar(32) DEFAULT NULL, +b_str_32 varchar(255) DEFAULT NULL, +b_str_33 char(32) DEFAULT NULL, +b_str_34 varchar(32) DEFAULT NULL, +a_str_47 varchar(40) DEFAULT NULL, +b_str_36 varchar(255) DEFAULT NULL, +a_str_46 varchar(40) DEFAULT NULL, +a_str_45 varchar(255) DEFAULT NULL, +b_str_38 varchar(32) DEFAULT NULL, +b_str_39 char(32) DEFAULT NULL, +b_str_40 varchar(32) DEFAULT NULL, +a_str_41 varchar(255) DEFAULT NULL, +b_str_41 varchar(32) DEFAULT NULL, +PRIMARY KEY (b_str_26), +UNIQUE KEY a_str_47 (a_str_47), +UNIQUE KEY a_str_49 (a_str_49), +UNIQUE KEY a_str_33 (a_str_33), +UNIQUE KEY a_str_46 (a_str_46), +UNIQUE KEY a_str_48 (a_str_48), +KEY b_str_18 (b_str_18), +KEY a_str_26 (a_str_26), +KEY b_str_27 (b_str_27,b_str_19), +KEY b_str_41 (b_str_41), +KEY b_str_15 (b_str_15), +KEY a_str_20 (a_str_20), +KEY b_str_17 (b_str_17), +KEY b_str_40 (b_str_40), +KEY b_str_24 (b_str_24), +KEY b_str_10 (b_str_10), +KEY b_str_16 (b_str_16), +KEY b_str_29 (b_str_29), +KEY a_str_41 (a_str_41), +KEY b_str_7 (b_str_7), +KEY a_str_45 (a_str_45), +KEY a_str_28 (a_str_28), +KEY a_str_37 (a_str_37), +KEY b_str_6 (b_str_6), +KEY a_ref_6 (a_ref_6), +KEY b_str_34 (b_str_34), +KEY b_str_38 (b_str_38), +KEY a_ref_10 (a_ref_10), +KEY b_str_21 (b_str_21), +KEY b_str_23 (b_str_23,b_str_19), +KEY b_str_33 (b_str_33), +KEY a_ref_12 (a_ref_12), +KEY a_str_18 (a_str_18(255)), +KEY a_str_39 (a_str_39), +KEY a_str_27 (a_str_27), +KEY a_str_25 (a_str_25), +KEY b_str_9 (b_str_9), +KEY a_str_23 (a_str_23), +KEY b_str_8 (b_str_8), +KEY a_str_21 (a_str_21), +KEY b_str_3 (b_str_3), +KEY b_str_30 (b_str_30), +KEY b_str_12 (b_str_12), +KEY b_str_25 (b_str_25), +KEY b_str_13 (b_str_13), +KEY a_str_38 (a_str_38), +KEY a_str_13 (a_str_13(255)), +KEY a_str_36 (a_str_36), +KEY b_str_28 (b_str_28), +KEY b_str_19 (b_str_19), +KEY b_str_11 (b_str_11), +KEY a_ref_1 (a_ref_1), +KEY b_str_20 (b_str_20), +KEY b_str_14 (b_str_14), +KEY a_ref_3 (a_ref_3), +KEY b_str_39 (b_str_39), +KEY b_str_32 (b_str_32), +KEY a_str_6 (a_str_6), +KEY b_str_5 (b_str_5), +KEY b_str_31 (b_str_31), +KEY a_ref_11 (a_ref_11) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; + +BEGIN; +INSERT INTO test_tab (b_str_26, a_str_13, a_str_18) VALUES +('a', REPEAT('f',4031), REPEAT('g', 4031)); + +UPDATE test_tab SET a_str_13=REPEAT('h',4032), a_str_18=REPEAT('i',4032); +SELECT 'Reducing length to 4030'; +UPDATE test_tab SET a_str_13=REPEAT('j',4030), a_str_18=REPEAT('k',4030); +UPDATE test_tab SET a_str_13=REPEAT('l',4031), a_str_18=REPEAT('m',4031); +ROLLBACK; +SELECT COUNT(*) FROM test_tab; +CHECK TABLE test_tab; +DROP TABLE test_tab; diff --git a/mysql-test/suite/innodb_fts/r/concurrent_insert.result b/mysql-test/suite/innodb_fts/r/concurrent_insert.result new file mode 100644 index 000000000..b9798ca1a --- /dev/null +++ b/mysql-test/suite/innodb_fts/r/concurrent_insert.result @@ -0,0 +1,8 @@ +CREATE TABLE t1(a VARCHAR(5),FULLTEXT KEY(a)) ENGINE=InnoDB; +SET DEBUG_SYNC = 'get_next_FTS_DOC_ID SIGNAL prepared WAIT_FOR race'; +REPLACE INTO t1(a) values('aaa'); +SET DEBUG_SYNC = 'now WAIT_FOR prepared'; +REPLACE INTO t1(a) VALUES('aaa'); +SET DEBUG_SYNC = 'now SIGNAL race'; +SET DEBUG_SYNC = 'RESET'; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/r/fulltext.result b/mysql-test/suite/innodb_fts/r/fulltext.result index 1cdce29cd..6802894e4 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext.result +++ b/mysql-test/suite/innodb_fts/r/fulltext.result @@ -1,4 +1,3 @@ -drop table if exists t1,t2,t3; CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)) ENGINE = InnoDB; INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), ('Full-text indexes', 'are called collections'), @@ -637,3 +636,58 @@ EXECUTE stmt; DEALLOCATE PREPARE stmt; DROP TABLE t1; End of 5.1 tests +CREATE TABLE z(a INTEGER) engine=innodb; +CREATE TABLE q(b TEXT CHARSET latin1, fulltext(b)) engine=innodb; +EXPLAIN SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z); +ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*' +SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z); +ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*' +EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM z; +ERROR 42S22: Unknown column 'b' in 'field list' +SELECT MATCH(b) AGAINST ('*') FROM z; +ERROR 42S22: Unknown column 'b' in 'field list' +EXPLAIN SELECT MATCH(a) AGAINST ('*') FROM z; +ERROR HY000: Can't find FULLTEXT index matching the column list +SELECT MATCH(a) AGAINST ('*') FROM z; +ERROR HY000: Can't find FULLTEXT index matching the column list +EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM q; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE q ALL NULL NULL NULL NULL 1 +SELECT MATCH(b) AGAINST ('*') FROM q; +ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*' +DROP TABLE z, q; +create table t ( +FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY, t TEXT, FULLTEXT KEY (t) +) ENGINE=InnoDB; +INSERT INTO t values (1, 'foo bar'), (2, 'foo bar'), (3, 'foo'); +SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) +LIMIT 0; +FTS_DOC_ID t +SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) +LIMIT 1; +FTS_DOC_ID t +1 foo bar +SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) +LIMIT 2; +FTS_DOC_ID t +1 foo bar +2 foo bar +SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) +LIMIT 3; +FTS_DOC_ID t +1 foo bar +2 foo bar +3 foo +SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) +LIMIT 4; +FTS_DOC_ID t +1 foo bar +2 foo bar +3 foo +SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) +LIMIT 5; +FTS_DOC_ID t +1 foo bar +2 foo bar +3 foo +DROP TABLE t; diff --git a/mysql-test/suite/innodb_fts/t/concurrent_insert.test b/mysql-test/suite/innodb_fts/t/concurrent_insert.test new file mode 100644 index 000000000..e5d61cd8b --- /dev/null +++ b/mysql-test/suite/innodb_fts/t/concurrent_insert.test @@ -0,0 +1,20 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +CREATE TABLE t1(a VARCHAR(5),FULLTEXT KEY(a)) ENGINE=InnoDB; +SET DEBUG_SYNC = 'get_next_FTS_DOC_ID SIGNAL prepared WAIT_FOR race'; +--send +REPLACE INTO t1(a) values('aaa'); + +connect(dml, localhost, root, ,); +SET DEBUG_SYNC = 'now WAIT_FOR prepared'; +REPLACE INTO t1(a) VALUES('aaa'); +SET DEBUG_SYNC = 'now SIGNAL race'; +disconnect dml; + +connection default; +reap; +SET DEBUG_SYNC = 'RESET'; + +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/t/fulltext.test b/mysql-test/suite/innodb_fts/t/fulltext.test index 90d5d5c71..663b20226 100644 --- a/mysql-test/suite/innodb_fts/t/fulltext.test +++ b/mysql-test/suite/innodb_fts/t/fulltext.test @@ -4,10 +4,6 @@ --source include/have_innodb.inc ---disable_warnings -drop table if exists t1,t2,t3; ---enable_warnings - CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)) ENGINE = InnoDB; INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), ('Full-text indexes', 'are called collections'), @@ -679,3 +675,45 @@ DEALLOCATE PREPARE stmt; DROP TABLE t1; --echo End of 5.1 tests + +# This is an adapted and extended version of an Oracle test for +# Bug#21140111: Explain ... match against: Assertion failed: ret ... +# No bug was repeatable for MariaDB. + +CREATE TABLE z(a INTEGER) engine=innodb; +CREATE TABLE q(b TEXT CHARSET latin1, fulltext(b)) engine=innodb; + +--error ER_PARSE_ERROR +EXPLAIN SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z); +--error ER_PARSE_ERROR +SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z); +--error ER_BAD_FIELD_ERROR +EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM z; +--error ER_BAD_FIELD_ERROR +SELECT MATCH(b) AGAINST ('*') FROM z; +--error ER_FT_MATCHING_KEY_NOT_FOUND +EXPLAIN SELECT MATCH(a) AGAINST ('*') FROM z; +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT MATCH(a) AGAINST ('*') FROM z; +EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM q; +--error ER_PARSE_ERROR +SELECT MATCH(b) AGAINST ('*') FROM q; + +DROP TABLE z, q; + +create table t ( + FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY, t TEXT, FULLTEXT KEY (t) +) ENGINE=InnoDB; + +INSERT INTO t values (1, 'foo bar'), (2, 'foo bar'), (3, 'foo'); +let $limit=0; +let $N=6; +while ($N) +{ + eval SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) + LIMIT $limit; + inc $limit; + dec $N; +} + +DROP TABLE t; diff --git a/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result b/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result index ccfd8a167..474d36ea0 100644 --- a/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result +++ b/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result @@ -584,12 +584,12 @@ REPEAT("a", 4000) , REPEAT("a", 255) CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072)); CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072)); CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072)); +BEGIN; UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -ERROR HY000: Undo log record is too big. SHOW WARNINGS; Level Code Message -Error 1713 Undo log record is too big. +ROLLBACK; DROP TABLE worklog5743; CREATE TABLE worklog5743 ( col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) , @@ -627,13 +627,13 @@ REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), REPEAT("a", 4000) , REPEAT("a", 255) ); ROLLBACK; +BEGIN; UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -ERROR HY000: Undo log record is too big. SHOW WARNINGS; Level Code Message -Error 1713 Undo log record is too big. +ROLLBACK; SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); col_1_varbinary = REPEAT("c", 4000) diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result similarity index 93% rename from mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result rename to mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result index b7a2666bf..a751736ab 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result +++ b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result @@ -1,14 +1,12 @@ +call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); +call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); +call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*"); call mtr.add_suppression("InnoDB: Page for tablespace "); call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x"); -call mtr.add_suppression("InnoDB: Corruption: Block in space_id .* in file .* corrupted"); -call mtr.add_suppression("InnoDB: Based on page type .*"); FLUSH TABLES; -SET GLOBAL innodb_file_per_table = 1; -SET GLOBAL innodb_file_format = `Barracuda`; +SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_file_format=Barracuda; SET SESSION innodb_strict_mode=1; -DROP DATABASE IF EXISTS test_wl5522; -Warnings: -Note 1008 Can't drop database 'test_wl5522'; database doesn't exist CREATE DATABASE test_wl5522; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb ROW_FORMAT=COMPRESSED; @@ -38,9 +36,11 @@ unlink: t1.ibd unlink: t1.cfg # Restart and reconnect to the server DROP TABLE test_wl5522.t1; -SET GLOBAL innodb_file_per_table = 1; -SET GLOBAL innodb_file_format = `Barracuda`; SET SESSION innodb_strict_mode=1; +SET @file_per_table = @@GLOBAL.innodb_file_per_table; +SET @file_format = @@GLOBAL.innodb_file_format; +SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_file_format=Barracuda; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb ROW_FORMAT=COMPRESSED; ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; @@ -128,8 +128,8 @@ c4 VARCHAR(2048), INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -SET GLOBAL INNODB_PURGE_STOP_NOW=ON; +ROW_FORMAT=COMPRESSED; +START TRANSACTION WITH CONSISTENT SNAPSHOT; SET GLOBAL innodb_disable_background_merge=ON; SET GLOBAL innodb_monitor_reset = ibuf_merges; SET GLOBAL innodb_monitor_reset = ibuf_merges_insert; @@ -172,7 +172,7 @@ t1 CREATE TABLE `t1` ( KEY `idx1` (`c2`), KEY `idx2` (`c3`(512)), KEY `idx3` (`c4`(512)) -) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 +) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED SELECT c1, c2 FROM test_wl5522.t1; c1 c2 2 32 @@ -294,7 +294,7 @@ FROM information_schema.innodb_metrics WHERE name = 'ibuf_merges_inserts' AND count > 0; name SET GLOBAL innodb_disable_background_merge=OFF; -SET GLOBAL INNODB_PURGE_RUN_NOW=ON; +COMMIT; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 ( c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -304,7 +304,7 @@ c4 VARCHAR(2048), INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +ROW_FORMAT=COMPRESSED; SELECT c1, c2 FROM test_wl5522.t1; c1 c2 ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; @@ -428,11 +428,11 @@ t1 CREATE TABLE `t1` ( KEY `idx1` (`c2`), KEY `idx2` (`c3`(512)), KEY `idx3` (`c4`(512)) -) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 +) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -INSERT INTO test_wl5522.t1 VALUES +INSERT IGNORE INTO test_wl5522.t1 VALUES (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); Warnings: Warning 1265 Data truncated for column 'c2' at row 1 @@ -470,8 +470,9 @@ ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; SELECT COUNT(*) FROM test_wl5522.t1; ERROR HY000: Tablespace has been discarded for table 't1' restore: t1 .ibd and .cfg files -SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; +SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Data structure corruption SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd @@ -561,5 +562,5 @@ set global innodb_monitor_enable = default; set global innodb_monitor_disable = default; set global innodb_monitor_reset = default; set global innodb_monitor_reset_all = default; -SET GLOBAL INNODB_FILE_PER_TABLE=1; -SET GLOBAL INNODB_FILE_FORMAT=Antelope; +SET GLOBAL innodb_file_per_table = @file_per_table; +SET GLOBAL innodb_file_format = @file_format; diff --git a/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test b/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test index 541c0e119..87f2fd3f4 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test +++ b/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test @@ -536,10 +536,11 @@ REPEAT("a", 4000) , REPEAT("a", 255) CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072)); CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072)); CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072)); ---error ER_UNDO_RECORD_TOO_BIG +BEGIN; UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); SHOW WARNINGS; +ROLLBACK; DROP TABLE worklog5743; #------------------------------------------------------------------------------ @@ -585,13 +586,12 @@ REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), REPEAT("a", 4000) , REPEAT("a", 255) ); ROLLBACK; -# Bug#12547647 - UPDATE LOGGING COULD EXCEED LOG PAGE SIZE -# Instead of this error, it would hang before this fix. ---error ER_UNDO_RECORD_TOO_BIG +BEGIN; UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); SHOW WARNINGS; +ROLLBACK; SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test similarity index 84% rename from mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test rename to mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test index c48b81a5a..65b030c01 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test +++ b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test @@ -1,39 +1,32 @@ -# Not supported in embedded +# mysql-test-run.pl --embedded cannot restart the server. --source include/not_embedded.inc # This test case needs to crash the server. Needs a debug server. --source include/have_debug.inc -# Don't test this under valgrind, memory leaks will occur. +# Valgrind can hang or return spurious messages on DBUG_SUICIDE --source include/not_valgrind.inc # Avoid CrashReporter popup on Mac --source include/not_crashrep.inc --- source include/have_innodb.inc - -# compressed table in tests are with sizes KEY_BLOCK_SIZE 1,2,4,8,16 -# Table creatation fails if KEY_BLOCK_SIZE > innodb-page-size,so -# allow test to run only when innodb-page-size=16 ---source include/have_innodb_16k.inc +-- source include/innodb_page_size_small.inc +call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); +call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); +call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*"); call mtr.add_suppression("InnoDB: Page for tablespace "); call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x"); -call mtr.add_suppression("InnoDB: Corruption: Block in space_id .* in file .* corrupted"); -call mtr.add_suppression("InnoDB: Based on page type .*"); FLUSH TABLES; +SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_file_format=Barracuda; + let MYSQLD_DATADIR =`SELECT @@datadir`; -let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; -let $innodb_file_format = `SELECT @@innodb_file_format`; let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522_t1.ibd'/; -SET GLOBAL innodb_file_per_table = 1; - -SET GLOBAL innodb_file_format = `Barracuda`; SET SESSION innodb_strict_mode=1; -DROP DATABASE IF EXISTS test_wl5522; CREATE DATABASE test_wl5522; # Create the table that we will use for crash recovery (during IMPORT) @@ -46,7 +39,7 @@ INSERT INTO test_wl5522.t1 VALUES (1), (2), (3), (4); FLUSH TABLES test_wl5522.t1 FOR EXPORT; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test_wl5522", "t1"); EOF UNLOCK TABLES; @@ -60,7 +53,7 @@ INSERT INTO test_wl5522.t1 VALUES (1); ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_discard_tablespaces("test_wl5522", "t1"); EOF @@ -69,7 +62,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -112,7 +105,7 @@ ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; # recreate the table and do a proper import. -- source include/wait_until_disconnected.inc perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -129,10 +122,12 @@ EOF DROP TABLE test_wl5522.t1; -SET GLOBAL innodb_file_per_table = 1; -SET GLOBAL innodb_file_format = `Barracuda`; - SET SESSION innodb_strict_mode=1; +SET @file_per_table = @@GLOBAL.innodb_file_per_table; +SET @file_format = @@GLOBAL.innodb_file_format; + +SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_file_format=Barracuda; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb ROW_FORMAT=COMPRESSED; @@ -140,7 +135,7 @@ ROW_FORMAT=COMPRESSED; ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -166,7 +161,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -183,7 +178,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -203,7 +198,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -217,7 +212,7 @@ ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -234,7 +229,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -249,7 +244,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -263,7 +258,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -277,7 +272,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -291,7 +286,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -305,7 +300,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Left over from the failed IMPORT perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -331,10 +326,12 @@ CREATE TABLE test_wl5522.t1 ( INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB - ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; + ROW_FORMAT=COMPRESSED; # Stop purge so that it doesn't remove the delete marked entries. -SET GLOBAL INNODB_PURGE_STOP_NOW=ON; +connect (purge_control,localhost,root); +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection default; # Disable change buffer merge from the master thread, additionally # enable aggressive flushing so that more changes are buffered. @@ -387,7 +384,7 @@ SELECT name FLUSH TABLES test_wl5522.t1 FOR EXPORT; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test_wl5522", "t1"); EOF @@ -404,7 +401,10 @@ SELECT name SET GLOBAL innodb_disable_background_merge=OFF; # Enable normal operation -SET GLOBAL INNODB_PURGE_RUN_NOW=ON; +connection purge_control; +COMMIT; +disconnect purge_control; +connection default; DROP TABLE test_wl5522.t1; @@ -416,14 +416,14 @@ CREATE TABLE test_wl5522.t1 ( INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB - ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; + ROW_FORMAT=COMPRESSED; SELECT c1, c2 FROM test_wl5522.t1; ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -444,7 +444,7 @@ DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -INSERT INTO test_wl5522.t1 VALUES +INSERT IGNORE INTO test_wl5522.t1 VALUES (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; @@ -459,7 +459,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; FLUSH TABLES test_wl5522.t1 FOR EXPORT; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test_wl5522", "t1"); EOF @@ -477,7 +477,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -493,7 +493,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -509,16 +509,16 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF -SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; +SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; --replace_regex /'.*t1.cfg'/'t1.cfg'/ -# Following alter is not failing -#--error ER_INTERNAL_ERROR +# Following alter is failing +--error ER_INTERNAL_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; SET SESSION debug_dbug=@saved_debug_dbug; @@ -526,7 +526,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -540,7 +540,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -556,7 +556,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -570,7 +570,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -586,7 +586,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -607,7 +607,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -623,7 +623,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -638,7 +638,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -654,7 +654,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -669,7 +669,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -685,7 +685,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -701,7 +701,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -736,11 +736,12 @@ call mtr.add_suppression("t1.ibd: Page .* at offset .* looks corrupted"); call mtr.add_suppression("but tablespace with that id or name does not exist"); call mtr.add_suppression("Failed to find tablespace for table '\"test_wl5522\".\"t1\"' in the cache"); call mtr.add_suppression("Could not find a valid tablespace file for 'test_wl5522.*t1'"); +call mtr.add_suppression("Index for table 't1' is corrupt; try to repair it"); --enable_query_log #cleanup --remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg --remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd -eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table; -eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format; +SET GLOBAL innodb_file_per_table = @file_per_table; +SET GLOBAL innodb_file_format = @file_format; diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result index d410944dd..ddafea147 100644 --- a/mysql-test/suite/maria/maria.result +++ b/mysql-test/suite/maria/maria.result @@ -1595,7 +1595,14 @@ t1 CREATE TABLE `t1` ( ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 drop table t1; create table t1 (v varchar(65535)); -ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs +Warnings: +Note 1246 Converting column 'v' from VARCHAR to TEXT +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` text +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 +drop table t1; set @save_concurrent_insert=@@concurrent_insert; set global concurrent_insert=1; create table t1 (a int) ROW_FORMAT=FIXED; diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test index df73c8d81..720e7d2ed 100644 --- a/mysql-test/suite/maria/maria.test +++ b/mysql-test/suite/maria/maria.test @@ -927,8 +927,9 @@ show create table t1; drop table t1; # ARIA specific varchar tests ---error 1118 create table t1 (v varchar(65535)); +show create table t1; +drop table t1; # # Test concurrent insert diff --git a/mysql-test/suite/mariabackup/compress_qpress.result b/mysql-test/suite/mariabackup/compress_qpress.result new file mode 100644 index 000000000..f8dfb46e4 --- /dev/null +++ b/mysql-test/suite/mariabackup/compress_qpress.result @@ -0,0 +1,15 @@ +CREATE TABLE t(i INT) ENGINE INNODB; +INSERT INTO t VALUES(1); +# xtrabackup backup +INSERT INTO t VALUES(2); +# xtrabackup prepare +t.frm.qp +t.ibd.qp +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +SELECT * FROM t; +i +1 +DROP TABLE t; diff --git a/mysql-test/suite/mariabackup/compress_qpress.test b/mysql-test/suite/mariabackup/compress_qpress.test new file mode 100644 index 000000000..f86efe44e --- /dev/null +++ b/mysql-test/suite/mariabackup/compress_qpress.test @@ -0,0 +1,24 @@ +CREATE TABLE t(i INT) ENGINE INNODB; +INSERT INTO t VALUES(1); +echo # xtrabackup backup; +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; + +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --compress --target-dir=$targetdir; +--enable_result_log + +INSERT INTO t VALUES(2); + + +echo # xtrabackup prepare; +--disable_result_log +list_files $targetdir/test *.qp; +exec $XTRABACKUP --decompress --remove-original --target-dir=$targetdir; +list_files $targetdir/test *.qp; +exec $XTRABACKUP --prepare --target-dir=$targetdir; +-- source include/restart_and_restore.inc +--enable_result_log + +SELECT * FROM t; +DROP TABLE t; +rmdir $targetdir; diff --git a/mysql-test/suite/mariabackup/data_directory.result b/mysql-test/suite/mariabackup/data_directory.result new file mode 100644 index 000000000..e7201918c --- /dev/null +++ b/mysql-test/suite/mariabackup/data_directory.result @@ -0,0 +1,13 @@ +CREATE TABLE t(a INT) ENGINE=InnoDB DATA DIRECTORY='table_data_dir'; +INSERT INTO t VALUES(1); +# xtrabackup backup +# xtrabackup prepare +DROP TABLE t; +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +SELECT * FROM t; +a +1 +DROP TABLE t; diff --git a/mysql-test/suite/mariabackup/data_directory.test b/mysql-test/suite/mariabackup/data_directory.test new file mode 100644 index 000000000..50789a34c --- /dev/null +++ b/mysql-test/suite/mariabackup/data_directory.test @@ -0,0 +1,23 @@ +let $table_data_dir=$MYSQLTEST_VARDIR/ddir; +mkdir $table_data_dir; +--replace_result $table_data_dir table_data_dir +EVAL CREATE TABLE t(a INT) ENGINE=InnoDB DATA DIRECTORY='$table_data_dir'; +INSERT INTO t VALUES(1); +echo # xtrabackup backup; +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir; +--enable_result_log +--source include/shutdown_mysqld.inc +echo # xtrabackup prepare; +--disable_result_log +exec $XTRABACKUP --prepare --target-dir=$targetdir; +--source include/start_mysqld.inc +DROP TABLE t; +rmdir $table_data_dir; +-- source include/restart_and_restore.inc +--enable_result_log +SELECT * FROM t; +DROP TABLE t; +rmdir $targetdir; +rmdir $table_data_dir; diff --git a/mysql-test/suite/mariabackup/incremental_backup.result b/mysql-test/suite/mariabackup/incremental_backup.result index eeedc751d..20d8cefbe 100644 --- a/mysql-test/suite/mariabackup/incremental_backup.result +++ b/mysql-test/suite/mariabackup/incremental_backup.result @@ -1,8 +1,14 @@ call mtr.add_suppression("InnoDB: New log files created"); -CREATE TABLE t(i INT) ENGINE INNODB; +CREATE TABLE t(i INT PRIMARY KEY) ENGINE INNODB; +BEGIN; +INSERT INTO t VALUES(2); +SET GLOBAL innodb_flush_log_at_trx_commit = 1; INSERT INTO t VALUES(1); # Create full backup , modify table, then create incremental/differential backup -INSERT INTO t VALUES(2); +BEGIN; +INSERT INTO t VALUES(0); +DELETE FROM t WHERE i=0; +COMMIT; SELECT * FROM t; i 1 diff --git a/mysql-test/suite/mariabackup/incremental_backup.test b/mysql-test/suite/mariabackup/incremental_backup.test index b92d7b323..93582f047 100644 --- a/mysql-test/suite/mariabackup/incremental_backup.test +++ b/mysql-test/suite/mariabackup/incremental_backup.test @@ -4,23 +4,31 @@ call mtr.add_suppression("InnoDB: New log files created"); let $basedir=$MYSQLTEST_VARDIR/tmp/backup; let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1; - -CREATE TABLE t(i INT) ENGINE INNODB; +CREATE TABLE t(i INT PRIMARY KEY) ENGINE INNODB; +BEGIN; +INSERT INTO t VALUES(2); +connect (con1,localhost,root,,); +SET GLOBAL innodb_flush_log_at_trx_commit = 1; INSERT INTO t VALUES(1); echo # Create full backup , modify table, then create incremental/differential backup; --disable_result_log exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir; --enable_result_log -INSERT INTO t VALUES(2); +BEGIN; +INSERT INTO t VALUES(0); +DELETE FROM t WHERE i=0; +connection default; +COMMIT; SELECT * FROM t; exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir; --disable_result_log echo # Prepare full backup, apply incremental one; exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir; -exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir ; +exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir --incremental-dir=$incremental_dir ; +disconnect con1; echo # Restore and check results; let $targetdir=$basedir; -- source include/restart_and_restore.inc diff --git a/mysql-test/suite/mariabackup/partition_datadir.opt b/mysql-test/suite/mariabackup/partition_datadir.opt new file mode 100644 index 000000000..8a3240370 --- /dev/null +++ b/mysql-test/suite/mariabackup/partition_datadir.opt @@ -0,0 +1 @@ +--partition \ No newline at end of file diff --git a/mysql-test/suite/mariabackup/partition_datadir.result b/mysql-test/suite/mariabackup/partition_datadir.result new file mode 100644 index 000000000..3fc5fe309 --- /dev/null +++ b/mysql-test/suite/mariabackup/partition_datadir.result @@ -0,0 +1,22 @@ +CREATE TABLE t(i int) +ENGINE=InnoDB +PARTITION BY RANGE (i) +(PARTITION p0 VALUES LESS THAN (100), +PARTITION P1 VALUES LESS THAN (200), +PARTITION p2 VALUES LESS THAN (300) DATA DIRECTORY = 'MYSQLTEST_VARDIR/partitdata', +PARTITION p3 VALUES LESS THAN (400) DATA DIRECTORY = 'MYSQLTEST_VARDIR/partitdata', +PARTITION p4 VALUES LESS THAN MAXVALUE); +INSERT INTO t VALUES (1), (101), (201), (301), (401); +DROP TABLE t; +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +SELECT * FROM t; +i +1 +101 +201 +301 +401 +DROP TABLE t; diff --git a/mysql-test/suite/mariabackup/partition_datadir.test b/mysql-test/suite/mariabackup/partition_datadir.test new file mode 100644 index 000000000..882b01112 --- /dev/null +++ b/mysql-test/suite/mariabackup/partition_datadir.test @@ -0,0 +1,24 @@ +let $targetdir=$MYSQLTEST_VARDIR/backup; +mkdir $targetdir; +mkdir $MYSQLTEST_VARDIR/partitdata; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval CREATE TABLE t(i int) +ENGINE=InnoDB +PARTITION BY RANGE (i) +(PARTITION p0 VALUES LESS THAN (100), + PARTITION P1 VALUES LESS THAN (200), + PARTITION p2 VALUES LESS THAN (300) DATA DIRECTORY = '$MYSQLTEST_VARDIR/partitdata', + PARTITION p3 VALUES LESS THAN (400) DATA DIRECTORY = '$MYSQLTEST_VARDIR/partitdata', + PARTITION p4 VALUES LESS THAN MAXVALUE); +INSERT INTO t VALUES (1), (101), (201), (301), (401); +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir; +exec $XTRABACKUP --prepare --target-dir=$targetdir; +DROP TABLE t; +rmdir $MYSQLTEST_VARDIR/partitdata; +--source include/restart_and_restore.inc +--enable_result_log +SELECT * FROM t; +DROP TABLE t; +rmdir $targetdir; +rmdir $MYSQLTEST_VARDIR/partitdata; diff --git a/mysql-test/suite/mariabackup/suite.pm b/mysql-test/suite/mariabackup/suite.pm index 26d5c06cd..9242bbc05 100644 --- a/mysql-test/suite/mariabackup/suite.pm +++ b/mysql-test/suite/mariabackup/suite.pm @@ -23,9 +23,13 @@ $ENV{XBSTREAM}= ::mtr_exe_maybe_exists( $ENV{INNOBACKUPEX}= "$mariabackup_exe --innobackupex"; +my $have_qpress = index(`qpress 2>&1`,"Compression") > 0; + + sub skip_combinations { my %skip; $skip{'include/have_file_key_management.inc'} = 'needs file_key_management plugin' unless $ENV{FILE_KEY_MANAGEMENT_SO}; + $skip{'compress_qpress.test'}= 'needs qpress executable in PATH' unless $have_qpress; %skip; } diff --git a/mysql-test/suite/parts/r/partition_alter_maria.result b/mysql-test/suite/parts/r/partition_alter_maria.result new file mode 100644 index 000000000..6343566e4 --- /dev/null +++ b/mysql-test/suite/parts/r/partition_alter_maria.result @@ -0,0 +1,18 @@ +create table t1 ( +pk bigint not null auto_increment, +dt datetime default null, +unique (pk, dt) +) engine=aria row_format=dynamic +partition by range columns(dt) ( +partition `p20171231` values less than ('2017-12-31'), +partition `p20181231` values less than ('2018-12-31') +); +insert into t1 values (1,'2017-09-28 15:12:00'); +select * from t1; +pk dt +1 2017-09-28 15:12:00 +alter table t1 drop partition p20181231; +select * from t1; +pk dt +1 2017-09-28 15:12:00 +drop table t1; diff --git a/mysql-test/suite/parts/t/partition_alter_maria.test b/mysql-test/suite/parts/t/partition_alter_maria.test new file mode 100644 index 000000000..db2495911 --- /dev/null +++ b/mysql-test/suite/parts/t/partition_alter_maria.test @@ -0,0 +1,18 @@ +# +# MDEV-13937 Aria engine: Internal Error 160 after partition handling +# +source include/have_partition.inc; +create table t1 ( + pk bigint not null auto_increment, + dt datetime default null, + unique (pk, dt) +) engine=aria row_format=dynamic + partition by range columns(dt) ( + partition `p20171231` values less than ('2017-12-31'), + partition `p20181231` values less than ('2018-12-31') +); +insert into t1 values (1,'2017-09-28 15:12:00'); +select * from t1; +alter table t1 drop partition p20181231; +select * from t1; +drop table t1; diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result index ceb75176b..3971504b2 100644 --- a/mysql-test/suite/plugins/r/server_audit.result +++ b/mysql-test/suite/plugins/r/server_audit.result @@ -47,6 +47,7 @@ alter table t1 rename renamed_t1; set global server_audit_events='connect,query'; select 1, 2, +# comment 3; 1 2 3 1 2 3 @@ -161,7 +162,9 @@ id 2 CREATE USER u1 IDENTIFIED BY 'pwd-123'; GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321"; -SET PASSWORD FOR u1 = PASSWORD('pwd 098'); +SET PASSWORD +# comment +FOR u1 = PASSWORD('pwd 098'); SET PASSWORD FOR u1=; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 CREATE USER u3 IDENTIFIED BY ''; @@ -253,7 +256,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats, TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1, TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0 -TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1, 2, 3',0 +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1,\n2,\n# comment\n3',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t_doesnt_exist',ID @@ -336,7 +339,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*! select 2*/',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*comment*/ select 2',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0 -TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0 +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD \n# comment\nFOR u1 = PASSWORD(*****)',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1=',ID TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0 diff --git a/mysql-test/suite/plugins/r/thread_pool_server_audit.result b/mysql-test/suite/plugins/r/thread_pool_server_audit.result index ceb75176b..912cef276 100644 --- a/mysql-test/suite/plugins/r/thread_pool_server_audit.result +++ b/mysql-test/suite/plugins/r/thread_pool_server_audit.result @@ -47,6 +47,7 @@ alter table t1 rename renamed_t1; set global server_audit_events='connect,query'; select 1, 2, +# comment 3; 1 2 3 1 2 3 @@ -161,7 +162,9 @@ id 2 CREATE USER u1 IDENTIFIED BY 'pwd-123'; GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321"; -SET PASSWORD FOR u1 = PASSWORD('pwd 098'); +SET PASSWORD +# comment +FOR u1 = PASSWORD('pwd 098'); SET PASSWORD FOR u1=; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 CREATE USER u3 IDENTIFIED BY ''; @@ -253,7 +256,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats, TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1, TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0 -TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1, 2, 3',0 +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1,\n2,\n# comment\n3',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t_doesnt_exist',ID @@ -336,7 +339,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*! select 2*/',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*comment*/ select 2',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0 -TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0 +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD\n# comment\nFOR u1 = PASSWORD(*****)',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1=',ID TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0 diff --git a/mysql-test/suite/plugins/t/server_audit.test b/mysql-test/suite/plugins/t/server_audit.test index 52428909c..9be0d5556 100644 --- a/mysql-test/suite/plugins/t/server_audit.test +++ b/mysql-test/suite/plugins/t/server_audit.test @@ -38,6 +38,7 @@ alter table t1 rename renamed_t1; set global server_audit_events='connect,query'; select 1, 2, +# comment 3; insert into t2 values (1), (2); select * from t2; @@ -106,7 +107,9 @@ insert into t1 values (1), (2); select * from t1; CREATE USER u1 IDENTIFIED BY 'pwd-123'; GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321"; -SET PASSWORD FOR u1 = PASSWORD('pwd 098'); +SET PASSWORD +# comment +FOR u1 = PASSWORD('pwd 098'); --error 1064 SET PASSWORD FOR u1=; CREATE USER u3 IDENTIFIED BY ''; diff --git a/mysql-test/suite/plugins/t/thread_pool_server_audit.test b/mysql-test/suite/plugins/t/thread_pool_server_audit.test index 626d4136c..724000c97 100644 --- a/mysql-test/suite/plugins/t/thread_pool_server_audit.test +++ b/mysql-test/suite/plugins/t/thread_pool_server_audit.test @@ -38,6 +38,7 @@ alter table t1 rename renamed_t1; set global server_audit_events='connect,query'; select 1, 2, +# comment 3; insert into t2 values (1), (2); select * from t2; @@ -106,7 +107,9 @@ insert into t1 values (1), (2); select * from t1; CREATE USER u1 IDENTIFIED BY 'pwd-123'; GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321"; -SET PASSWORD FOR u1 = PASSWORD('pwd 098'); +SET PASSWORD +# comment +FOR u1 = PASSWORD('pwd 098'); --error 1064 SET PASSWORD FOR u1=; CREATE USER u3 IDENTIFIED BY ''; diff --git a/mysql-test/suite/roles/definer.result b/mysql-test/suite/roles/definer.result index 7ced62556..f2fca91f0 100644 --- a/mysql-test/suite/roles/definer.result +++ b/mysql-test/suite/roles/definer.result @@ -626,3 +626,117 @@ show grants for utest; Grants for utest GRANT SELECT ON *.* TO 'utest' drop role utest; +# +# MDEV-13676: Field "create Procedure" is NULL, even if the the user +# has role which is the definer. (SHOW CREATE PROCEDURE) +# +create database rtest; +create role r1; +create role r2; +create role r3; +grant all privileges on rtest.* to r1; +create user user1; +grant r1 to user1; +grant r1 to r2; +grant r2 to user1; +grant r3 to user1; +set role r2; +use rtest; +CREATE DEFINER=current_role() PROCEDURE user1_proc() SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END;// +set role r2; +show create procedure user1_proc; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +user1_proc NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`r2` PROCEDURE `user1_proc`() + SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END latin1 latin1_swedish_ci latin1_swedish_ci +# +# Currently one can not use as definer any role except CURRENT_ROLE +# +CREATE DEFINER='r1' PROCEDURE user1_proc2() SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END;// +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation +set role r1; +CREATE DEFINER='r1' PROCEDURE user1_proc2() SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END;// +show create procedure user1_proc2; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +user1_proc2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`r1` PROCEDURE `user1_proc2`() + SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END latin1 latin1_swedish_ci latin1_swedish_ci +# +# Test to see if the user can still see the procedure code if the +# role that owns it is granted to him indirectly. +# +set role r2; +show create procedure user1_proc2; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +user1_proc2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`r1` PROCEDURE `user1_proc2`() + SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END latin1 latin1_swedish_ci latin1_swedish_ci +# +# One should not be able to see the procedure code if the role that owns +# the procedure is not set by the user or is not in the subgraph of the +# currently active role. +# +set role r3; +show create procedure user1_proc2; +ERROR 42000: PROCEDURE user1_proc2 does not exist +use rtest; +# +# Try a few edge cases, with usernames identical to role name; +# +create user user_like_role; +create user foo; +create role user_like_role; +grant select on rtest.* to user_like_role; +grant select on rtest.* to foo; +grant select on rtest.* to user_like_role@'%'; +grant user_like_role to foo; +# +# Here we have a procedure that is owned by user_like_role USER +# We don't want user_like_role ROLE to have access to its code. +# +CREATE DEFINER=`user_like_role`@`%` PROCEDURE sensitive_proc() SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END;// +use rtest; +show create procedure sensitive_proc; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sensitive_proc NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user_like_role`@`%` PROCEDURE `sensitive_proc`() + SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END latin1 latin1_swedish_ci latin1_swedish_ci +set role user_like_role; +use rtest; +# +# Foo has the set rolename identical to the procedure's definer's username. +# Foo should not have access to this procedure. +# +show create procedure sensitive_proc; +ERROR 42000: PROCEDURE sensitive_proc does not exist +drop role r1; +drop role r2; +drop role r3; +drop role user_like_role; +drop user user1; +drop user foo; +drop user user_like_role; +drop procedure user1_proc; +drop procedure user1_proc2; +drop procedure sensitive_proc; +drop database rtest; diff --git a/mysql-test/suite/roles/definer.test b/mysql-test/suite/roles/definer.test index 3de4a6922..89a1c90ee 100644 --- a/mysql-test/suite/roles/definer.test +++ b/mysql-test/suite/roles/definer.test @@ -332,3 +332,125 @@ execute stmt1; show grants for utest; drop role utest; +--echo # +--echo # MDEV-13676: Field "create Procedure" is NULL, even if the the user +--echo # has role which is the definer. (SHOW CREATE PROCEDURE) +--echo # + +create database rtest; +create role r1; +create role r2; +create role r3; +grant all privileges on rtest.* to r1; + +create user user1; +grant r1 to user1; +grant r1 to r2; +grant r2 to user1; +grant r3 to user1; + +connect (user1, localhost,user1,,,,,); +set role r2; +use rtest; + +DELIMITER //; +CREATE DEFINER=current_role() PROCEDURE user1_proc() SQL SECURITY INVOKER + BEGIN + SELECT NOW(), VERSION(); + END;// +DELIMITER ;// + +set role r2; +show create procedure user1_proc; + +--echo # +--echo # Currently one can not use as definer any role except CURRENT_ROLE +--echo # +DELIMITER //; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +CREATE DEFINER='r1' PROCEDURE user1_proc2() SQL SECURITY INVOKER + BEGIN + SELECT NOW(), VERSION(); + END;// +DELIMITER ;// + +set role r1; +DELIMITER //; +CREATE DEFINER='r1' PROCEDURE user1_proc2() SQL SECURITY INVOKER + BEGIN + SELECT NOW(), VERSION(); + END;// +DELIMITER ;// + +show create procedure user1_proc2; +--echo # +--echo # Test to see if the user can still see the procedure code if the +--echo # role that owns it is granted to him indirectly. +--echo # +set role r2; +show create procedure user1_proc2; + +--echo # +--echo # One should not be able to see the procedure code if the role that owns +--echo # the procedure is not set by the user or is not in the subgraph of the +--echo # currently active role. +--echo # +set role r3; +--error ER_SP_DOES_NOT_EXIST +show create procedure user1_proc2; + +connection default; + +use rtest; + +--echo # +--echo # Try a few edge cases, with usernames identical to role name; +--echo # + +create user user_like_role; +create user foo; +create role user_like_role; +grant select on rtest.* to user_like_role; +grant select on rtest.* to foo; +grant select on rtest.* to user_like_role@'%'; + +grant user_like_role to foo; + +--echo # +--echo # Here we have a procedure that is owned by user_like_role USER +--echo # We don't want user_like_role ROLE to have access to its code. +--echo # +DELIMITER //; +CREATE DEFINER=`user_like_role`@`%` PROCEDURE sensitive_proc() SQL SECURITY INVOKER + BEGIN + SELECT NOW(), VERSION(); + END;// +DELIMITER ;// + +connect (user_like_role, localhost, user_like_role,,,,,); +use rtest; +show create procedure sensitive_proc; + +connect (foo, localhost, foo,,,,,); +set role user_like_role; +use rtest; + +--echo # +--echo # Foo has the set rolename identical to the procedure's definer's username. +--echo # Foo should not have access to this procedure. +--echo # +--error ER_SP_DOES_NOT_EXIST +show create procedure sensitive_proc; + +connection default; +drop role r1; +drop role r2; +drop role r3; +drop role user_like_role; +drop user user1; +drop user foo; +drop user user_like_role; +drop procedure user1_proc; +drop procedure user1_proc2; +drop procedure sensitive_proc; +drop database rtest; diff --git a/mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc b/mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc index 4cf3914e6..1fea4ca5b 100644 --- a/mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc +++ b/mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc @@ -97,3 +97,16 @@ CREATE TABLE t1 (a INT); ALTER TABLE t1 ADD b TIMESTAMP; SHOW CREATE TABLE t1; DROP TABLE t1; + +--echo # +--echo # MDEV-10802 TIMESTAMP NOT NULL field with explicit_defaults_for_timestamp and NO_ZERO_DATE shouldn't throw error +--echo # + +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30'); +SET sql_mode='ANSI,NO_ZERO_DATE'; +CREATE TABLE t1 (a TIMESTAMP NOT NULL); +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; +SET timestamp=DEFAULT; diff --git a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result index cdf612e6d..61a4eb8a9 100644 --- a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result +++ b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result @@ -173,3 +173,16 @@ t1 CREATE TABLE `t1` ( `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +# +# MDEV-10802 TIMESTAMP NOT NULL field with explicit_defaults_for_timestamp and NO_ZERO_DATE shouldn't throw error +# +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30'); +SET sql_mode='ANSI,NO_ZERO_DATE'; +CREATE TABLE t1 (a TIMESTAMP NOT NULL); +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +a +2001-01-01 10:20:30 +DROP TABLE t1; +SET sql_mode=DEFAULT; +SET timestamp=DEFAULT; diff --git a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result index 1c42da57b..fb820dc16 100644 --- a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result +++ b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result @@ -178,3 +178,18 @@ t1 CREATE TABLE `t1` ( `b` timestamp NULL DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +# +# MDEV-10802 TIMESTAMP NOT NULL field with explicit_defaults_for_timestamp and NO_ZERO_DATE shouldn't throw error +# +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30'); +SET sql_mode='ANSI,NO_ZERO_DATE'; +CREATE TABLE t1 (a TIMESTAMP NOT NULL); +INSERT INTO t1 VALUES (); +Warnings: +Warning 1364 Field 'a' doesn't have a default value +SELECT * FROM t1; +a +0000-00-00 00:00:00 +DROP TABLE t1; +SET sql_mode=DEFAULT; +SET timestamp=DEFAULT; diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_now_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_now_basic.result index 9c3a37f89..522d5731a 100644 --- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_now_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_now_basic.result @@ -1,7 +1,8 @@ -SET @orig = @@global.innodb_buffer_pool_dump_now; -SELECT @orig; -@orig +SELECT @@global.innodb_buffer_pool_dump_now; +@@global.innodb_buffer_pool_dump_now 0 +SELECT variable_value INTO @old_dump_status FROM information_schema.global_status +WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; SET GLOBAL innodb_buffer_pool_dump_now = ON; SELECT @@global.innodb_buffer_pool_dump_now; @@global.innodb_buffer_pool_dump_now diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result index 51c72cfe7..70fcdd3cb 100644 --- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result @@ -2,7 +2,8 @@ SET @orig = @@global.innodb_buffer_pool_dump_pct; SELECT @orig; @orig 100 -SET GLOBAL innodb_buffer_pool_dump_pct=3, GLOBAL innodb_buffer_pool_dump_now = ON; +SET GLOBAL innodb_buffer_pool_dump_pct=3; +# Do the dump SET GLOBAL innodb_buffer_pool_dump_pct=0; SELECT @@global.innodb_buffer_pool_dump_pct; @@global.innodb_buffer_pool_dump_pct diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.result index 3185d1ca1..eebed4d0f 100644 --- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.result @@ -1,8 +1,6 @@ -SET @orig = @@global.innodb_buffer_pool_load_now; -SELECT @orig; -@orig +SELECT @@global.innodb_buffer_pool_load_now; +@@global.innodb_buffer_pool_load_now 0 -SET GLOBAL innodb_buffer_pool_dump_now = ON; SET GLOBAL innodb_buffer_pool_load_now = ON; SELECT variable_value FROM information_schema.global_status diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test index 0bae34742..8c5f8fa7b 100644 --- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test @@ -5,8 +5,31 @@ -- source include/have_innodb.inc # Check the default value -SET @orig = @@global.innodb_buffer_pool_dump_now; -SELECT @orig; +SELECT @@global.innodb_buffer_pool_dump_now; + +-- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)` +-- error 0,1 +-- remove_file $file + +SELECT variable_value INTO @old_dump_status FROM information_schema.global_status + WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; + +# A previous test could have run buffer pool dump already; +# in this case we want to make sure that the current time is different +# from the timestamp in the status variable. +# We should have had a smart wait condition here, like the commented one below, +# let $wait_condition = +# SELECT TRIM(SUBSTR('$old_status', -8)) != DATE_FORMAT(CURTIME(), '%k:%i:%s'); +# -- source include/wait_condition.inc + +# ... but we can't because of MDEV-9867, so there will be just sleep instead. +# And it might be not enough to sleep one second, so we'll have to sleep two. + +if (`SELECT variable_value LIKE '%completed at%' FROM information_schema.global_status + WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'`) +{ + -- sleep 2 +} # Do the dump SET GLOBAL innodb_buffer_pool_dump_now = ON; @@ -15,11 +38,11 @@ SELECT @@global.innodb_buffer_pool_dump_now; # Wait for the dump to complete let $wait_condition = - SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at ' + SELECT variable_value != @old_dump_status + AND SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at ' FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; -- source include/wait_condition.inc # Confirm that the dump file has been created --- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)` -- file_exists $file diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test index d2f5cb4a0..1cf6775e0 100644 --- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test @@ -8,19 +8,15 @@ SET @orig = @@global.innodb_buffer_pool_dump_pct; SELECT @orig; -# Do the dump -SET GLOBAL innodb_buffer_pool_dump_pct=3, GLOBAL innodb_buffer_pool_dump_now = ON; +SET GLOBAL innodb_buffer_pool_dump_pct=3; -# Wait for the dump to complete -let $wait_condition = - SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at ' - FROM information_schema.global_status - WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; --- source include/wait_condition.inc +--echo # Do the dump -# Confirm that the dump file has been created --- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)` --- file_exists $file +--disable_query_log +--disable_result_log +--source innodb_buffer_pool_dump_now_basic.test +--enable_result_log +--enable_query_log --disable_warnings SET GLOBAL innodb_buffer_pool_dump_pct=0; diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.opt b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.opt new file mode 100644 index 000000000..e462be3c3 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.opt @@ -0,0 +1 @@ +--innodb-buffer-pool-load-at-startup=off diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test index a04099018..abb78ce52 100644 --- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test @@ -5,42 +5,22 @@ -- source include/have_innodb.inc # Check the default value -SET @orig = @@global.innodb_buffer_pool_load_now; -SELECT @orig; +SELECT @@global.innodb_buffer_pool_load_now; -let $old_status= `SELECT variable_value FROM information_schema.global_status - WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'`; +# Make sure there is a dump file to load -# A previous test could have run buffer pool dump already; -# in this case we want to make sure that the current time is different -# from the timestamp in the status variable. -# We should have had a smart wait condition here, like the commented one below, -# but we can't because of MDEV-9867, so there will be just sleep instead. -# And it might be not enough to sleep one second, so we'll have to sleep two. -# let $wait_condition = -# SELECT TRIM(SUBSTR('$old_status', -8)) != DATE_FORMAT(CURTIME(), '%k:%i:%s'); -# -- source include/wait_condition.inc - -if (`SELECT variable_value LIKE '%dump completed at%' FROM information_schema.global_status - WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'`) -{ - -- sleep 2 -} - -# Do the dump -SET GLOBAL innodb_buffer_pool_dump_now = ON; - -# Wait for the dump to complete -let $wait_condition = - SELECT variable_value != '$old_status' - AND SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at ' - FROM information_schema.global_status - WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; --- source include/wait_condition.inc - -# Confirm the file is really created -- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)` +-- error 0,1 -- file_exists $file +if ($errno) +{ + # Dump file does not exist, get it created + --disable_query_log + --disable_result_log + --source innodb_buffer_pool_dump_now_basic.test + --enable_result_log + --enable_query_log +} # Load the dump SET GLOBAL innodb_buffer_pool_load_now = ON; diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result index 659bc00c2..179d1b54c 100644 --- a/mysql-test/suite/vcol/r/vcol_misc.result +++ b/mysql-test/suite/vcol/r/vcol_misc.result @@ -338,7 +338,26 @@ tsv timestamp as (adddate(ts, interval 1 day)) virtual drop table t1; set sql_mode=default; # -# Start of 10.1 tests +# MDEV-11819 NO_ZERO_IN_DATE: Incorrect generated column value +# +SET sql_mode='NO_ZERO_IN_DATE'; +CREATE TABLE t1 +( +a datetime DEFAULT NULL, +b datetime DEFAULT NULL, +c time GENERATED ALWAYS AS (timediff(`a`,`b`)) VIRTUAL +); +INSERT INTO t1 VALUES ('2008-12-31 23:59:59.000001','2008-12-30 01:01:01.000002',DEFAULT); +SELECT * FROM t1; +a b c +2008-12-31 23:59:59 2008-12-30 01:01:01 46:58:58 +DROP TABLE t1; +SET sql_mode=DEFAULT; +# +# End of 5.5 tests +# +# +# End of 10.0 tests # # # MDEV-8441 Bad SHOW CREATE TABLE output for a table with a virtual column diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test index d9c1f6499..1eed47269 100644 --- a/mysql-test/suite/vcol/t/vcol_misc.test +++ b/mysql-test/suite/vcol/t/vcol_misc.test @@ -302,9 +302,28 @@ create table t1 ( drop table t1; set sql_mode=default; +--echo # +--echo # MDEV-11819 NO_ZERO_IN_DATE: Incorrect generated column value +--echo # + +SET sql_mode='NO_ZERO_IN_DATE'; +CREATE TABLE t1 +( + a datetime DEFAULT NULL, + b datetime DEFAULT NULL, + c time GENERATED ALWAYS AS (timediff(`a`,`b`)) VIRTUAL +); +INSERT INTO t1 VALUES ('2008-12-31 23:59:59.000001','2008-12-30 01:01:01.000002',DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; --echo # ---echo # Start of 10.1 tests +--echo # End of 5.5 tests +--echo # + +--echo # +--echo # End of 10.0 tests --echo # --echo # @@ -328,7 +347,6 @@ SELECT COLUMN_GET(@aaa, 'price' AS DECIMAL) aaa; SELECT COLUMN_GET(@aaa, 'price' AS INT) aaa; SELECT COLUMN_GET(@aaa, 'price' AS DOUBLE) aaa; - --echo # --echo # End of 10.1 tests --echo # diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index eef6f17ef..5cb33516e 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -1254,6 +1254,48 @@ execute stmt1; deallocate prepare stmt1; drop table t2; +--echo # +--echo # MDEV-8960 Can't refer the same column twice in one ALTER TABLE +--echo # + +CREATE TABLE t1 ( + `a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; + +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, +ALTER COLUMN `consultant_id` DROP DEFAULT; + +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 ( + `a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; + +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, +ALTER COLUMN `consultant_id` SET DEFAULT 2; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 ( + `a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; + +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, +ALTER COLUMN `consultant_id` DROP DEFAULT; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 ( + `a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; + +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, +ALTER COLUMN `consultant_id` DROP DEFAULT, +MODIFY COLUMN `consultant_id` BIGINT; +SHOW CREATE TABLE t1; +DROP TABLE t1; + # # Test of ALTER TABLE IF [NOT] EXISTS # @@ -1768,49 +1810,7 @@ SHOW CREATE TABLE t1; DROP TABLE t1; --echo # ---echo # MDEV-8960 Can't refer the same column twice in one ALTER TABLE ---echo # - -CREATE TABLE t1 ( - `a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; - -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, -ALTER COLUMN `consultant_id` DROP DEFAULT; - -SHOW CREATE TABLE t1; -DROP TABLE t1; - -CREATE TABLE t1 ( - `a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; - -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, -ALTER COLUMN `consultant_id` SET DEFAULT 2; -SHOW CREATE TABLE t1; -DROP TABLE t1; - -CREATE TABLE t1 ( - `a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; - -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, -ALTER COLUMN `consultant_id` DROP DEFAULT; -SHOW CREATE TABLE t1; -DROP TABLE t1; - -CREATE TABLE t1 ( - `a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; - -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, -ALTER COLUMN `consultant_id` DROP DEFAULT, -MODIFY COLUMN `consultant_id` BIGINT; -SHOW CREATE TABLE t1; -DROP TABLE t1; - ---echo # ---echo # Start of 10.1 tests +--echo # End of 10.0 tests --echo # --echo # @@ -1830,3 +1830,7 @@ CREATE INDEX i1 ON t1(a) COMMENT 'comment1'; ALTER TABLE t1 DROP INDEX i1, ADD INDEX i1(a) COMMENT 'comment2'; SHOW CREATE TABLE t1; DROP TABLE t1; + +--echo # +--echo # End of 10.1 tests +--echo # diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test index 7cc74c52b..702592374 100644 --- a/mysql-test/t/case.test +++ b/mysql-test/t/case.test @@ -174,6 +174,18 @@ drop table t1, t2; --echo End of 5.0 tests +--echo # +--echo # Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE +--echo # (SIG 6 -STRINGS/CTYPE-UTF8.C:5151) +--echo # + +set @@sql_mode=''; +CREATE TABLE t1(c1 SET('','')CHARACTER SET ucs2); +INSERT INTO t1 VALUES(990101.102); +SELECT COALESCE(c1)FROM t1 ORDER BY 1; +DROP TABLE t1; +set @@sql_mode=default; + # # lp:1001510 # Bug #11764313 57135: CRASH IN ITEM_FUNC_CASE::FIND_ITEM WITH CASE WHEN diff --git a/mysql-test/t/ctype_gbk.test b/mysql-test/t/ctype_gbk.test index 07e73cdf7..022d4a370 100644 --- a/mysql-test/t/ctype_gbk.test +++ b/mysql-test/t/ctype_gbk.test @@ -199,6 +199,20 @@ let $ctype_unescape_combinations=selected; SET NAMES gbk; --source include/ctype_E05C.inc +--echo # +--echo # MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant +--echo # + +SET NAMES latin1; +CREATE TABLE t1 (a TEXT CHARACTER SET gbk); +INSERT INTO t1 VALUES (0xEE5D); +SELECT a<>0xEE5D AS a FROM t1; +CREATE VIEW v1 AS SELECT a<>0xEE5D AS a FROM t1; +SHOW CREATE VIEW v1; +SELECT * FROM v1; +DROP VIEW v1; +DROP TABLE t1; + --echo # --echo # End of 10.0 tests diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test index a30c7ae9a..1ee48eed1 100644 --- a/mysql-test/t/ctype_latin1.test +++ b/mysql-test/t/ctype_latin1.test @@ -245,6 +245,22 @@ DROP TABLE t1; --echo # SELECT _latin1 0x7E, _latin1 X'7E', _latin1 B'01111110'; + +--echo # +--echo # MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant +--echo # + +SET NAMES latin1; +CREATE TABLE t1 (a TEXT CHARACTER SET latin1); +INSERT INTO t1 VALUES (0xC0); +SELECT a<>0xEE5D AS a FROM t1; +CREATE VIEW v1 AS SELECT a<>0xC0 AS a FROM t1; +SHOW CREATE VIEW v1; +SELECT * FROM v1; +DROP VIEW v1; +DROP TABLE t1; + + --echo # --echo # End of 10.0 tests --echo # diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test index 316b81f69..e21cd1f00 100644 --- a/mysql-test/t/ctype_ucs.test +++ b/mysql-test/t/ctype_ucs.test @@ -825,6 +825,29 @@ SELECT @@sql_mode; SET sql_mode=DEFAULT; SET NAMES utf8; +--echo # +--echo # MDEV-13972 crash in Item_func_sec_to_time::get_date +--echo # + +SELECT SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2)); + +--echo # +--echo # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +--echo # + +CREATE TABLE t1 (c1 VARCHAR(32766) CHARACTER SET ucs2); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(32767) CHARACTER SET ucs2); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(32768) CHARACTER SET ucs2); +DESCRIBE t1; +DROP TABLE t1; + + --echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/ctype_utf32.test b/mysql-test/t/ctype_utf32.test index 96e9ecdd8..3bef1524e 100644 --- a/mysql-test/t/ctype_utf32.test +++ b/mysql-test/t/ctype_utf32.test @@ -903,6 +903,19 @@ SELECT @@sql_mode; SET sql_mode=DEFAULT; SET NAMES utf8; +--echo # +--echo # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +--echo # + +CREATE TABLE t1 (c1 VARCHAR(16383) CHARACTER SET utf32); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(16384) CHARACTER SET utf32); +DESCRIBE t1; +DROP TABLE t1; + + --echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index e6792922b..d88ce2aa4 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -1715,6 +1715,22 @@ SELECT CHAR(i USING utf8) FROM t1; SET sql_mode=DEFAULT; DROP TABLE t1; +--echo # +--echo # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +--echo # + +CREATE TABLE t1 (c1 VARCHAR(21844) CHARACTER SET utf8); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(21845) CHARACTER SET utf8); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(21846) CHARACTER SET utf8); +DESCRIBE t1; +DROP TABLE t1; + --echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/delete_returning.test b/mysql-test/t/delete_returning.test index 3790d0905..4448a6bcc 100644 --- a/mysql-test/t/delete_returning.test +++ b/mysql-test/t/delete_returning.test @@ -155,3 +155,18 @@ SELECT * FROM t1; DROP PROCEDURE p1; DROP TABLE t1; +--echo # +--echo # MDEV-13776: DELETE ... RETURNING with sql_mode='ONLY_FULL_GROUP_BY' +--echo # + +set @sql_mode_save= @@sql_mode; +set sql_mode='ONLY_FULL_GROUP_BY'; + +CREATE TABLE t1 (id INT); +INSERT INTO t1 VALUE(1),(2),(3); + +DELETE FROM t1 WHERE id > 2 RETURNING *; + +set sql_mode=@sql_mode_save; + +DROP TABLE t1; diff --git a/mysql-test/t/delimiter_case_mdev_10728.sql b/mysql-test/t/delimiter_case_mdev_10728.sql new file mode 100644 index 000000000..72a1dcd9a --- /dev/null +++ b/mysql-test/t/delimiter_case_mdev_10728.sql @@ -0,0 +1,3 @@ +DeLiMiTeR A; +SELECT 1 A; +delimiter ; diff --git a/mysql-test/t/delimiter_command_case_sensitivity.test b/mysql-test/t/delimiter_command_case_sensitivity.test new file mode 100644 index 000000000..11d1cf75a --- /dev/null +++ b/mysql-test/t/delimiter_command_case_sensitivity.test @@ -0,0 +1,4 @@ +source include/not_embedded.inc; + +# MDEV-10728 +--exec $MYSQL --default-character-set=binary < "t/delimiter_case_mdev_10728.sql" diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test index 9e848aa18..8a1af6ef8 100644 --- a/mysql-test/t/func_in.test +++ b/mysql-test/t/func_in.test @@ -605,11 +605,20 @@ EXECUTE s; DROP TABLE t1; +--echo # --echo # End of 5.3 tests +--echo # +# +# Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) +# +create table t1 (a int); +insert t1 values (1),(2),(3); +select * from t1 where 1 in (a, name_const('a', null)); +drop table t1; --echo # ---echo # Start of 10.0 tests +--echo # End of 5.5 tests --echo # --echo # @@ -626,7 +635,7 @@ SELECT * FROM t1 WHERE b NOT IN (NULL, '', 'A'); DROP TABLE t1; --echo # ---echo # Start of 10.1 tests +--echo # End of 10.0 tests --echo # --echo # diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index 497ebf44e..ffb7838ee 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -1118,3 +1118,19 @@ SELECT COERCIBILITY(NAME_CONST('name',TIME'00:00:00')); SELECT COERCIBILITY(NAME_CONST('name',15)); SELECT CONCAT(NAME_CONST('name',15),'오'); SET NAMES latin1; + +--echo # +--echo # MDEV-14116 INET6_NTOA output is set as null to varchar(39) variable +--echo # + +DELIMITER $$; +CREATE PROCEDURE p1() +BEGIN + DECLARE ip_full_addr varchar(39) DEFAULT ""; + SELECT INET6_NTOA(UNHEX('20000000000000000000000000000000')) into ip_full_addr; + SELECT ip_full_addr; +END; +$$ +DELIMITER ;$$ +CALL p1(); +DROP PROCEDURE p1; diff --git a/mysql-test/t/func_regexp_pcre.test b/mysql-test/t/func_regexp_pcre.test index cf83db794..83a17e168 100644 --- a/mysql-test/t/func_regexp_pcre.test +++ b/mysql-test/t/func_regexp_pcre.test @@ -434,19 +434,19 @@ SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral, # # MDEV-13173 An RLIKE that previously worked on 10.0 now returns "Got error 'pcre_exec: recursion limit of 100 exceeded' from regexp" # -SELECT CONCAT(REPEAT('100,',133),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; --replace_regex /[0-9]+ exceeded/NUM exceeded/ SELECT CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; -SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); --replace_regex /[0-9]+ exceeded/NUM exceeded/ SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); -SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); --replace_regex /[0-9]+ exceeded/NUM exceeded/ SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); -SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); --replace_regex /[0-9]+ exceeded/NUM exceeded/ SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 5cfb7f7d0..bc553e6f0 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1677,9 +1677,33 @@ DROP TABLE t1; --echo # SELECT 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2; +--echo # +--echo # MDEV-11819 NO_ZERO_IN_DATE: Incorrect generated column value +--echo # + +SET sql_mode='NO_ZERO_IN_DATE'; +CREATE TABLE t1 (a TIME(6)); +INSERT INTO t1 SELECT timediff(timestamp'2008-12-31 23:59:59.000001',timestamp'2008-12-30 01:01:01.000002'); +SELECT * FROM t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; + + +--echo # +--echo # MDEV-13972 crash in Item_func_sec_to_time::get_date +--echo # + +# The below query can return warning sporadically +--disable_warnings +DO TO_DAYS(SEC_TO_TIME(TIME(CEILING(UUID())))); +--enable_warnings + +DO TO_DAYS(SEC_TO_TIME(MAKEDATE('',RAND(~(''))))); +SELECT SEC_TO_TIME(MAKEDATE(0,RAND(~0))); + --echo # ---echo # Start of 10.0 tests +--echo # End of 5.5 tests --echo # --echo # diff --git a/mysql-test/t/gis-precise.test b/mysql-test/t/gis-precise.test index 5e57569a9..7391b2114 100644 --- a/mysql-test/t/gis-precise.test +++ b/mysql-test/t/gis-precise.test @@ -362,5 +362,24 @@ select ST_Touches(ST_LineFromText('LINESTRING(0 0,5 5)'),ST_PointFromText('POINT select ST_Touches(ST_PolygonFromText('POLYGON((0 0,0 5,5 5,5 0,0 0))'),ST_PointFromText('POINT(0 0)')); select ST_Touches(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)')); +# MDEV-12705 10.1.18-MariaDB-1~jessie - mysqld got signal 11. +SELECT ST_RELATE( + ST_DIFFERENCE( + GEOMETRYFROMTEXT(' + MULTILINESTRING( + ( 12841 36140, 8005 31007, 26555 31075, 52765 41191, + 28978 6548, 45720 32057, 53345 3221 ), + ( 8304 59107, 25233 31592, 40502 25303, 8205 42940 ), + ( 7829 7305, 58841 56759, 64115 8512, 37562 54145, 2210 14701 ), + ( 20379 2805, 40807 27770, 28147 14883, 26439 29383, 55663 5086 ), + ( 35944 64702, 14433 23728, 49317 26241, 790 16941 ) + ) + '), + GEOMETRYFROMTEXT('POINT(46061 13545)') + ), + GEOMETRYFROMTEXT('POINT(4599 60359)'), + 'F*FFFF**F' + ) as relate_res; + --source include/gis_debug.inc diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 5b0e29108..5b3fa7b65 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1910,3 +1910,29 @@ disconnect con1; --source include/wait_until_count_sessions.inc set global sql_mode=default; + +USE test; + +--echo # +--echo # End of 10.0 tests +--echo # + + +--echo # +--echo # Start of 10.1 tests +--echo # + + +--echo # +--echo # MDEV-13242 Wrong results for queries with row constructors and information_schema +--echo # + +CREATE TABLE tt1(c1 INT); +CREATE TABLE tt2(c2 INT); +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (('tt1', 'c1')); +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (('tt2', 'c2')); +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (('tt1','c1'),('tt2', 'c2')); +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (SELECT 'tt1','c1' FROM dual UNION SELECT 'tt2', 'c2' FROM dual); +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name='tt1' AND column_name='c1') OR (table_name='tt2' AND column_name='c2'); +SELECT column_name FROM information_schema.columns WHERE (table_name, column_name) IN (('tt1','c1'),('tt2', 'c2')) ORDER BY column_name; +DROP TABLE tt1, tt2; diff --git a/mysql-test/t/mdev13607.test b/mysql-test/t/mdev13607.test new file mode 100644 index 000000000..45fdb0a74 --- /dev/null +++ b/mysql-test/t/mdev13607.test @@ -0,0 +1,60 @@ +--echo # +--echo # Bug mdev-13607: overflow of current_record_count +--echo # + +--source include/have_innodb.inc + +CREATE TABLE t1 (id INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES +(1),(2),(3),(4),(5),(6),(7),(8),(9),(10), +(11),(12),(13),(14),(15),(16),(17),(18),(19),(20), +(21),(22),(23),(24),(25),(26),(27),(28),(29),(30), +(31),(32),(33),(34),(35),(36),(37),(38),(39),(40), +(41),(42),(43),(44),(45),(46),(47),(48),(49),(50); + +CREATE TABLE t2 (id INT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2); + +CREATE TABLE t3 (id INT) ENGINE=InnoDB; +INSERT INTO t3 VALUES (1),(2); + +ANALYZE TABLE t1, t2, t3; + +let $q= +SELECT * FROM +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_1 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_2 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_3 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_4 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_5 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_6 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_7 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_8 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_9 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_10 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_11 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_12 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_13 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_14 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_15 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_16 +; + +eval explain $q; + +DROP TABLE t1,t2,t3; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 9ac49a906..62260ba43 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1030,8 +1030,9 @@ show create table t1; drop table t1; # MyISAM specific varchar tests ---error 1118 create table t1 (v varchar(65535)); +show create table t1; +drop table t1; eval set storage_engine=$default; diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index e5bc36f68..6988b2a8e 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -589,3 +589,9 @@ eval SET GLOBAL SERVER_ID = $old_server_id; --exec $MYSQL_BINLOG --hexdump std_data/mdev-4645-binlog_group_id.binlog --exec $MYSQL_BINLOG --hexdump std_data/mdev-4645-binlog_group_id_checksum.binlog --exec $MYSQL_BINLOG --hexdump std_data/mdev-4645-binlog_none.binlog + +# +# MDEV-12372 mysqlbinlog --version output is the same on 10.x as on 5.5.x, and contains not only version +# +replace_regex /.*mysqlbinlog(\.exe)? Ver .* for .* at [-_a-zA-Z0-9]+/mysqlbinlog Ver VER for OS at ARCH/; +exec $MYSQL_BINLOG --version; diff --git a/mysql-test/t/partition_datatype.test b/mysql-test/t/partition_datatype.test index a6035fcb5..4ec023271 100644 --- a/mysql-test/t/partition_datatype.test +++ b/mysql-test/t/partition_datatype.test @@ -217,11 +217,13 @@ select * from t1 where a = 'bbbb'; drop table t1; -- error ER_PARTITION_FIELDS_TOO_LONG create table t1 (a varchar(3070)) partition by key (a); --- error ER_TOO_BIG_ROWSIZE +-- error ER_PARTITION_FIELDS_TOO_LONG +create table t1 (a varchar(65532) not null) partition by key (a); +-- error ER_BLOB_FIELD_IN_PART_FUNC_ERROR create table t1 (a varchar(65533)) partition by key (a); --- error ER_TOO_BIG_ROWSIZE +-- error ER_BLOB_FIELD_IN_PART_FUNC_ERROR create table t1 (a varchar(65534) not null) partition by key (a); --- error ER_TOO_BIG_ROWSIZE +-- error ER_BLOB_FIELD_IN_PART_FUNC_ERROR create table t1 (a varchar(65535)) partition by key (a); # diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 66cd173d5..6eed93127 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -3731,4 +3731,133 @@ deallocate prepare stmt2; drop table t1; +--echo # +--echo # MDEV-9208: Function->Function->View = Mysqld segfault +--echo # (Server crashes in Dependency_marker::visit_field on 2nd +--echo # execution with merged subquery) +--echo # + +CREATE TABLE t1 (i1 INT); +insert into t1 values(1),(2); + +CREATE TABLE t2 (i2 INT); +insert into t2 values(1),(2); + +prepare stmt from " + select 1 from ( + select + if (i1<0, 0, 0) as f1, + (select f1) as f2 + from t1, t2 + ) sq +"; + +execute stmt; +execute stmt; + +drop table t1,t2; + +--echo # +--echo # MDEV-9619: Assertion `null_ref_table' failed in virtual +--echo # table_map Item_direct_view_ref::used_tables() const on 2nd +--echo # execution of PS +--echo # + +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES ('a'),('b'); + +CREATE TABLE t2 (f2 VARCHAR(10)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('c'),('d'); + +PREPARE stmt FROM "SELECT * FROM v1 WHERE f1 = SOME ( SELECT f2 FROM t2 )"; +EXECUTE stmt; +EXECUTE stmt; +insert into t1 values ('c'); +EXECUTE stmt; +EXECUTE stmt; + +deallocate prepare stmt; +drop view v1; +drop table t1,t2; + +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES ('a'),('b'); + +CREATE TABLE t2 (f2 VARCHAR(10)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('c'),('d'); + +PREPARE stmt FROM "SELECT * FROM v1 WHERE (f1,f1) = SOME ( SELECT f2,f2 FROM t2 )"; +EXECUTE stmt; +EXECUTE stmt; +insert into t1 values ('c'); +EXECUTE stmt; +EXECUTE stmt; + +deallocate prepare stmt; +drop view v1; +drop table t1,t2; + + + +CREATE TABLE t1 (column1 INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (3),(9); + +CREATE TABLE t2 (column2 INT) ENGINE=MyISAM; + +INSERT INTO t2 VALUES (1),(4); + +CREATE TABLE t3 (column3 INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (6),(8); + +CREATE TABLE t4 (column4 INT) ENGINE=MyISAM; +INSERT INTO t4 VALUES (2),(5); + +PREPARE stmt FROM " +SELECT ( + SELECT MAX( table1.column1 ) AS field1 + FROM t1 AS table1 + WHERE (111,table3.column3) IN ( SELECT 111,table2.column2 AS field2 FROM t2 AS table2 ) +) AS sq +FROM t3 AS table3, t4 AS table4 GROUP BY sq +"; + +EXECUTE stmt; +EXECUTE stmt; + +deallocate prepare stmt; +drop table t1,t2,t3,t4; + +create table t1 (a int, b int, c int); +create table t2 (x int, y int, z int); +create table t3 as select * from t1; +insert into t1 values (1,2,3),(4,5,6),(100,200,300),(400,500,600); +insert into t2 values (1,2,3),(7,8,9),(100,200,300),(400,500,600); +insert into t3 values (1,2,3),(11,12,13),(100,0,0),(400,500,600); + + +set @optimizer_switch_save=@@optimizer_switch; +set @join_cache_level_save=@@join_cache_level; +set optimizer_switch='materialization=off'; +set join_cache_level=0; +select * from t1 where (select a,b from t3 where t3.c=t1.c) in (select x,y from t2 where t1.c= t2.z); +prepare stmt from "select * from t1 where (select a,b from t3 where t3.c=t1.c) in (select x,y from t2 where t1.c= t2.z)"; +EXECUTE stmt; +EXECUTE stmt; + +create view v1 as select * from t1; +create view v2 as select * from t2; +create view v3 as select * from t3; +select * from v1 where (select a,b from v3 where v3.c=v1.c) in (select x,y from v2 where v1.c= v2.z); +prepare stmt from "select * from v1 where (select a,b from v3 where v3.c=v1.c) in (select x,y from v2 where v1.c= v2.z)"; +EXECUTE stmt; +EXECUTE stmt; +set optimizer_switch=@optimizer_switch_save; +set join_cache_level=@join_cache_level_save; + +deallocate prepare stmt; +drop view v1,v2,v3; +drop table t1,t2,t3; + --echo # End of 5.5 tests diff --git a/mysql-test/t/range_vs_index_merge.test b/mysql-test/t/range_vs_index_merge.test index 5d12d46c9..84b87579e 100644 --- a/mysql-test/t/range_vs_index_merge.test +++ b/mysql-test/t/range_vs_index_merge.test @@ -1241,6 +1241,59 @@ WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9 DROP TABLE t1; +--echo # +--echo # mdev-11574: do not build index merge of two indexes when +--echo # one index is an infix of the other index +--echo # + +set names utf8; + +CREATE DATABASE world; + +use world; + +--source include/world_schema.inc + +--disable_query_log +--disable_result_log +--disable_warnings +--source include/world.inc +--enable_warnings +--enable_result_log +--enable_query_log + +DROP INDEX Country ON City; +CREATE INDEX CountryName ON City(Country,Name); +CREATE INDEX Name ON City(Name); + +--disable_query_log +--disable_result_log +--disable_warnings +ANALYZE TABLE City; +--enable_warnings +--enable_result_log +--enable_query_log + +let $q= +select * from City +where + Country='FIN' AND Name IN ('Lahti','Imatra') OR + Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR + Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR + Country='DEU' AND Name IN ('Berlin', 'Bonn') OR + Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR + Country='PRT' AND Name IN ('Braga', 'Porto') OR + Country='FRA' AND Name IN ('Paris', 'Marcel') OR + Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR + Country='NOR' AND Name IN ('Oslo', 'Bergen') OR + Country='ITA' AND Name IN ('Napoli', 'Venezia'); + +eval $q; +eval explain $q; + + +DROP DATABASE world; + #the following command must be the last one in the file set session optimizer_switch='index_merge_sort_intersection=default'; diff --git a/mysql-test/t/read_only.test b/mysql-test/t/read_only.test index cd556684e..6b608dacf 100644 --- a/mysql-test/t/read_only.test +++ b/mysql-test/t/read_only.test @@ -118,6 +118,11 @@ drop table t1; --error ER_OPTION_PREVENTS_STATEMENT insert into t1 values(1); +# +# MDEV-14056 DROP TEMPORARY TABLE IF EXISTS causes error 1290 with read_only option +# +drop temporary table if exists t1; + # # Bug#11733 COMMITs should not happen if read-only is set # diff --git a/mysql-test/t/show_function_with_pad_char_to_full_length.test b/mysql-test/t/show_function_with_pad_char_to_full_length.test new file mode 100644 index 000000000..f47f36294 --- /dev/null +++ b/mysql-test/t/show_function_with_pad_char_to_full_length.test @@ -0,0 +1,23 @@ +# +# Test that show function status succeeds with +# sql_mode = 'PAD_CHAR_TO_FULL_LENGTH (MDEV-13149) + +# show function status + +create function f() returns int return 1; +--replace_column 1 T 3 T 4 T 5 T 6 T 7 T 8 T 9 T 10 T 11 T +show function status; +set sql_mode = 'PAD_CHAR_TO_FULL_LENGTH'; +--replace_column 1 T 3 T 4 T 5 T 6 T 7 T 8 T 9 T 10 T 11 T +show function status; +drop function f; +select @@sql_mode; + +# select ROUTINE_NAME from information_schema.ROUTINES + +create function f() returns int return 1; +select ROUTINE_NAME from information_schema.ROUTINES where ROUTINE_NAME='f'; +set sql_mode = 'PAD_CHAR_TO_FULL_LENGTH'; +select ROUTINE_NAME from information_schema.ROUTINES where ROUTINE_NAME='f'; +drop function f; +select @@sql_mode; diff --git a/mysql-test/t/subselect_exists2in.test b/mysql-test/t/subselect_exists2in.test index a4fdbe5c5..5a8ddb361 100644 --- a/mysql-test/t/subselect_exists2in.test +++ b/mysql-test/t/subselect_exists2in.test @@ -786,6 +786,46 @@ set optimizer_switch= @optimizer_switch_save; DROP TABLE t1; +--echo # +--echo # MDEV-14164: Unknown column error when adding aggregate to function +--echo # in oracle style procedure FOR loop +--echo # + +CREATE TABLE t1(id INT, val INT); +DELIMITER //; +CREATE PROCEDURE p1() +BEGIN + DECLARE cur1 CURSOR FOR SELECT * FROM ( + SELECT DISTINCT id FROM t1) a + WHERE NOT EXISTS (SELECT * FROM ( SELECT id FROM t1) b + WHERE a.id=b.id); + OPEN cur1; + CLOSE cur1; + OPEN cur1; + CLOSE cur1; +END; +// +DELIMITER ;// +CALL p1(); +DROP PROCEDURE p1; +DROP TABLE t1; + +CREATE TABLE t1(id INT, val INT); +DELIMITER //; +CREATE PROCEDURE p1() +BEGIN + SELECT * FROM (SELECT DISTINCT id FROM t1) a + WHERE NOT a.id IN (SELECT b.id FROM t1 b); + SELECT * FROM (SELECT DISTINCT id FROM t1) a + WHERE NOT EXISTS (SELECT * FROM t1 b WHERE a.id=b.id); +END; +// +DELIMITER ;// +CALL p1(); +CALL p1(); +DROP PROCEDURE p1; +DROP TABLE t1; + --echo # End of 10.0 tests #restore defaults diff --git a/mysql-test/t/subselect_mat_cost_bugs.test b/mysql-test/t/subselect_mat_cost_bugs.test index 35f2b9588..67af6e3a5 100644 --- a/mysql-test/t/subselect_mat_cost_bugs.test +++ b/mysql-test/t/subselect_mat_cost_bugs.test @@ -522,4 +522,23 @@ select * from t1 where a in (select max(a) from t1 where a < 4) or a > 5; drop table t1; +--echo # +--echo # MDEV-13135: subquery with ON expression subject to +--echo # semi-join optimizations +--echo # + +CREATE TABLE t1 (a INT); +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT a AS v_a FROM t1; +INSERT INTO t1 VALUES (1),(3); + +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (3),(4); + +SELECT * FROM t1 WHERE a NOT IN ( + SELECT b FROM t2 INNER JOIN v1 ON (b IN ( SELECT a FROM t1 )) + WHERE v_a = b +); + +DROP VIEW v1; +DROP TABLE t1,t2; diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test index 2ca608e76..01a610999 100644 --- a/mysql-test/t/type_bit.test +++ b/mysql-test/t/type_bit.test @@ -439,3 +439,22 @@ SELECT SUM(a) FROM t1 GROUP BY c, b, a; DROP TABLE t1; --echo End of 5.1 tests + +--echo # +--echo # Start of 10.1 tests +--echo # + +--echo # +--echo # MDEV-8867 Wrong field type or metadata for COALESCE(bit_column, 1) +--echo # + +CREATE TABLE t1 (val bit(1)); +INSERT INTO t1 VALUES (0); +CREATE TABLE t2 AS SELECT COALESCE(val, 1) AS c FROM t1; +SELECT * FROM t2; +SHOW CREATE TABLE t2; +DROP TABLE t2; +--enable_metadata +SELECT COALESCE(val, 1) FROM t1; +--disable_metadata +DROP TABLE t1; diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test index 63c89f318..8248386a9 100644 --- a/mysql-test/t/type_date.test +++ b/mysql-test/t/type_date.test @@ -576,6 +576,15 @@ SELECT DATE(a), DATE(b), DATE(c) FROM t1; SELECT DATE(COALESCE(a)), DATE(COALESCE(b)), DATE(COALESCE(c)) FROM t1; DROP TABLE t1; +--echo # +--echo # MDEV-14221 Assertion `0' failed in Item::field_type_for_temporal_comparison +--echo # + +CREATE TABLE t1 (d DATE); +INSERT INTO t1 VALUES ('1985-05-13'),('1989-12-24'); +SELECT d, COUNT(*) FROM t1 GROUP BY d WITH ROLLUP HAVING CASE d WHEN '2017-05-25' THEN 0 ELSE 1 END; +DROP TABLE t1; + --echo # --echo # End of 10.1 tests diff --git a/mysql-test/t/type_varchar.test b/mysql-test/t/type_varchar.test index cc0906950..edf60927a 100644 --- a/mysql-test/t/type_varchar.test +++ b/mysql-test/t/type_varchar.test @@ -219,7 +219,51 @@ SELECT 5 = a FROM t1; DROP TABLE t1; --echo # ---echo # Start of 10.0 tests +--echo # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +--echo # + +CREATE TABLE t1 (c1 VARBINARY(65532)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARBINARY(65533)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARBINARY(65534)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARBINARY(65535)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARBINARY(65536)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(65532)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(65533)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(65534)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(65535)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(65536)); +DESCRIBE t1; +DROP TABLE t1; + +--echo # +--echo # End of 5.5 tests --echo # --echo # diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index d01d922ef..ac6b94102 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -1,3 +1,4 @@ +--source include/have_partition.inc --disable_warnings drop table if exists t1,t2,t3,t4,t5,t6,t9,`t1a``b`,v1,v2,v3,v4,v5,v6; diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test index 3e7c9b786..371fcb72b 100644 --- a/mysql-test/t/xml.test +++ b/mysql-test/t/xml.test @@ -674,9 +674,7 @@ SELECT ExtractValue('xxx','/a/b'); --echo # Bug#58175 xml functions read initialized bytes when conversions happen --echo # SET NAMES latin1; ---enable_prepare_warnings SELECT UPDATEXML(CONVERT('' USING swe7), TRUNCATE('',1), 0); ---disable_prepare_warnings --echo # --echo # Bug#12375190: UPDATEXML CRASHES ON SIMPLE INPUTS diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index cf99f822d..b5f8f9fff 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,72 +23,83 @@ # ############################################################################## -main.alter_table : Modified in 10.1.27 +main.alter_table : Modified in 10.1.29 main.alter_table_trans : MDEV-12084 - timeout -main.analyze_format_json : MDEV-11866 - Wrong result -main.analyze_stmt_orderby : MDEV-11866 - Wrong result main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result -main.binary_to_hex : Added in 10.1.26 +main.bootstrap : Include files modified in 10.1.29 +main.case : Modified in 10.1.29 main.count_distinct : Modified in 10.1.27 main.create_delayed : MDEV-10605 - failed with timeout -main.create_drop_event : Modified in 10.1.26 +main.ctype_gbk : Modified in 10.1.29 +main.ctype_latin1 : Modified in 10.1.29 +main.ctype_ucs : Modified in 10.1.29 main.ctype_utf16le : MDEV-10675: timeout or extra warnings -main.ctype_utf8 : Modified in 10.1.27 -main.drop-no_root : MDEV-12633 - Valgrind warnings -main.errors : Modified in 10.1.26 +main.ctype_utf32 : Modified in 10.1.29 +main.ctype_utf8 : Modified in 10.1.29 +main.delete_returning : Modified in 10.1.29 +main.delimiter_command_case_sensitivity : Added in 10.1.29 +main.events_2 : MDEV-13277 - Server crash main.events_bugs : MDEV-12892 - Crash in fill_schema_processlist main.events_restart : MDEV-12236 - Server shutdown problem -main.func_misc : Modified in 10.1.27 -main.func_regexp_pcre : MDEV-13412 - Crash; modified in 10.1.26 -main.gis : Modified in 10.1.26 -main.gis-rt-precise : Modified in 10.1.26 -main.group_by : Modified in 10.1.26 +main.func_in : Modified in 10.1.29 +main.func_misc : Modified in 10.1.29 +main.func_regexp_pcre : Modified in 10.1.29 +main.func_time : Modified in 10.1.29 +main.gis-precise : Modified in 10.1.29 main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown main.index_intersect_innodb : MDEV-10643 - failed with timeout main.index_merge_innodb : MDEV-7142 - Wrong execution plan, timeout with valgrind +main.information_schema : Modified in 10.1.29 main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure main.insert : Modified in 10.1.27 main.kill_processlist-6619 : MDEV-10793 - wrong result in processlist -main.loadxml : Data file modified in 10.1.26 main.log_tables-big : Modified in 10.1.27 main.mdev-504 : MDEV-10607 - sporadic "can't connect" +main.mdev13607 : Added in 10.1.29 main.mdev375 : MDEV-10607 - sporadic "can't connect" main.merge : MDEV-10607 - sporadic "can't connect" -main.mysqlcheck : MDEV-12633 - Valgrind warnings +main.myisam : Modified in 10.1.29 +main.mysql_upgrade_noengine : MDEV-14355 - Plugin is busy +main.mysqlbinlog : Modified in 10.1.29 main.mysqlslap : MDEV-11801 - timeout main.mysqltest : MDEV-9269 - fails on Alpha -main.mysql_client_test : MDEV-12633 - Valgrind warnings -main.mysql_client_test_comp : MDEV-12633 - Valgrind warnings -main.mysql_client_test_nonblock : MDEV-12633 - Valgrind warnings -main.mysql_upgrade : Modified in 10.1.26 main.old-mode : Modified in 10.1.27 -main.openssl_1 : Modified in 10.1.26 -main.openssl_6975 : Modified in 10.1.26 main.order_by_optimizer_innodb : MDEV-10683 - wrong execution plan +main.partition_datatype : Modified in 10.1.29 +main.partition_example : Include files modified in 10.1.29 main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings main.partition_symlink : Modified in 10.1.27 -main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count +main.plugin : Include files modified in 10.1.29 +main.plugin_innodb : Include files modified in 10.1.29 +main.plugin_load : Include files modified in 10.1.29 +main.plugin_load_option : Include files modified in 10.1.29 +main.plugin_maturity : Include files modified in 10.1.29 +main.plugin_not_embedded : Include files modified in 10.1.29 +main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count; modified in 10.1.29 main.query_cache : MDEV-12895 - Wrong result +main.range_vs_index_merge : Modified in 10.1.29 main.range_vs_index_merge_innodb : MDEV-12637 - Timeout -main.read_only : Modified in 10.1.26 -main.repair_symlink-5543 : MDEV-12215 - Wrong error codes +main.read_only : Modified in 10.1.29 main.set_statement : MDEV-13183 - Wrong result -main.show_check : MDEV-12633 - Valgrind warnings main.show_explain : MDEV-10674 - sporadic failure +main.show_function_with_pad_char_to_full_length : Added in 10.1.29 main.sp : Modified in 10.1.27 main.sp-security : MDEV-10607 - sporadic "can't connect" -main.ssl : Modified in 10.1.26 main.status : MDEV-8510 - sporadic wrong result -main.subselect : Modified in 10.1.26 +main.subselect_exists2in : Modified in 10.1.29 main.subselect_innodb : MDEV-10614 - sporadic wrong results -main.subselect_nulls : Modified in 10.1.26 +main.subselect_mat_cost_bugs : Modified in 10.1.29 main.symlink : Modified in 10.1.27 -main.symlink-aria-11902 : MDEV-12215 - Unexpected errors -main.symlink-myisam-11902 : MDEV-12215 - Unexpected errors +main.table_options-5867 : Include files modified in 10.1.29 main.tc_heuristic_recover : Added in 10.1.27 +main.truncate_badse : Include files modified in 10.1.29 +main.type_bit : Modified in 10.1.29 +main.type_date : Modified in 10.1.29 main.type_datetime_hires : MDEV-10687 - timeout -main.union : Modified in 10.1.26 -main.view : Modified in 10.1.27 +main.type_varchar : Modified in 10.1.29 +main.user_var : Modified in 10.1.29 +main.view : Modified in 10.1.29 +main.xml : Modified in 10.1.29 #---------------------------------------------------------------- @@ -98,9 +109,7 @@ archive.discover : MDEV-10510 - table is marked as crashed binlog.binlog_commit_wait : MDEV-10150 - Error: too much time elapsed binlog.binlog_killed : MDEV-12925 - Wrong result -binlog.binlog_parallel_replication_marks_row : Added in 10.1.26 -binlog.binlog_parallel_replication_marks_stm_mix : Added in 10.1.26 -binlog.binlog_unsafe : Modified in 10.1.26 +binlog.binlog_spurious_ddl_errors : Include files modified in 10.1.29 binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint #---------------------------------------------------------------- @@ -109,6 +118,7 @@ binlog_encryption.binlog_xa_recover : MDEV-12908 - Extra checkpoint binlog_encryption.encrypted_master : MDEV-12906 - Failed to sync binlog_encryption.rpl_parallel : MDEV-10653 - Timeout binlog_encryption.rpl_semi_sync : MDEV-11220 - Wrong result, MDEV-11673 - Valgrind warning +binlog_encryption.rpl_typeconv : MDEV-14362 - Lost connection to MySQL server during query #---------------------------------------------------------------- @@ -118,19 +128,19 @@ connect.infoschema-9739 : Modified in 10.1.27 connect.infoschema2-9739 : Added in 10.1.27 connect.jdbc_new : Modified in 10.1.27 connect.json : Modified in 10.1.27 -connect.json_java_2 : Added in 10.1.27 -connect.json_java_3 : Added in 10.1.27 -connect.json_mongo_c : Added in 10.1.27 +connect.json_java_2 : Include file modified in 10.1.29 +connect.json_java_3 : Include file modified in 10.1.29 +connect.json_mongo_c : Include file modified in 10.1.29 connect.json_udf : Modified in 10.1.27 connect.json_udf_bin : Modified in 10.1.27 -connect.mongo_c : Added in 10.1.27 -connect.mongo_java_2 : Added in 10.1.27 -connect.mongo_java_3 : Added in 10.1.27 +connect.mongo_c : Include file modified in 10.1.29 +connect.mongo_java_2 : Include file modified in 10.1.29 +connect.mongo_java_3 : Include file modified in 10.1.29 connect.mul_new : Added in 10.1.27 connect.mysql_exec : Modified in 10.1.27 connect.mysql_new : Modified in 10.1.27 connect.tbl : MDEV-9844, MDEV-10179 - sporadic crashes, valgrind warnings, wrong results; modified in 10.1.27 -connect.tbl_thread : MDEV-9844, MDEV-10179 - sporadic crashes, valgrind warnings, wrong results; added in 10.1.27 +connect.tbl_thread : MDEV-9844, MDEV-10179, MDEV-14214 - sporadic crashes, valgrind warnings, wrong results; added in 10.1.27 connect.unsigned : Modified in 10.1.27 connect.upd : Modified in 10.1.27 connect.xml : Modified in 10.1.27 @@ -150,17 +160,21 @@ connect.zip : MDEV-13884 - Wrong result; modified in 10.1.27 #---------------------------------------------------------------- encryption.create_or_replace : MDEV-9359 - Assertion failure, MDEV-13516 - Assertion failure +encryption.debug_key_management : MDEV-13841 - Timeout on wait condition encryption.encrypt_and_grep : MDEV-13765 - Wrong result +encryption.encryption_force : Modified in 10.1.29 +encryption.filekeys_encfile : Include file modified in 10.1.29 +encryption.filekeys_encfile_file : Include file modified in 10.1.29 encryption.innodb-bad-key-change2 : MDEV-12632 - Valgrind warnings -encryption.innochecksum : Modified in 10.1.26 encryption.innodb-discard-import-change : MDEV-12632 - Valgrind warnings encryption.innodb_encryption : Modified in 10.1.27 +encryption.innodb-encryption-alter : Modified in 10.1.29 encryption.innodb_encryption_discard_import : MDEV-12903 - Wrong result encryption.innodb_encryption_filekeys : MDEV-9962 - timeouts encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure encryption.innodb_encryption_tables : MDEV-9359 - Assertion failure encryption.innodb_first_page : MDEV-10689 - crashes -encryption.innodb-first-page-read : MDEV-13181 - Signal 8; modified in 10.1.27 +encryption.innodb-first-page-read : MDEV-14356 - Timeout on wait condition encryption.innodb_lotoftables : MDEV-11531 - InnoDB error; modified in 10.1.27 encryption.innodb-missing-key : MDEV-9359 - assertion failure encryption.innodb-page_encryption : MDEV-10641 - mutex problem @@ -168,7 +182,6 @@ encryption.innodb-redo-badkey : MDEV-12898 - Server hang on startu encryption.innodb_scrub : MDEV-8139 - scrubbing tests need fixing encryption.innodb_scrub_background : MDEV-8139 - scrubbing tests need fixing encryption.innodb_scrub_compressed : MDEV-8139 - scrubbing tests need fixing -encryption.second_plugin-12863 : Added in 10.1.26 #---------------------------------------------------------------- @@ -182,7 +195,6 @@ federated.federated_innodb : MDEV-10617, MDEV-10417 - Wrong checksum, time federated.federated_partition : MDEV-10417 - Fails on Mips federated.federated_transactions : MDEV-10617, MDEV-10417 - Wrong checksum, timeouts, fails on Mips federated.federatedx : MDEV-10617 - Wrong checksum, timeouts -federated.net_thd_crash-12725 : Added in 10.1.26 #---------------------------------------------------------------- @@ -211,55 +223,72 @@ galera.MW-328A : MDEV-13876 - Wrong result #---------------------------------------------------------------- -innodb.101_compatibility : Modified in 10.1.26 innodb.alter_rename_existing : Added in 10.1.27 innodb.binlog_consistent : MDEV-10618 - Server fails to start innodb.create-index-debug : Added in 10.1.27 -innodb.doublewrite : MDEV-12905 - Lost connection to MySQL server +innodb.doublewrite : MDEV-12905, MDEV-14205 - Lost connection to MySQL server innodb.index_tree_operation : Added in 10.1.27 -innodb.innodb-32k : Option file modified in 10.1.26 -innodb.innodb-32k-crash : Option file modified in 10.1.26 -innodb.innodb-64k : Modified in 10.1.26 +innodb.innodb-16k : Modified in 10.1.29 +innodb.innodb-32k : Modified in 10.1.29 +innodb.innodb-64k : Modified in 10.1.29 innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup -innodb.innodb-alter : Added in 10.1.27 +innodb.innodb-alter : Modified in 10.1.29 innodb.innodb-alter-autoinc : Added in 10.1.27 innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS -innodb.innodb-alter-table : MDEV-10619 - Testcase timeout +innodb.innodb-alter-table : MDEV-10619 - Testcase timeout; modified in 10.1.29 innodb.innodb-blob : MDEV-12053 - Client crash innodb.innodb_bug14147491 : MDEV-11808 - wrong error codes innodb.innodb_bug30423 : MDEV-7311 - Wrong number of rows in the plan innodb.innodb-enlarge-blob : Modified in 10.1.27 innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown +innodb.innodb-get-fk : Modified in 10.1.29 innodb.innodb-index-debug : Added in 10.1.27 innodb.innodb-index-online : Added in 10.1.27 innodb.innodb-index-online-delete : Added in 10.1.27 innodb.innodb-index-online-fk : Added in 10.1.27 innodb.innodb-index-online-purge : Added in 10.1.27 -innodb.innodb_max_recordsize_32k : Added in 10.1.26 -innodb.innodb_max_recordsize_64k : Added in 10.1.26 +innodb.innodb-page_compression_lzma : MDEV-14353 - wrong result on Fedora 25 +innodb.innodb-page_compression_tables : Modified in 10.1.29 innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem innodb.innodb_stats : MDEV-10682 - wrong result innodb.innodb_sys_semaphore_waits : MDEV-10331 - wrong result -innodb.innodb-table-online : Added in 10.1.27 -innodb.innodb-wl5980-alter : Added in 10.1.27 -innodb.innodb_zip_innochecksum : Added in 10.1.26 +innodb.innodb-table-online : Modified in 10.1.29 +innodb.innodb-wl5522-debug : Modified in 10.1.29 +innodb.innodb-wl5980-alter : Modified in 10.1.29 innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks -innodb.innodb_zip_innochecksum3 : Added in 10.1.26 innodb.log_data_file_size : Modified in 10.1.27 +innodb.table_definition_cache_debug : MDEV-14206 - Extra warning; modified in 10.1.29 +innodb.table_flags : MDEV-14363 - Operating system error number 2 +innodb.undo_log : Modified in 10.1.29 innodb.xa_recovery : Modified in 10.1.27 +innodb_fts.concurrent_insert : Added in 10.1.29 +innodb_fts.fulltext : Modified in 10.1.29 innodb_fts.fulltext_misc : MDEV-12636 - Valgrind warnings +innodb_zip.innodb_prefix_index_liftedlimit : Modified in 10.1.29 +innodb_zip.wl5522_debug_zip : Added in 10.1.29 + +#---------------------------------------------------------------- + +maria.maria : Modified in 10.1.29 #---------------------------------------------------------------- mariabackup.apply-log-only : Added in 10.1.27 mariabackup.apply-log-only-incr : Added in 10.1.27 mariabackup.auth_plugin_win : Added in 10.1.27 +mariabackup.compress_qpress : Added in 10.1.29 +mariabackup.data_directory : Added in 10.1.29 +mariabackup.incremental_backup : Modified in 10.1.29 +mariabackup.partition_datadir : Added in 10.1.29 mariabackup.xb_aws_key_management : Modified in 10.1.27 #---------------------------------------------------------------- +mroonga.* : Many tests and include files added and modified in 10.1.29 +mroonga/storage.* : Many tests and include files added and modified in 10.1.29 + mroonga/storage.column_datetime_32bit_2038 : Wrong result on Alpha mroonga/storage.column_datetime_32bit_before_unix_epoch : Wrong result on Alpha mroonga/storage.column_datetime_32bit_max : Wrong result on Alpha @@ -280,7 +309,8 @@ multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_h #---------------------------------------------------------------- -parts.longname : Added in 10.1.26 +parts.partition_alter_maria : Added in 10.1.29 +parts.partition_alter2_2_maria : MDEV-14364 - Lost connection to MySQL server during query parts.partition_exch_myisam_innodb : Modified in 10.1.27 parts.partition_exch_qa_10 : Include files modified in 10.1.27 parts.partition_exch_qa_11 : Include files modified in 10.1.27 @@ -296,7 +326,7 @@ parts.partition_innodb_status_file : MDEV-12901 - Valgrind perfschema.func_file_io : MDEV-5708 - fails for s390x perfschema.func_mutex : MDEV-5708 - fails for s390x -perfschema.privilege_table_io : MDEV-13184 - Extra lines; modified in 10.1.26 +perfschema.privilege_table_io : MDEV-13184 - Extra lines perfschema.setup_actors : MDEV-10679 - rare crash perfschema.socket_summary_by_event_name_func : MDEV-10622 - Socket summary tables do not match perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders @@ -306,12 +336,15 @@ perfschema.threads_mysql : MDEV-10677 - sporadic wrong resul #---------------------------------------------------------------- plugins.feedback_plugin_send : MDEV-7932 - ssl failed for url -plugins.server_audit : MDEV-9562 - crashes on sol10-sparc -plugins.thread_pool_server_audit : MDEV-9562 - crashes on sol10-sparc +plugins.server_audit : MDEV-9562 - crashes on sol10-sparc; modified in 10.1.29 +plugins.thread_pool_server_audit : MDEV-9562 - crashes on sol10-sparc; modified in 10.1.29 + +#---------------------------------------------------------------- + +roles.definer : Modified in 10.1.29 #---------------------------------------------------------------- -rpl.circular_serverid0 : Added in 10.1.26 rpl.last_insert_id : MDEV-10625 - warnings in error log rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips @@ -319,13 +352,8 @@ rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log rpl.rpl_binlog_index : MDEV-9501 - Warning: failed registering on master rpl.rpl_checksum_cache : MDEV-12173 - Unexpected error rpl.rpl_ddl : MDEV-10417 - Fails on Mips +rpl.rpl_domain_id_filter_io_crash : MDEV-14357 - Wrong result rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result -rpl.rpl_extra_col_master_innodb : Include file modified in 10.1.26 -rpl.rpl_extra_col_master_myisam : Include file modified in 10.1.26 -rpl.rpl_extra_col_slave_innodb : Include file modified in 10.1.26 -rpl.rpl_extra_col_slave_myisam : Include file modified in 10.1.26 -rpl.rpl_filter_tables_dynamic : Include file modified in 10.1.26 -rpl.rpl_filter_tables_not_exist : Include file modified in 10.1.26 rpl.rpl_gtid_basic : MDEV-10681 - server startup problem rpl.rpl_gtid_crash : MDEV-9501 - Warning: failed registering on master rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings @@ -334,42 +362,36 @@ rpl.rpl_gtid_until : MDEV-10625 - warnings in error log rpl.rpl_innodb_bug30888 : MDEV-10417 - Fails on Mips rpl.rpl_insert : MDEV-9329 - Fails on Ubuntu/s390x rpl.rpl_insert_delayed : MDEV-9329 - Fails on Ubuntu/s390x +rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips -rpl.rpl_loaddata : Include file modified in 10.1.26 -rpl.rpl_loaddata_fatal : Include file modified in 10.1.26 rpl.rpl_mariadb_slave_capability : MDEV-11018 - sporadic wrong events in binlog rpl.rpl_mdev6020 : MDEV-10630, MDEV-10417 - Timeouts, fails on Mips -rpl.rpl_mdev-11092 : Include file modified in 10.1.26 -rpl.rpl_mixed_binlog_max_cache_size : Include file modified in 10.1.26 -rpl.rpl_old_decimal : Include file modified in 10.1.26 rpl.rpl_parallel : MDEV-10653 - Timeouts rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure -rpl.rpl_parallel_optimistic : MDEV-10511 - timeout; modified in 10.1.26 +rpl.rpl_parallel_optimistic : MDEV-10511 - timeout rpl.rpl_parallel_retry : MDEV-11119 - Server crash rpl.rpl_parallel_temptable : MDEV-10356 - Crash in close_thread_tables rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings -rpl.rpl_reset_slave_fail : Added in 10.1.26 -rpl.rpl_rotate_logs : Include file modified in 10.1.26 -rpl.rpl_row_binlog_max_cache_size : Include file modified in 10.1.26 +rpl.rpl_plugin_load : Include files modified in 10.1.29 +rpl.rpl_row_img_blobs : MDEV-13875 - command "diff_files" failed rpl.rpl_row_img_eng_min : MDEV-13875 - command "diff_files" failed -rpl.rpl_row_loaddata_concurrent : Include file modified in 10.1.26 +rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed rpl.rpl_row_log_innodb : MDEV-10688 - Wrong result rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x -rpl.rpl_row_tabledefs_2myisam : Include file modified in 10.1.26 -rpl.rpl_row_tabledefs_3innodb : Include file modified in 10.1.26 rpl.rpl_semi_sync : MDEV-11220 - Wrong result +rpl.rpl_semi_sync_after_sync_row : MDEV-14366 - Wrong result rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings -rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Wrong plugin status, MDEV-10892 - Assertion failure +rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Wrong plugin status rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition rpl.rpl_show_slave_hosts : MDEV-10681 - server startup problem rpl.rpl_skip_replication : MDEV-9268 - Fails with timeout in sync_slave_with_master on Alpha rpl.rpl_slave_grp_exec : MDEV-10514 - Unexpected deadlock rpl.rpl_sp_variables : Added in 10.1.27 -rpl.rpl_stm_000001 : Include file modified in 10.1.26 -rpl.rpl_stm_binlog_max_cache_size : Include file modified in 10.1.26 -rpl.rpl_stm_loaddata_concurrent : Include file modified in 10.1.26 +rpl.rpl_start_stop_slave : MDEV-13567 - Replication failure +rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion rpl.rpl_sync : MDEV-10633 - Database page corruption +rpl.rpl_table_options : Include files modified in 10.1.29 rpl.rpl_temporal_format_mariadb53_to_mysql56_dst : Added in 10.1.27 rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result @@ -408,8 +430,12 @@ stress.ddl_innodb : MDEV-10635 - Testcase timeout #---------------------------------------------------------------- sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x +sys_vars.explicit_defaults_for_timestamp_off : Include file modified in 10.1.29 +sys_vars.explicit_defaults_for_timestamp_on : Include file modified in 10.1.29 sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout -sys_vars.innodb_buffer_pool_dump_pct_basic : MDEV-10651 - sporadic failure on file_exists +sys_vars.innodb_buffer_pool_dump_now_basic : Modified in 10.1.29 +sys_vars.innodb_buffer_pool_dump_pct_basic : Modified in 10.1.29 +sys_vars.innodb_buffer_pool_load_now_basic : Modified in 10.1.29 sys_vars.innodb_fatal_semaphore_wait_threshold : MDEV-10513 - crashes sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash sys_vars.rpl_init_slave_func : MDEV-10149 - wrong results @@ -428,54 +454,18 @@ tokudb.cluster_filter : MDEV-10678 - Wrong execution plan tokudb.cluster_filter_hidden : MDEV-10678 - Wrong execution plan tokudb.cluster_filter_unpack_varchar : MDEV-10636 - Wrong execution plan tokudb.dir_per_db : MDEV-11537 - Wrong result; modified in 10.1.27 +tokudb.dir_per_db_rename_to_nonexisting_schema : MDEV-14359 - Directory not empty tokudb.hotindex-insert-bigchar : MDEV-12640 - Crash +tokudb.hotindex-insert-1 : MDEV-13870 - Lost connection to MySQL server tokudb.hotindex-update-1 : MDEV-12640 - Crash -tokudb.kill_query_blocked_in_lt : Added in 10.1.26 -tokudb.locks-select-update-3 : Modified in 10.1.26 tokudb.rows-32m-rand-insert : MDEV-12640 - Crash tokudb.rows-32m-seq-insert : MDEV-12640 - Crash -tokudb_backup.rpl_safe_slave : Include file modified in 10.1.26 - tokudb_bugs.checkpoint_lock : MDEV-10637 - Wrong processlist output tokudb_bugs.checkpoint_lock_3 : MDEV-10637 - Wrong processlist output tokudb_bugs.xa : MDEV-11804 - Lock wait timeout tokudb_mariadb.mdev6657 : MDEV-12737 - Wrong plan, valgrind warnings -tokudb_mariadb.mdev12972 : Added in 10.1.26 - -rpl-tokudb.rpl_extra_col_master_tokudb : Include file modified in 10.1.26 -rpl-tokudb.rpl_extra_col_slave_tokudb : Include file modified in 10.1.26 -rpl-tokudb.rpl_not_null_tokudb : Modified in 10.1.26 -rpl-tokudb.rpl_parallel_tokudb_delete_pk : Option file modified in 10.1.26 -rpl-tokudb.rpl_parallel_tokudb_update_pk_uc0_lookup0 : Modified in 10.1.26 -rpl-tokudb.rpl_parallel_tokudb_write_pk : Modified in 10.1.26 -rpl-tokudb.rpl_rfr_disable_on_expl_pk_absence : Added in 10.1.26 -rpl-tokudb.rpl_row_basic_3tokudb : Modified in 10.1.26 -rpl-tokudb.rpl_row_tabledefs_3tokudb : Include file modified in 10.1.26 -rpl-tokudb.rpl_tokudb_commit_after_flush : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_insert_id : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_insert_id_pk : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_multi_update : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_multi_update2 : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_multi_update3 : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_rfr_partition_table : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_crash_safe : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_blobs : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_eng_full : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_eng_min : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_eng_noblob : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_idx_full : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_idx_min : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_idx_noblob : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_log : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_lower_case_table_names : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_sp003 : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_sp006 : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_trig004 : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_stm_log : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_stm_mixed_crash_safe : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_stm_mixed_lower_case_table_names : Added in 10.1.26 #---------------------------------------------------------------- @@ -486,11 +476,12 @@ unit.ma_test_loghandler : MDEV-10638 - record read not ok vcol.not_supported : MDEV-10639 - Testcase timeout vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout +vcol.vcol_misc : Modified in 10.1.29 #---------------------------------------------------------------- wsrep.binlog_format : MDEV-11532 - WSREP has not yet prepared node -wsrep.mdev_6832 : Option file changed in 10.1.27 +wsrep.mdev_6832 : MDEV-14195 - Failure upon check-testcase; option file changed in 10.1.27 wsrep.mdev_7798 : Option file changed in 10.1.27 wsrep.pool_of_threads : MDEV-12234 - Library problem on Power diff --git a/mysys/my_new.cc b/mysys/my_new.cc index 4266452da..a401ccff1 100644 --- a/mysys/my_new.cc +++ b/mysys/my_new.cc @@ -47,6 +47,11 @@ void* operator new[](std::size_t sz, const std::nothrow_t&) throw() return (void *) my_malloc (sz ? sz : 1, MYF(0)); } +void operator delete (void *ptr, std::size_t) +{ + my_free(ptr); +} + void operator delete (void *ptr) { my_free(ptr); @@ -57,6 +62,11 @@ void operator delete[] (void *ptr) throw () my_free(ptr); } +void operator delete[] (void *ptr, std::size_t) throw () +{ + my_free(ptr); +} + void operator delete(void* ptr, const std::nothrow_t&) throw() { my_free(ptr); diff --git a/pcre/CMakeLists.txt b/pcre/CMakeLists.txt index 30b06a46f..31d4358f1 100644 --- a/pcre/CMakeLists.txt +++ b/pcre/CMakeLists.txt @@ -128,9 +128,9 @@ SET(PCREGREP_BUFSIZE "20480" CACHE STRING SET(PCRE_NEWLINE "LF" CACHE STRING "What to recognize as a newline (one of CR, LF, CRLF, ANY, ANYCRLF).") -# MARIADB: Changed the default from OFF to ON as pcre_test.bat on Windows -# MARIADB: fails complaining about too small stack size on Windows. -SET(PCRE_NO_RECURSE ON CACHE BOOL +# Windows has much smaller stack (pcre recursion limit of 112, vs +# 250-500 on Linuxes) +SET(PCRE_NO_RECURSE "${WIN32}" CACHE BOOL "If ON, then don't use stack recursion when matching. See NO_RECURSE in config.h.in for details.") SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING diff --git a/pcre/pcre_exec.c b/pcre/pcre_exec.c index 70ac2fea3..fa84d924a 100644 --- a/pcre/pcre_exec.c +++ b/pcre/pcre_exec.c @@ -509,6 +509,12 @@ Returns: MATCH_MATCH if matched ) these values are >= 0 (e.g. stopped by repeated call or recursion limit) */ +#ifdef __GNUC__ +static int +match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode, + PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb, + unsigned int rdepth) __attribute__((noinline,noclone)); +#endif static int match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode, PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb, diff --git a/plugin/handler_socket/CMakeLists.txt b/plugin/handler_socket/CMakeLists.txt index a10743210..bd656ebc5 100644 --- a/plugin/handler_socket/CMakeLists.txt +++ b/plugin/handler_socket/CMakeLists.txt @@ -8,6 +8,12 @@ ENDIF() #Remove -fno-implicit-templates from compiler flags(handlersocket would not work with it) STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +include(CheckCXXCompilerFlag) +check_cxx_compiler_flag(" -Wdeprecated-declarations" HAVE_CXX_WDEPRECATED_DECLARATIONS) +IF (HAVE_CXX_WDEPRECATED_DECLARATIONS) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") +ENDIF() + INCLUDE_DIRECTORIES(libhsclient) # Handlersocket client library. We do not distribute it, diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c index 95ccb9607..0a266ab19 100644 --- a/plugin/server_audit/server_audit.c +++ b/plugin/server_audit/server_audit.c @@ -15,7 +15,7 @@ #define PLUGIN_VERSION 0x104 -#define PLUGIN_STR_VERSION "1.4.2" +#define PLUGIN_STR_VERSION "1.4.3" #define _my_thread_var loc_thread_var @@ -1121,6 +1121,21 @@ do { \ } while(0) +#define ESC_MAP_SIZE 0x60 +static const char esc_map[ESC_MAP_SIZE]= +{ + 0, 0, 0, 0, 0, 0, 0, 0, 'b', 't', 'n', 0, 'f', 'r', 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, '\'', 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '\\', 0, 0, 0 +}; + +static char escaped_char(char c) +{ + return ((unsigned char ) c) >= ESC_MAP_SIZE ? 0 : esc_map[(unsigned char) c]; +} static void setup_connection_initdb(struct connection_info *cn, @@ -1327,21 +1342,16 @@ static size_t escape_string(const char *str, unsigned int len, const char *res_end= result + result_len - 2; while (len) { + char esc_c; + if (result >= res_end) break; - if (*str == '\'') - { - if (result+1 >= res_end) - break; - *(result++)= '\\'; - *(result++)= '\''; - } - else if (*str == '\\') + if ((esc_c= escaped_char(*str))) { if (result+1 >= res_end) break; *(result++)= '\\'; - *(result++)= '\\'; + *(result++)= esc_c; } else if (is_space(*str)) *(result++)= ' '; @@ -1430,19 +1440,12 @@ static size_t escape_string_hide_passwords(const char *str, unsigned int len, no_password: if (result >= res_end) break; - if (*str == '\'') + if ((b_char= escaped_char(*str))) { if (result+1 >= res_end) break; *(result++)= '\\'; - *(result++)= '\''; - } - else if (*str == '\\') - { - if (result+1 >= res_end) - break; - *(result++)= '\\'; - *(result++)= '\\'; + *(result++)= b_char; } else if (is_space(*str)) *(result++)= ' '; diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 2f9c18569..880458c15 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -221,6 +221,11 @@ ELSE() SET(localstatedir ${MYSQL_DATADIR}) ENDIF() +SET(resolveip_locations "$basedir/${INSTALL_BINDIR} $basedir/bin") +SET(mysqld_locations "$basedir/${INSTALL_SBINDIR} $basedir/libexec $basedir/sbin $basedir/bin") +SET(errmsg_locations "$basedir/${INSTALL_MYSQLSHAREDIR}/english $basedir/share/english $basedir/share/mysql/english") +SET(pkgdata_locations "$basedir/${INSTALL_MYSQLSHAREDIR} $basedir/share $basedir/share/mysql") + IF(UNIX) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY) diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 364cc4fb9..aad9ef5cc 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -187,7 +187,7 @@ SET @skip_auth_anonymous=1;" ;; # Try to find a specific file within --basedir which can either be a binary # release or installed source directory and return the path. -find_in_basedir() +find_in_dirs() { case "$1" in --dir) @@ -199,13 +199,13 @@ find_in_basedir() for dir in "$@" do - if test -f "$basedir/$dir/$file" + if test -f "$dir/$file" then if test -n "$return_dir" then - echo "$basedir/$dir" + echo "$dir" else - echo "$basedir/$dir/$file" + echo "$dir/$file" fi break fi @@ -269,7 +269,7 @@ then print_defaults="$builddir/extra/my_print_defaults" elif test -n "$basedir" then - print_defaults=`find_in_basedir my_print_defaults bin extra` + print_defaults=`find_in_dirs my_print_defaults $basedir/bin $basedir/extra` if test -z "$print_defaults" then cannot_find_file my_print_defaults $basedir/bin $basedir/extra @@ -295,44 +295,46 @@ if test -n "$srcdir" then basedir="$builddir" bindir="$basedir/client" - extra_bindir="$basedir/extra" + resolveip="$basedir/extra/resolveip" mysqld="$basedir/sql/mysqld" langdir="$basedir/sql/share/english" srcpkgdatadir="$srcdir/scripts" buildpkgdatadir="$builddir/scripts" - scriptdir="$srcdir/scripts" elif test -n "$basedir" then - bindir="$basedir/bin" - extra_bindir="$bindir" - mysqld=`find_in_basedir mysqld libexec sbin bin` + bindir="$basedir/bin" # only used in the help text + resolveip=`find_in_dirs resolveip @resolveip_locations@` + if test -z "$resolveip" + then + cannot_find_file resolveip @resolveip_locations@ + exit 1 + fi + mysqld=`find_in_dirs mysqld @mysqld_locations@` if test -z "$mysqld" then - cannot_find_file mysqld $basedir/libexec $basedir/sbin $basedir/bin + cannot_find_file mysqld @mysqld_locations@ exit 1 fi - langdir=`find_in_basedir --dir errmsg.sys share/english share/mysql/english` + langdir=`find_in_dirs --dir errmsg.sys @errmsg_locations@` if test -z "$langdir" then - cannot_find_file errmsg.sys $basedir/share/english $basedir/share/mysql/english + cannot_find_file errmsg.sys @errmsg_locations@ exit 1 fi - srcpkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql` + srcpkgdatadir=`find_in_dirs --dir fill_help_tables.sql @pkgdata_locations@` buildpkgdatadir=$srcpkgdatadir if test -z "$srcpkgdatadir" then - cannot_find_file fill_help_tables.sql $basedir/share $basedir/share/mysql + cannot_find_file fill_help_tables.sql @pkgdata_locations@ exit 1 fi - scriptdir="$basedir/scripts" else basedir="@prefix@" bindir="@bindir@" - extra_bindir="$bindir" + resolveip="$bindir/resolveip" mysqld="@libexecdir@/mysqld" srcpkgdatadir="@pkgdatadir@" buildpkgdatadir="@pkgdatadir@" - scriptdir="@scriptdir@" fi # Set up paths to SQL scripts required for bootstrap @@ -376,14 +378,14 @@ hostname=`@HOSTNAME@` # Check if hostname is valid if test "$cross_bootstrap" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0 then - resolved=`"$extra_bindir/resolveip" $hostname 2>&1` + resolved=`"$resolveip" $hostname 2>&1` if test $? -ne 0 then - resolved=`"$extra_bindir/resolveip" localhost 2>&1` + resolved=`"$resolveip" localhost 2>&1` if test $? -ne 0 then echo "Neither host '$hostname' nor 'localhost' could be looked up with" - echo "'$extra_bindir/resolveip'" + echo "'$resolveip'" echo "Please configure the 'hostname' command to return a correct" echo "hostname." echo "If you want to solve this at a later stage, restart this script" @@ -391,7 +393,7 @@ then link_to_help exit 1 fi - echo "WARNING: The host '$hostname' could not be looked up with resolveip." + echo "WARNING: The host '$hostname' could not be looked up with $resolveip." echo "This probably means that your libc libraries are not 100 % compatible" echo "with this binary MariaDB version. The MariaDB daemon, mysqld, should work" echo "normally with the exception that host name resolving will not work." @@ -479,7 +481,7 @@ else echo "The problem could be conflicting information in an external" echo "my.cnf files. You can ignore these by doing:" echo - echo " shell> $scriptdir/scripts/mysql_install_db --defaults-file=~/.my.cnf" + echo " shell> $0 --defaults-file=~/.my.cnf" echo echo "You can also try to start the mysqld daemon with:" echo diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 5564f92a2..bcaf7b86f 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -246,7 +246,7 @@ wsrep_recover_position() { local euid=$(id -u) local ret=0 - local wr_logfile=$(mktemp wsrep_recovery.XXXXXX) + local wr_logfile=$(mktemp /tmp/wsrep_recovery.XXXXXX) # safety checks if [ -z $wr_logfile ]; then @@ -268,7 +268,7 @@ wsrep_recover_position() { log_notice "WSREP: Running position recovery with $wr_options" - eval_log_error "$mysqld_cmd --wsrep_recover $wr_options 2> $wr_logfile" + eval "$mysqld_cmd --wsrep_recover $wr_options 2> $wr_logfile" local rp="$(grep 'WSREP: Recovered position:' $wr_logfile)" if [ -z "$rp" ]; then diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 723fd311f..1ef483066 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -256,18 +256,18 @@ parse_cnf() # finally get the variable value (if variables has been specified multiple time use the last value only) # look in group+suffix - if [[ -n $WSREP_SST_OPT_CONF_SUFFIX ]]; then + if [ -n $WSREP_SST_OPT_CONF_SUFFIX ]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF "${group}${WSREP_SST_OPT_CONF_SUFFIX}" | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # look in group - if [[ -z $reval ]]; then + if [ -z $reval ]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # use default if we haven't found a value - if [[ -z $reval ]]; then - [[ -n $3 ]] && reval=$3 + if [ -z $reval ]; then + [ -n $3 ] && reval=$3 fi echo $reval } diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index 78a7d76da..faa7bc5e8 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -37,7 +37,6 @@ REMOTEIP="" REMOTEHOST="" tca="" tcert="" -tpem="" tkey="" sockopt="" progress="" @@ -358,8 +357,7 @@ get_transfer() if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then wsrep_log_info "Decrypting with CERT: $tcert, KEY: $tkey" tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=${tcert},key=${tkey},verify=0${joiner_extra}${sockopt} stdio" - tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=${tpem},key=${tkey},verify=0${sockopt} stdio" - else + else wsrep_log_info "Encrypting with CERT: $tcert, KEY: $tkey" tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=${tcert},key=${tkey},verify=0${sockopt}" fi diff --git a/sql-common/client.c b/sql-common/client.c index b7796cebe..ea686a79a 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1148,7 +1148,7 @@ void mysql_read_default_options(struct st_mysql_options *options, break; case OPT_pipe: options->protocol = MYSQL_PROTOCOL_PIPE; - break; + break; case OPT_connect_timeout: case OPT_timeout: if (opt_arg) diff --git a/sql/datadict.cc b/sql/datadict.cc index ee0d8805f..f01d61f53 100644 --- a/sql/datadict.cc +++ b/sql/datadict.cc @@ -45,6 +45,8 @@ static int read_string(File file, uchar**to, size_t length) engine_name is a LEX_STRING, where engine_name->str must point to a buffer of at least NAME_CHAR_LEN+1 bytes. + If engine_name is 0, then the function will only test if the file is a + view or not @retval FRMTYPE_ERROR error @retval FRMTYPE_TABLE table @@ -72,12 +74,23 @@ frm_type_enum dd_frm_type(THD *thd, char *path, LEX_STRING *engine_name) goto err; } + /* + We return FRMTYPE_TABLE if we can read the .frm file. This allows us + to drop a bad .frm file with DROP TABLE + */ type= FRMTYPE_TABLE; - if (!is_binary_frm_header(header) || !engine_name) + /* engine_name is 0 if we only want to know if table is view or not */ + if (!engine_name) goto err; + /* Initialize engine name in case we are not able to find it out */ engine_name->length= 0; + engine_name->str[0]= 0; + + if (!is_binary_frm_header(header)) + goto err; + dbt= header[3]; /* cannot use ha_resolve_by_legacy_type without a THD */ diff --git a/sql/events.cc b/sql/events.cc index 728d15e60..51f68ca4c 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -188,8 +188,8 @@ Events::reconstruct_interval_expression(String *buf, interval_type interval, expr= tmp_expr - (tmp_expr/60)*60; /* the code after the switch will finish */ - } break; + } case INTERVAL_HOUR_SECOND: { ulonglong tmp_expr= expr; @@ -205,8 +205,8 @@ Events::reconstruct_interval_expression(String *buf, interval_type interval, expr= tmp_expr - (tmp_expr/60)*60; /* the code after the switch will finish */ - } break; + } case INTERVAL_DAY_SECOND: { ulonglong tmp_expr= expr; @@ -228,8 +228,8 @@ Events::reconstruct_interval_expression(String *buf, interval_type interval, expr= tmp_expr - (tmp_expr/60)*60; /* the code after the switch will finish */ - } break; + } case INTERVAL_DAY_MICROSECOND: case INTERVAL_HOUR_MICROSECOND: case INTERVAL_MINUTE_MICROSECOND: @@ -243,7 +243,8 @@ Events::reconstruct_interval_expression(String *buf, interval_type interval, break; case INTERVAL_WEEK: expr/= 7; - /* fall through */ + close_quote= FALSE; + break; default: close_quote= FALSE; break; diff --git a/sql/field.cc b/sql/field.cc index 6a28b38a6..1ffe2ce78 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2008, 2013, Monty Program Ab. + Copyright (c) 2000, 2017, Oracle and/or its affiliates. + Copyright (c) 2008, 2017, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -8902,13 +8902,13 @@ String *Field_set::val_str(String *val_buffer, ulonglong tmp=(ulonglong) Field_enum::val_int(); uint bitnr=0; + /* + Some callers expect *val_buffer to contain the result, + so we assign to it, rather than doing 'return &empty_set_string. + */ + *val_buffer= empty_set_string; if (tmp == 0) { - /* - Some callers expect *val_buffer to contain the result, - so we assign to it, rather than doing 'return &empty_set_string. - */ - *val_buffer= empty_set_string; return val_buffer; } diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 6f3214bed..0649d5d44 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2005, 2013, Oracle and/or its affiliates. - Copyright (c) 2009, 2013, Monty Program Ab & SkySQL Ab + Copyright (c) 2005, 2017, Oracle and/or its affiliates. + Copyright (c) 2009, 2017, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1929,7 +1929,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info, cleanup_new_partition(part_count); DBUG_RETURN(error); } - + DBUG_PRINT("info", ("Add partition %s", part_name_buff)); if ((error= prepare_new_partition(table, create_info, new_file_array[i], diff --git a/sql/handler.cc b/sql/handler.cc index bea277a52..a5a28ceb7 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -405,7 +405,7 @@ static int ha_finish_errors(void) } static volatile int32 need_full_discover_for_existence= 0; -static volatile int32 engines_with_discover_table_names= 0; +static volatile int32 engines_with_discover_file_names= 0; static volatile int32 engines_with_discover= 0; static int full_discover_for_existence(handlerton *, const char *, const char *) @@ -430,8 +430,8 @@ static void update_discovery_counters(handlerton *hton, int val) if (hton->discover_table_existence == full_discover_for_existence) my_atomic_add32(&need_full_discover_for_existence, val); - if (hton->discover_table_names) - my_atomic_add32(&engines_with_discover_table_names, val); + if (hton->discover_table_names && hton->tablefile_extensions[0]) + my_atomic_add32(&engines_with_discover_file_names, val); if (hton->discover_table) my_atomic_add32(&engines_with_discover, val); @@ -5063,10 +5063,15 @@ bool ha_table_exists(THD *thd, const char *db, const char *table_name, { char engine_buf[NAME_CHAR_LEN + 1]; LEX_STRING engine= { engine_buf, 0 }; + frm_type_enum type; - if (dd_frm_type(thd, path, &engine) != FRMTYPE_VIEW) + if ((type= dd_frm_type(thd, path, &engine)) == FRMTYPE_ERROR) + DBUG_RETURN(0); + + if (type != FRMTYPE_VIEW) { - plugin_ref p= plugin_lock_by_name(thd, &engine, MYSQL_STORAGE_ENGINE_PLUGIN); + plugin_ref p= plugin_lock_by_name(thd, &engine, + MYSQL_STORAGE_ENGINE_PLUGIN); *hton= p ? plugin_hton(p) : NULL; if (*hton) // verify that the table really exists @@ -5189,6 +5194,7 @@ void Discovered_table_list::remove_duplicates() { LEX_STRING **src= tables->front(); LEX_STRING **dst= src; + sort(); while (++dst <= tables->back()) { LEX_STRING *s= *src, *d= *dst; @@ -5256,10 +5262,12 @@ int ha_discover_table_names(THD *thd, LEX_STRING *db, MY_DIR *dirp, int error; DBUG_ENTER("ha_discover_table_names"); - if (engines_with_discover_table_names == 0 && !reusable) + if (engines_with_discover_file_names == 0 && !reusable) { - error= ext_table_discovery_simple(dirp, result); - result->sort(); + st_discover_names_args args= {db, NULL, result, 0}; + error= ext_table_discovery_simple(dirp, result) || + plugin_foreach(thd, discover_names, + MYSQL_STORAGE_ENGINE_PLUGIN, &args); } else { @@ -5272,8 +5280,6 @@ int ha_discover_table_names(THD *thd, LEX_STRING *db, MY_DIR *dirp, error= extension_based_table_discovery(dirp, reg_ext, result) || plugin_foreach(thd, discover_names, MYSQL_STORAGE_ENGINE_PLUGIN, &args); - result->sort(); - if (args.possible_duplicates > 0) result->remove_duplicates(); } diff --git a/sql/item.cc b/sql/item.cc index da1692ecb..8c64a10c4 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -2133,6 +2133,9 @@ bool Item_func_or_sum::agg_item_set_converter(const DTCollation &coll, Item **args, uint nargs, uint flags, int item_sep) { + THD *thd= current_thd; + if (thd->lex->is_ps_or_view_context_analysis()) + return false; Item **arg, *safe_args[2]= {NULL, NULL}; /* @@ -2148,7 +2151,6 @@ bool Item_func_or_sum::agg_item_set_converter(const DTCollation &coll, safe_args[1]= args[item_sep]; } - THD *thd= current_thd; bool res= FALSE; uint i; @@ -2679,7 +2681,8 @@ table_map Item_field::all_used_tables() const return (get_depended_from() ? OUTER_REF_TABLE_BIT : field->table->map); } -void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref, + bool merge) { if (new_parent == get_depended_from()) depended_from= NULL; @@ -2723,6 +2726,19 @@ void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref) if (!need_change) return; + if (!merge) + { + /* + It is transformation without merge. + This field was "outer" for the inner SELECT where it was taken and + moved up. + "Outer" fields uses normal SELECT_LEX context of upper SELECTs for + name resolution, so we can switch everything to it safely. + */ + this->context= &new_parent->context; + return; + } + Name_resolution_context *ctx= new Name_resolution_context(); if (context->select_lex == new_parent) { @@ -5835,7 +5851,7 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table, Field_string(max_length, maybe_null, name, collation.collation); break; } - /* Fall through */ + /* fall through */ case MYSQL_TYPE_ENUM: case MYSQL_TYPE_SET: case MYSQL_TYPE_VAR_STRING: @@ -6640,6 +6656,7 @@ bool Item::cache_const_expr_analyzer(uchar **arg) */ if (const_item() && !(basic_const_item() || item->basic_const_item() || + item->type() == Item::NULL_ITEM || /* Item_name_const hack */ item->type() == Item::FIELD_ITEM || item->type() == SUBSELECT_ITEM || item->type() == CACHE_ITEM || @@ -6821,7 +6838,11 @@ class Dependency_marker: public Field_enumerator // Find which select the field is in. This is achieved by walking up // the select tree and looking for the table of interest. st_select_lex *sel; - for (sel= current_select; sel; sel= sel->outer_select()) + for (sel= current_select; + sel ; + sel= (sel->context.outer_context ? + sel->context.outer_context->select_lex: + NULL)) { List_iterator li(sel->leaf_tables); TABLE_LIST *tbl; @@ -7994,7 +8015,6 @@ bool Item_direct_view_ref::send(Protocol *protocol, String *buffer) bool Item_direct_view_ref::fix_fields(THD *thd, Item **reference) { - DBUG_ASSERT(1); /* view fild reference must be defined */ DBUG_ASSERT(*ref); /* (*ref)->check_cols() will be made in Item_direct_ref::fix_fields */ @@ -8055,18 +8075,19 @@ bool Item_outer_ref::fix_fields(THD *thd, Item **reference) void Item_outer_ref::fix_after_pullout(st_select_lex *new_parent, - Item **ref_arg) + Item **ref_arg, bool merge) { if (get_depended_from() == new_parent) { *ref_arg= outer_ref; - (*ref_arg)->fix_after_pullout(new_parent, ref_arg); + (*ref_arg)->fix_after_pullout(new_parent, ref_arg, merge); } } -void Item_ref::fix_after_pullout(st_select_lex *new_parent, Item **refptr) +void Item_ref::fix_after_pullout(st_select_lex *new_parent, Item **refptr, + bool merge) { - (*ref)->fix_after_pullout(new_parent, ref); + (*ref)->fix_after_pullout(new_parent, ref, merge); if (get_depended_from() == new_parent) depended_from= NULL; } @@ -9847,7 +9868,7 @@ void Item_direct_view_ref::update_used_tables() table_map Item_direct_view_ref::used_tables() const { - DBUG_ASSERT(null_ref_table); + DBUG_ASSERT(fixed); if (get_depended_from()) return OUTER_REF_TABLE_BIT; diff --git a/sql/item.h b/sql/item.h index c338b14e3..921179ce2 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1,8 +1,8 @@ #ifndef SQL_ITEM_INCLUDED #define SQL_ITEM_INCLUDED -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB +/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. + Copyright (c) 2009, 2017, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -729,7 +729,9 @@ class Item: public Value_source, Fix after some tables has been pulled out. Basically re-calculate all attributes that are dependent on the tables. */ - virtual void fix_after_pullout(st_select_lex *new_parent, Item **ref) {}; + virtual void fix_after_pullout(st_select_lex *new_parent, Item **ref, + bool merge) + {}; /* This method should be used in case where we are sure that we do not need @@ -2384,7 +2386,7 @@ class Item_field :public Item_ident bool send(Protocol *protocol, String *str_arg); void reset_field(Field *f); bool fix_fields(THD *, Item **); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); void make_field(Send_field *tmp_field); int save_in_field(Field *field,bool no_conversions); void save_org_in_field(Field *field, fast_field_copier optimizer_data); @@ -2581,6 +2583,17 @@ class Item_null_result :public Item_null Field *result_field; Item_null_result(THD *thd): Item_null(thd), result_field(0) {} bool is_result_field() { return result_field != 0; } +#if MARIADB_VERSION_ID < 100300 + enum_field_types field_type() const + { + return result_field->type(); + } +#else + const Type_handler *type_handler() const + { + return result_field->type_handler(); + } +#endif void save_in_result_field(bool no_conversions) { save_in_field(result_field, no_conversions); @@ -3894,7 +3907,7 @@ class Item_ref :public Item_ident bool send(Protocol *prot, String *tmp); void make_field(Send_field *field); bool fix_fields(THD *, Item **); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); int save_in_field(Field *field, bool no_conversions); void save_org_in_field(Field *field, fast_field_copier optimizer_data); fast_field_copier setup_fast_field_copier(Field *field) @@ -4131,6 +4144,8 @@ class Item_cache_wrapper :public Item_result_field bool fix_fields(THD *thd, Item **it); void cleanup(); + Item *get_orig_item() const { return orig_item; } + /* Methods of getting value which should be cached in the cache */ void save_val(Field *to); double val_real(); @@ -4162,9 +4177,9 @@ class Item_cache_wrapper :public Item_result_field Item *it= ((Item *) item)->real_item(); return orig_item->eq(it, binary_cmp); } - void fix_after_pullout(st_select_lex *new_parent, Item **refptr) + void fix_after_pullout(st_select_lex *new_parent, Item **refptr, bool merge) { - orig_item->fix_after_pullout(new_parent, &orig_item); + orig_item->fix_after_pullout(new_parent, &orig_item, merge); } int save_in_field(Field *to, bool no_conversions); enum Item_result result_type () const { return orig_item->result_type(); } @@ -4422,7 +4437,7 @@ class Item_outer_ref :public Item_direct_ref outer_ref->save_org_in_field(result_field, NULL); } bool fix_fields(THD *, Item **); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); table_map used_tables() const { return (*ref)->const_item() ? 0 : OUTER_REF_TABLE_BIT; diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index e45e568e3..fcb78ca00 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1229,10 +1229,11 @@ bool Item_in_optimizer::is_top_level_item() } -void Item_in_optimizer::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_in_optimizer::fix_after_pullout(st_select_lex *new_parent, + Item **ref, bool merge) { /* This will re-calculate attributes of our Item_in_subselect: */ - Item_bool_func::fix_after_pullout(new_parent, ref); + Item_bool_func::fix_after_pullout(new_parent, ref, merge); /* Then, re-calculate not_null_tables_cache: */ eval_not_null_tables(NULL); @@ -2060,10 +2061,11 @@ bool Item_func_between::count_sargable_conds(uchar *arg) } -void Item_func_between::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_func_between::fix_after_pullout(st_select_lex *new_parent, + Item **ref, bool merge) { /* This will re-calculate attributes of the arguments */ - Item_func_opt_neg::fix_after_pullout(new_parent, ref); + Item_func_opt_neg::fix_after_pullout(new_parent, ref, merge); /* Then, re-calculate not_null_tables_cache according to our special rules */ eval_not_null_tables(NULL); } @@ -2406,10 +2408,11 @@ Item_func_if::eval_not_null_tables(uchar *opt_arg) } -void Item_func_if::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_func_if::fix_after_pullout(st_select_lex *new_parent, + Item **ref, bool merge) { /* This will re-calculate attributes of the arguments */ - Item_func::fix_after_pullout(new_parent, ref); + Item_func::fix_after_pullout(new_parent, ref, merge); /* Then, re-calculate not_null_tables_cache according to our special rules */ eval_not_null_tables(NULL); } @@ -4138,10 +4141,11 @@ Item_func_in::eval_not_null_tables(uchar *opt_arg) } -void Item_func_in::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_func_in::fix_after_pullout(st_select_lex *new_parent, Item **ref, + bool merge) { /* This will re-calculate attributes of the arguments */ - Item_func_opt_neg::fix_after_pullout(new_parent, ref); + Item_func_opt_neg::fix_after_pullout(new_parent, ref, merge); /* Then, re-calculate not_null_tables_cache according to our special rules */ eval_not_null_tables(NULL); } @@ -4663,7 +4667,8 @@ Item_cond::eval_not_null_tables(uchar *opt_arg) } -void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref, + bool merge) { List_iterator li(list); Item *item; @@ -4676,7 +4681,7 @@ void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref) while ((item=li++)) { table_map tmp_table_map; - item->fix_after_pullout(new_parent, li.ref()); + item->fix_after_pullout(new_parent, li.ref(), merge); item= *li.ref(); used_tables_and_const_cache_join(item); @@ -5412,7 +5417,7 @@ void Regexp_processor_pcre::pcre_exec_warn(int rc) const switch (rc) { case PCRE_ERROR_NULL: - errmsg= "pcre_exec: null arguement passed"; + errmsg= "pcre_exec: null argument passed"; break; case PCRE_ERROR_BADOPTION: errmsg= "pcre_exec: bad option"; diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index a34e70f99..cc3362893 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -342,7 +342,7 @@ class Item_in_optimizer: public Item_bool_func virtual void get_cache_parameters(List ¶meters); bool is_top_level_item(); bool eval_not_null_tables(uchar *opt_arg); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); bool invisible_mode(); void reset_cache() { cache= NULL; } }; @@ -824,7 +824,7 @@ class Item_func_between :public Item_func_opt_neg void fix_length_and_dec(); virtual void print(String *str, enum_query_type query_type); bool eval_not_null_tables(uchar *opt_arg); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); bool count_sargable_conds(uchar *arg); void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, table_map usable_tables, @@ -980,7 +980,7 @@ class Item_func_if :public Item_func_case_abbreviation2 } const char *func_name() const { return "if"; } bool eval_not_null_tables(uchar *opt_arg); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); private: void cache_type_info(Item *source); }; @@ -1595,7 +1595,7 @@ class Item_func_in :public Item_func_opt_neg enum Functype functype() const { return IN_FUNC; } const char *func_name() const { return " IN "; } bool eval_not_null_tables(uchar *opt_arg); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); bool count_sargable_conds(uchar *arg); }; @@ -2063,7 +2063,7 @@ class Item_cond :public Item_bool_func list.append(nlist); } bool fix_fields(THD *, Item **ref); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); enum Type type() const { return COND_ITEM; } List* argument_list() { return &list; } diff --git a/sql/item_func.cc b/sql/item_func.cc index 5539ba7fc..6b444a7e8 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -270,7 +270,8 @@ Item_func::eval_not_null_tables(uchar *opt_arg) } -void Item_func::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_func::fix_after_pullout(st_select_lex *new_parent, Item **ref, + bool merge) { Item **arg,**arg_end; @@ -281,7 +282,7 @@ void Item_func::fix_after_pullout(st_select_lex *new_parent, Item **ref) { for (arg=args, arg_end=args+arg_count; arg != arg_end ; arg++) { - (*arg)->fix_after_pullout(new_parent, arg); + (*arg)->fix_after_pullout(new_parent, arg, merge); Item *item= *arg; used_tables_and_const_cache_join(item); diff --git a/sql/item_func.h b/sql/item_func.h index ec8ec6fca..1209fc5cd 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -126,7 +126,7 @@ class Item_func :public Item_func_or_sum Item_func_or_sum::cleanup(); used_tables_and_const_cache_init(); } - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); void quick_fix_field(); table_map not_null_tables() const; void update_used_tables() diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index fd7241b7b..51a4636df 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -1194,6 +1194,8 @@ static int setup_relate_func(Geometry *g1, Geometry *g2, } else func->repeat_expression(shape_a); + if (func->reserve_op_buffer(1)) + return 1; func->add_operation(op_matrix(nc%3), 1); if (do_store_shapes) { @@ -1364,11 +1366,13 @@ longlong Item_func_spatial_precise_rel::val_int() Gcalc_function::op_intersection, 2); func.add_operation(Gcalc_function::op_internals, 1); shape_a= func.get_next_expression_pos(); - if ((null_value= g1.store_shapes(&trn))) + if ((null_value= g1.store_shapes(&trn)) || + func.reserve_op_buffer(1)) break; func.add_operation(Gcalc_function::op_internals, 1); shape_b= func.get_next_expression_pos(); - if ((null_value= g2.store_shapes(&trn))) + if ((null_value= g2.store_shapes(&trn)) || + func.reserve_op_buffer(1)) break; func.add_operation(Gcalc_function::v_find_t | Gcalc_function::op_intersection, 2); @@ -1603,6 +1607,8 @@ int Item_func_buffer::Transporter::single_point(double x, double y) { if (buffer_op == Gcalc_function::op_difference) { + if (m_fn->reserve_op_buffer(1)) + return 1; m_fn->add_operation(Gcalc_function::op_false, 0); return 0; } diff --git a/sql/item_inetfunc.cc b/sql/item_inetfunc.cc index 6a09747fa..4c4dfa449 100644 --- a/sql/item_inetfunc.cc +++ b/sql/item_inetfunc.cc @@ -181,7 +181,8 @@ String *Item_func_inet_str_base::val_str_ascii(String *buffer) return NULL; } - String *arg_str= args[0]->val_str(buffer); + StringBuffer tmp; + String *arg_str= args[0]->val_str(&tmp); if (!arg_str) // Out-of memory happened. The error has been reported. { // Or: the underlying field is NULL null_value= true; @@ -679,7 +680,7 @@ static void ipv6_to_str(const in6_addr *ipv6, char *str) @retval true The string has been converted sucessfully. */ -bool Item_func_inet6_aton::calc_value(String *arg, String *buffer) +bool Item_func_inet6_aton::calc_value(const String *arg, String *buffer) { // ipv4-string -> varbinary(4) // ipv6-string -> varbinary(16) @@ -719,7 +720,7 @@ bool Item_func_inet6_aton::calc_value(String *arg, String *buffer) @retval true The string has been converted sucessfully. */ -bool Item_func_inet6_ntoa::calc_value(String *arg, String *buffer) +bool Item_func_inet6_ntoa::calc_value(const String *arg, String *buffer) { if (arg->charset() != &my_charset_bin) return false; diff --git a/sql/item_inetfunc.h b/sql/item_inetfunc.h index 82a4405df..eaafd005f 100644 --- a/sql/item_inetfunc.h +++ b/sql/item_inetfunc.h @@ -98,7 +98,7 @@ class Item_func_inet_str_base : public Item_str_ascii_func virtual String *val_str_ascii(String *buffer); protected: - virtual bool calc_value(String *arg, String *buffer) = 0; + virtual bool calc_value(const String *arg, String *buffer) = 0; }; @@ -125,7 +125,7 @@ class Item_func_inet6_aton : public Item_func_inet_str_base } protected: - virtual bool calc_value(String *arg, String *buffer); + virtual bool calc_value(const String *arg, String *buffer); }; @@ -157,7 +157,7 @@ class Item_func_inet6_ntoa : public Item_func_inet_str_base } protected: - virtual bool calc_value(String *arg, String *buffer); + virtual bool calc_value(const String *arg, String *buffer); }; diff --git a/sql/item_row.cc b/sql/item_row.cc index b1575b810..97f75c4b4 100644 --- a/sql/item_row.cc +++ b/sql/item_row.cc @@ -24,7 +24,6 @@ #include "sql_class.h" // THD, set_var.h: THD #include "set_var.h" - void Item_row::illegal_method_call(const char *method) { DBUG_ENTER("Item_row::illegal_method_call"); @@ -110,13 +109,14 @@ void Item_row::split_sum_func(THD *thd, Item **ref_pointer_array, } -void Item_row::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_row::fix_after_pullout(st_select_lex *new_parent, Item **ref, + bool merge) { used_tables_and_const_cache_init(); not_null_tables_cache= 0; for (uint i= 0; i < arg_count; i++) { - args[i]->fix_after_pullout(new_parent, &args[i]); + args[i]->fix_after_pullout(new_parent, &args[i], merge); used_tables_and_const_cache_join(args[i]); not_null_tables_cache|= args[i]->not_null_tables(); } diff --git a/sql/item_row.h b/sql/item_row.h index 25c9ec791..5e8071ec4 100644 --- a/sql/item_row.h +++ b/sql/item_row.h @@ -47,13 +47,10 @@ class Item_row: public Item, Item_row(THD *thd, List &list): Item(thd), Item_args(thd, list), not_null_tables_cache(0), with_null(0) { } - Item_row(THD *thd, Item_row *item): - Item(thd), - Item_args(item), - Used_tables_and_const_cache(item), - not_null_tables_cache(0), - with_null(0) - {} + Item_row(THD *thd, Item_row *row): + Item(thd), Item_args(thd, static_cast(row)), Used_tables_and_const_cache(), + not_null_tables_cache(0), with_null(0) + { } enum Type type() const { return ROW_ITEM; }; void illegal_method_call(const char *); @@ -83,7 +80,7 @@ class Item_row: public Item, return 0; }; bool fix_fields(THD *thd, Item **ref); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); void cleanup(); void split_sum_func(THD *thd, Item **ref_pointer_array, List &fields, uint flags); diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 12230014f..1c1f09c45 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -447,7 +447,8 @@ bool Item_subselect::mark_as_dependent(THD *thd, st_select_lex *select, OUTER_REF_TABLE_BIT. */ -void Item_subselect::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_subselect::fix_after_pullout(st_select_lex *new_parent, + Item **ref, bool merge) { recalc_used_tables(new_parent, TRUE); parent_select= new_parent; @@ -1153,7 +1154,8 @@ Item_singlerow_subselect::select_transformer(JOIN *join) /* as far as we moved content to upper level we have to fix dependences & Co */ - substitution->fix_after_pullout(select_lex->outer_select(), &substitution); + substitution->fix_after_pullout(select_lex->outer_select(), + &substitution, TRUE); } DBUG_RETURN(false); } @@ -1439,6 +1441,10 @@ Item_in_subselect::Item_in_subselect(THD *thd, Item * left_exp, DBUG_ENTER("Item_in_subselect::Item_in_subselect"); DBUG_PRINT("info", ("in_strategy: %u", (uint)in_strategy)); left_expr_orig= left_expr= left_exp; + /* prepare to possible disassembling the item in convert_subq_to_sj() */ + if (left_exp->type() == Item::ROW_ITEM) + left_expr_orig= new (thd->mem_root) + Item_row(thd, static_cast(left_exp)); func= &eq_creator; init(select_lex, new (thd->mem_root) select_exists_subselect(thd, this)); max_columns= UINT_MAX; @@ -1462,6 +1468,10 @@ Item_allany_subselect::Item_allany_subselect(THD *thd, Item * left_exp, { DBUG_ENTER("Item_allany_subselect::Item_allany_subselect"); left_expr_orig= left_expr= left_exp; + /* prepare to possible disassembling the item in convert_subq_to_sj() */ + if (left_exp->type() == Item::ROW_ITEM) + left_expr_orig= new (thd->mem_root) + Item_row(thd, static_cast(left_exp)); func= func_creator(all_arg); init(select_lex, new (thd->mem_root) select_exists_subselect(thd, this)); max_columns= 1; @@ -2926,7 +2936,7 @@ bool Item_exists_subselect::exists2in_processor(uchar *opt_arg) goto out; } } - outer_exp->fix_after_pullout(unit->outer_select(), &outer_exp); + outer_exp->fix_after_pullout(unit->outer_select(), &outer_exp, FALSE); outer_exp->update_used_tables(); outer.push_back(outer_exp, thd->mem_root); } @@ -3307,10 +3317,11 @@ bool Item_in_subselect::fix_fields(THD *thd_arg, Item **ref) } -void Item_in_subselect::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_in_subselect::fix_after_pullout(st_select_lex *new_parent, + Item **ref, bool merge) { - left_expr->fix_after_pullout(new_parent, &left_expr); - Item_subselect::fix_after_pullout(new_parent, ref); + left_expr->fix_after_pullout(new_parent, &left_expr, merge); + Item_subselect::fix_after_pullout(new_parent, ref, merge); used_tables_cache |= left_expr->used_tables(); } diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 009aff5ed..424ea6f05 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -169,7 +169,7 @@ class Item_subselect :public Item_result_field, } bool fix_fields(THD *thd, Item **ref); bool mark_as_dependent(THD *thd, st_select_lex *select, Item *item); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); void recalc_used_tables(st_select_lex *new_parent, bool after_pullout); virtual bool exec(); /* @@ -607,7 +607,7 @@ class Item_in_subselect :public Item_exists_subselect virtual void print(String *str, enum_query_type query_type); bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec(); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); bool const_item() const { return Item_subselect::const_item() && left_expr->const_item(); diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index d8a37b373..4a94c3a5f 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -1793,9 +1793,18 @@ bool Item_func_sec_to_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) ltime->hour= TIME_MAX_HOUR+1; check_time_range(ltime, decimals, &unused); - make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, - err->ptr(), err->length(), - MYSQL_TIMESTAMP_TIME, NullS); + if (!err) + { + ErrConvInteger err2(sec, unsigned_flag); + make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, + &err2, MYSQL_TIMESTAMP_TIME, NullS); + } + else + { + ErrConvString err2(err); + make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, + &err2, MYSQL_TIMESTAMP_TIME, NullS); + } return 0; } diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 0e9329d50..927ce12f0 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -502,8 +502,16 @@ class Item_temporal_func: public Item_func { return val_decimal_from_date(decimal_value); } Field *create_field_for_create_select(TABLE *table) { return tmp_table_field_from_field_type(table, false, false); } +#if MARIADB_VERSION_ID > 100300 +#error This code should be removed in 10.3, to use the derived save_in_field() +#else int save_in_field(Field *field, bool no_conversions) - { return save_date_in_field(field); } + { + return field_type() == MYSQL_TYPE_TIME ? + save_time_in_field(field) : + save_date_in_field(field); + } +#endif void fix_length_and_dec(); }; diff --git a/sql/log_event.cc b/sql/log_event.cc index 92885344c..f2f7b8776 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2469,8 +2469,8 @@ log_event_print_value(IO_CACHE *file, const uchar *ptr, case 2: { strmake(typestr, "ENUM(2 bytes)", typestr_length); - if (!ptr) - goto return_null; + if (!ptr) + goto return_null; int32 i32= uint2korr(ptr); my_b_printf(file, "%d", i32); @@ -7857,21 +7857,6 @@ User_var_log_event(const char* buf, uint event_len, we keep the flags set to UNDEF_F. */ uint bytes_read= ((val + val_len) - buf_start); -#ifndef DBUG_OFF - bool old_pre_checksum_fd= description_event->is_version_before_checksum( - &description_event->server_version_split); -#endif - DBUG_ASSERT((bytes_read == data_written - - (old_pre_checksum_fd || - (description_event->checksum_alg == - BINLOG_CHECKSUM_ALG_OFF)) ? - 0 : BINLOG_CHECKSUM_LEN) - || - (bytes_read == data_written -1 - - (old_pre_checksum_fd || - (description_event->checksum_alg == - BINLOG_CHECKSUM_ALG_OFF)) ? - 0 : BINLOG_CHECKSUM_LEN)); if ((data_written - bytes_read) > 0) { flags= (uint) *(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE + diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 97d63d994..8b7fdd2f7 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5747,9 +5747,6 @@ int mysqld_main(int argc, char **argv) #ifdef __WIN__ if (!opt_console) { - if (reopen_fstreams(log_error_file, stdout, stderr)) - unireg_abort(1); - setbuf(stderr, NULL); FreeConsole(); // Remove window } diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 1c41aa79a..5377e4e4a 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -8337,6 +8337,34 @@ bool sel_trees_can_be_ored(RANGE_OPT_PARAM* param, DBUG_RETURN(!common_keys->is_clear_all()); } +/* + Check whether the key parts inf_init..inf_end-1 of one index can compose + an infix for the key parts key_init..key_end-1 of another index +*/ + +static +bool is_key_infix(KEY_PART *key_init, KEY_PART *key_end, + KEY_PART *inf_init, KEY_PART *inf_end) +{ + KEY_PART *key_part, *inf_part; + for (key_part= key_init; key_part < key_end; key_part++) + { + if (key_part->field->eq(inf_init->field)) + break; + } + if (key_part == key_end) + return false; + for (key_part++, inf_part= inf_init + 1; + key_part < key_end && inf_part < inf_end; + key_part++, inf_part++) + { + if (!key_part->field->eq(inf_part->field)) + return false; + } + return inf_part == inf_end; +} + + /* Check whether range parts of two trees must be ored for some indexes @@ -8393,14 +8421,9 @@ bool sel_trees_must_be_ored(RANGE_OPT_PARAM* param, KEY_PART *key2_init= param->key[idx2]+tree2->keys[idx2]->part; KEY_PART *key2_end= param->key[idx2]+tree2->keys[idx2]->max_part_no; - KEY_PART *part1, *part2; - for (part1= key1_init, part2= key2_init; - part1 < key1_end && part2 < key2_end; - part1++, part2++) - { - if (!part1->field->eq(part2->field)) - DBUG_RETURN(FALSE); - } + if (!is_key_infix(key1_init, key1_end, key2_init, key2_end) && + !is_key_infix(key2_init, key2_end, key1_init, key1_end)) + DBUG_RETURN(FALSE); } } diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 3680dce81..138af3f14 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -1612,6 +1612,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) sj-nest. */ st_select_lex *subq_lex= subq_pred->unit->first_select(); + DBUG_ASSERT(subq_lex->next_select() == NULL); nested_join->join_list.empty(); List_iterator_fast li(subq_lex->top_join_list); TABLE_LIST *tl; @@ -1664,7 +1665,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) { tl->jtbm_table_no= table_no; Item *dummy= tl->jtbm_subselect; - tl->jtbm_subselect->fix_after_pullout(parent_lex, &dummy); + tl->jtbm_subselect->fix_after_pullout(parent_lex, &dummy, true); DBUG_ASSERT(dummy == tl->jtbm_subselect); } SELECT_LEX *old_sl= tl->select_lex; @@ -1715,7 +1716,8 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) if (subq_pred->left_expr->cols() == 1) { - nested_join->sj_outer_expr_list.push_back(subq_pred->left_expr, + /* add left = select_list_element */ + nested_join->sj_outer_expr_list.push_back(&subq_pred->left_expr, thd->mem_root); /* Create Item_func_eq. Note that @@ -1729,26 +1731,62 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) Item_func_eq *item_eq= new (thd->mem_root) Item_func_eq(thd, subq_pred->left_expr_orig, subq_lex->ref_pointer_array[0]); + if (!item_eq) + DBUG_RETURN(TRUE); if (subq_pred->left_expr_orig != subq_pred->left_expr) thd->change_item_tree(item_eq->arguments(), subq_pred->left_expr); item_eq->in_equality_no= 0; sj_nest->sj_on_expr= and_items(thd, sj_nest->sj_on_expr, item_eq); } - else + else if (subq_pred->left_expr->type() == Item::ROW_ITEM) { + /* + disassemple left expression and add + left1 = select_list_element1 and left2 = select_list_element2 ... + */ for (uint i= 0; i < subq_pred->left_expr->cols(); i++) { - nested_join->sj_outer_expr_list.push_back(subq_pred->left_expr-> - element_index(i), + nested_join->sj_outer_expr_list.push_back(subq_pred->left_expr->addr(i), thd->mem_root); - Item_func_eq *item_eq= + Item_func_eq *item_eq= new (thd->mem_root) - Item_func_eq(thd, subq_pred->left_expr->element_index(i), + Item_func_eq(thd, subq_pred->left_expr_orig->element_index(i), subq_lex->ref_pointer_array[i]); + if (!item_eq) + DBUG_RETURN(TRUE); + DBUG_ASSERT(subq_pred->left_expr->element_index(i)->fixed); + if (subq_pred->left_expr_orig->element_index(i) != + subq_pred->left_expr->element_index(i)) + thd->change_item_tree(item_eq->arguments(), + subq_pred->left_expr->element_index(i)); item_eq->in_equality_no= i; sj_nest->sj_on_expr= and_items(thd, sj_nest->sj_on_expr, item_eq); } } + else + { + /* + add row operation + left = (select_list_element1, select_list_element2, ...) + */ + Item_row *row= new (thd->mem_root) Item_row(thd, subq_lex->pre_fix); + /* fix fields on subquery was call so they should be the same */ + DBUG_ASSERT(subq_pred->left_expr->cols() == row->cols()); + if (!row) + DBUG_RETURN(TRUE); + nested_join->sj_outer_expr_list.push_back(&subq_pred->left_expr); + Item_func_eq *item_eq= + new (thd->mem_root) Item_func_eq(thd, subq_pred->left_expr_orig, row); + if (!item_eq) + DBUG_RETURN(TRUE); + for (uint i= 0; i < row->cols(); i++) + { + if (row->element_index(i) != subq_lex->ref_pointer_array[i]) + thd->change_item_tree(row->addr(i), subq_lex->ref_pointer_array[i]); + } + item_eq->in_equality_no= 0; + sj_nest->sj_on_expr= and_items(thd, sj_nest->sj_on_expr, item_eq); + } /* Fix the created equality and AND @@ -1768,7 +1806,8 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) Walk through sj nest's WHERE and ON expressions and call item->fix_table_changes() for all items. */ - sj_nest->sj_on_expr->fix_after_pullout(parent_lex, &sj_nest->sj_on_expr); + sj_nest->sj_on_expr->fix_after_pullout(parent_lex, &sj_nest->sj_on_expr, + TRUE); fix_list_after_tbl_changes(parent_lex, &sj_nest->nested_join->join_list); @@ -1927,7 +1966,7 @@ static bool convert_subq_to_jtbm(JOIN *parent_join, DBUG_ASSERT(parent_join->table_count < MAX_TABLES); Item *conds= hash_sj_engine->semi_join_conds; - conds->fix_after_pullout(parent_lex, &conds); + conds->fix_after_pullout(parent_lex, &conds, TRUE); DBUG_EXECUTE("where", print_where(conds,"SJ-EXPR", QT_ORDINARY);); @@ -1979,7 +2018,7 @@ void fix_list_after_tbl_changes(SELECT_LEX *new_parent, List *tlist) while ((table= it++)) { if (table->on_expr) - table->on_expr->fix_after_pullout(new_parent, &table->on_expr); + table->on_expr->fix_after_pullout(new_parent, &table->on_expr, TRUE); if (table->nested_join) fix_list_after_tbl_changes(new_parent, &table->nested_join->join_list); } @@ -3302,8 +3341,8 @@ void restore_prev_sj_state(const table_map remaining_tables, ulonglong get_bound_sj_equalities(TABLE_LIST *sj_nest, table_map remaining_tables) { - List_iterator li(sj_nest->nested_join->sj_outer_expr_list); - Item *item; + List_iterator li(sj_nest->nested_join->sj_outer_expr_list); + Item **item; uint i= 0; ulonglong res= 0; while ((item= li++)) @@ -3314,7 +3353,7 @@ ulonglong get_bound_sj_equalities(TABLE_LIST *sj_nest, class and see if there is an element that is bound? (this is an optional feature) */ - if (!(item->used_tables() & remaining_tables)) + if (!(item[0]->used_tables() & remaining_tables)) { res |= 1ULL << i; } diff --git a/sql/partition_info.cc b/sql/partition_info.cc index cd0ab970d..ce9329e8f 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -39,9 +39,6 @@ partition_info *partition_info::get_clone(THD *thd) { MEM_ROOT *mem_root= thd->mem_root; DBUG_ENTER("partition_info::get_clone"); - - if (!this) - DBUG_RETURN(NULL); List_iterator part_it(partitions); partition_element *part; partition_info *clone= new (mem_root) partition_info(); diff --git a/sql/slave.cc b/sql/slave.cc index db1c3305b..da394ff71 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3188,7 +3188,6 @@ static int init_slave_thread(THD* thd, Master_info *mi, thd->variables.sql_log_slow= opt_log_slow_slave_statements; thd->variables.log_slow_filter= global_system_variables.log_slow_filter; set_slave_thread_options(thd); - thd->client_capabilities = CLIENT_LOCAL_FILES; mysql_mutex_lock(&LOCK_thread_count); thd->thread_id= thd->variables.pseudo_thread_id= thread_id++; mysql_mutex_unlock(&LOCK_thread_count); diff --git a/sql/sp_head.cc b/sql/sp_head.cc index ae274ee87..257a1d36a 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -141,7 +141,6 @@ sp_get_item_value(THD *thd, Item *item, String *str) case DECIMAL_RESULT: if (item->field_type() != MYSQL_TYPE_BIT) return item->val_str(str); - else {/* Bit type is handled as binary string */} /* fall through */ case STRING_RESULT: { @@ -2537,10 +2536,18 @@ bool check_show_routine_access(THD *thd, sp_head *sp, bool *full_access) *full_access= ((!check_table_access(thd, SELECT_ACL, &tables, FALSE, 1, TRUE) && (tables.grant.privilege & SELECT_ACL) != 0) || + /* Check if user owns the routine. */ (!strcmp(sp->m_definer_user.str, thd->security_ctx->priv_user) && !strcmp(sp->m_definer_host.str, - thd->security_ctx->priv_host))); + thd->security_ctx->priv_host)) || + /* Check if current role or any of the sub-granted roles + own the routine. */ + (sp->m_definer_host.length == 0 && + (!strcmp(sp->m_definer_user.str, + thd->security_ctx->priv_role) || + check_role_is_granted(thd->security_ctx->priv_role, NULL, + sp->m_definer_user.str)))); if (!*full_access) return check_some_routine_access(thd, sp->m_db.str, sp->m_name.str, sp->m_type == TYPE_ENUM_PROCEDURE); @@ -4325,4 +4332,3 @@ sp_add_to_query_tables(THD *thd, LEX *lex, lex->add_to_query_tables(table); return table; } - diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index f72614790..5ccc5f751 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -634,9 +634,6 @@ bool ROLE_GRANT_PAIR::init(MEM_ROOT *mem, char *username, char *hostname, char *rolename, bool with_admin_option) { - if (!this) - return true; - size_t uname_l = safe_strlen(username); size_t hname_l = safe_strlen(hostname); size_t rname_l = safe_strlen(rolename); @@ -8473,6 +8470,17 @@ void get_mqh(const char *user, const char *host, USER_CONN *uc) mysql_mutex_unlock(&acl_cache->lock); } +static int check_role_is_granted_callback(ACL_USER_BASE *grantee, void *data) +{ + LEX_CSTRING *rolename= static_cast(data); + if (rolename->length == grantee->user.length && + !strcmp(rolename->str, grantee->user.str)) + return -1; // End search, we've found our role. + + /* Keep looking, we haven't found our role yet. */ + return 0; +} + /* Initialize a TABLE_LIST array and open grant tables @@ -10452,7 +10460,6 @@ bool check_grant(THD *, ulong, TABLE_LIST *, bool, uint, bool) } #endif /*NO_EMBEDDED_ACCESS_CHECKS */ - SHOW_VAR acl_statistics[] = { #ifndef NO_EMBEDDED_ACCESS_CHECKS {"column_grants", (char*)show_column_grants, SHOW_SIMPLE_FUNC}, @@ -10468,6 +10475,43 @@ SHOW_VAR acl_statistics[] = { {NullS, NullS, SHOW_LONG}, }; +/* Check if a role is granted to a user/role. We traverse the role graph + and return true if we find a match. + + hostname == NULL means we are looking for a role as a starting point, + otherwise a user. +*/ +bool check_role_is_granted(const char *username, + const char *hostname, + const char *rolename) +{ + DBUG_ENTER("check_role_is_granted"); + bool result= false; +#ifndef NO_EMBEDDED_ACCESS_CHECKS + ACL_USER_BASE *root; + mysql_mutex_lock(&acl_cache->lock); + if (hostname) + root= find_user_exact(username, hostname); + else + root= find_acl_role(username); + + LEX_CSTRING role_lex; + role_lex.str= rolename; + role_lex.length= strlen(rolename); + + if (root && /* No grantee, nothing to search. */ + traverse_role_graph_down(root, &role_lex, check_role_is_granted_callback, + NULL) == -1) + { + /* We have found the role during our search. */ + result= true; + } + + /* We haven't found the role or we had no initial grantee to start from. */ + mysql_mutex_unlock(&acl_cache->lock); +#endif + DBUG_RETURN(result); +} int fill_schema_enabled_roles(THD *thd, TABLE_LIST *tables, COND *cond) { @@ -12839,4 +12883,3 @@ maria_declare_plugin(mysql_password) MariaDB_PLUGIN_MATURITY_STABLE /* Maturity */ } maria_declare_plugin_end; - diff --git a/sql/sql_acl.h b/sql/sql_acl.h index 0893504b7..c2ad9a649 100644 --- a/sql/sql_acl.h +++ b/sql/sql_acl.h @@ -406,6 +406,14 @@ int acl_set_default_role(THD *thd, const char *host, const char *user, extern SHOW_VAR acl_statistics[]; +/* Check if a role is granted to a user/role. + + If hostname == NULL, search for a role as the starting grantee. +*/ +bool check_role_is_granted(const char *username, + const char *hostname, + const char *rolename); + #ifndef DBUG_OFF extern ulong role_global_merges, role_db_merges, role_table_merges, role_column_merges, role_routine_merges; diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 1f4426f20..0888f012d 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -66,7 +66,6 @@ static bool admin_recreate_table(THD *thd, TABLE_LIST *table_list) if (thd->get_stmt_da()->is_ok()) thd->get_stmt_da()->reset_diagnostics_area(); table_list->table= NULL; - result_code= result_code ? HA_ADMIN_FAILED : HA_ADMIN_OK; DBUG_RETURN(result_code); } diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 1aaeb2a55..d3d33e04d 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -7853,13 +7853,15 @@ int setup_wild(THD *thd, TABLE_LIST *tables, List &fields, bool setup_fields(THD *thd, Item **ref_pointer_array, List &fields, enum_mark_columns mark_used_columns, - List *sum_func_list, bool allow_sum_func) + List *sum_func_list, List *pre_fix, + bool allow_sum_func) { reg2 Item *item; enum_mark_columns save_mark_used_columns= thd->mark_used_columns; nesting_map save_allow_sum_func= thd->lex->allow_sum_func; List_iterator it(fields); bool save_is_item_list_lookup; + bool make_pre_fix= (pre_fix && (pre_fix->elements == 0)); DBUG_ENTER("setup_fields"); DBUG_PRINT("enter", ("ref_pointer_array: %p", ref_pointer_array)); @@ -7906,6 +7908,9 @@ bool setup_fields(THD *thd, Item **ref_pointer_array, thd->lex->current_select->cur_pos_in_select_list= 0; while ((item= it++)) { + if (make_pre_fix) + pre_fix->push_back(item, thd->stmt_arena->mem_root); + if ((!item->fixed && item->fix_fields(thd, it.ref())) || (item= *(it.ref()))->check_cols(1)) { diff --git a/sql/sql_base.h b/sql/sql_base.h index 9e37a43aa..c73ea3745 100644 --- a/sql/sql_base.h +++ b/sql/sql_base.h @@ -174,7 +174,8 @@ int setup_wild(THD *thd, TABLE_LIST *tables, List &fields, List *sum_func_list, uint wild_num); bool setup_fields(THD *thd, Item** ref_pointer_array, List &item, enum_mark_columns mark_used_columns, - List *sum_func_list, bool allow_sum_func); + List *sum_func_list, List *pre_fix, + bool allow_sum_func); void unfix_fields(List &items); bool fill_record(THD * thd, TABLE *table_arg, List &fields, List &values, bool ignore_errors); @@ -405,7 +406,7 @@ inline bool setup_fields_with_no_wrap(THD *thd, Item **ref_pointer_array, bool res; thd->lex->select_lex.no_wrap_view_item= TRUE; res= setup_fields(thd, ref_pointer_array, item, mark_used_columns, - sum_func_list, allow_sum_func); + sum_func_list, NULL, allow_sum_func); thd->lex->select_lex.no_wrap_view_item= FALSE; return res; } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index c12f1ec4d..2ebcea2d6 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -4858,11 +4858,14 @@ extern "C" int thd_non_transactional_update(const MYSQL_THD thd) extern "C" int thd_binlog_format(const MYSQL_THD thd) { - if (((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()) && - thd->variables.option_bits & OPTION_BIN_LOG) + if (WSREP(thd)) + { + /* for wsrep binlog format is meaningful also when binlogging is off */ return (int) thd->wsrep_binlog_format(); - else - return BINLOG_FORMAT_UNSPEC; + } + if (mysql_bin_log.is_open() && (thd->variables.option_bits & OPTION_BIN_LOG)) + return (int) thd->variables.binlog_format; + return BINLOG_FORMAT_UNSPEC; } extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all) diff --git a/sql/sql_const.h b/sql/sql_const.h index 3e23fc25b..946cf13e2 100644 --- a/sql/sql_const.h +++ b/sql/sql_const.h @@ -45,7 +45,18 @@ #define MAX_MBWIDTH 3 /* Max multibyte sequence */ #define MAX_FILENAME_MBWIDTH 5 #define MAX_FIELD_CHARLENGTH 255 -#define MAX_FIELD_VARCHARLENGTH 65535 +/* + In MAX_FIELD_VARCHARLENGTH we reserve extra bytes for the overhead: + - 2 bytes for the length + - 1 byte for NULL bits + to avoid the "Row size too large" error for these three corner definitions: + CREATE TABLE t1 (c VARBINARY(65533)); + CREATE TABLE t1 (c VARBINARY(65534)); + CREATE TABLE t1 (c VARBINARY(65535)); + Like VARCHAR(65536), they will be converted to BLOB automatically + in non-sctict mode. +*/ +#define MAX_FIELD_VARCHARLENGTH (65535-2-1) #define MAX_FIELD_BLOBLENGTH UINT_MAX32 /* cf field_blob::get_length() */ #define CONVERT_IF_BIGGER_TO_BLOB 512 /* Threshold *in characters* */ diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index c10114109..bc067b667 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -766,7 +766,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, DELETE_ACL, SELECT_ACL, TRUE)) DBUG_RETURN(TRUE); if ((wild_num && setup_wild(thd, table_list, field_list, NULL, wild_num)) || - setup_fields(thd, NULL, field_list, MARK_COLUMNS_READ, NULL, 0) || + setup_fields(thd, NULL, field_list, MARK_COLUMNS_READ, NULL, NULL, 0) || setup_conds(thd, table_list, select_lex->leaf_tables, conds) || setup_ftfuncs(select_lex)) DBUG_RETURN(TRUE); diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 5d12091c4..5a0879c20 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -466,7 +466,8 @@ bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived) // Update used tables cache according to new table map if (derived->on_expr) { - derived->on_expr->fix_after_pullout(parent_lex, &derived->on_expr); + derived->on_expr->fix_after_pullout(parent_lex, &derived->on_expr, + TRUE); fix_list_after_tbl_changes(parent_lex, &derived->nested_join->join_list); } } @@ -636,7 +637,8 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived) SELECT_LEX_UNIT *unit= derived->get_unit(); DBUG_ENTER("mysql_derived_prepare"); bool res= FALSE; - DBUG_PRINT("enter", ("unit 0x%lx", (ulong) unit)); + DBUG_PRINT("enter", ("unit: %p table_list: %p Alias '%s'", + unit, derived, derived->alias)); // Skip already prepared views/DT if (!unit || unit->prepared || diff --git a/sql/sql_do.cc b/sql/sql_do.cc index 9e58031f6..54850494a 100644 --- a/sql/sql_do.cc +++ b/sql/sql_do.cc @@ -29,7 +29,7 @@ bool mysql_do(THD *thd, List &values) List_iterator li(values); Item *value; DBUG_ENTER("mysql_do"); - if (setup_fields(thd, 0, values, MARK_COLUMNS_NONE, 0, 0)) + if (setup_fields(thd, 0, values, MARK_COLUMNS_NONE, 0, NULL, 0)) DBUG_RETURN(TRUE); while ((value = li++)) (void) value->is_null(); diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 721fff389..c39860593 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -258,7 +258,7 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list, if (table_list->is_view()) unfix_fields(fields); - res= setup_fields(thd, 0, fields, MARK_COLUMNS_WRITE, 0, 0); + res= setup_fields(thd, 0, fields, MARK_COLUMNS_WRITE, 0, NULL, 0); /* Restore the current context. */ ctx_state.restore_state(context, table_list); @@ -372,7 +372,7 @@ static int check_update_fields(THD *thd, TABLE_LIST *insert_table_list, } /* Check the fields we are going to modify */ - if (setup_fields(thd, 0, update_fields, MARK_COLUMNS_WRITE, 0, 0)) + if (setup_fields(thd, 0, update_fields, MARK_COLUMNS_WRITE, 0, NULL, 0)) return -1; if (insert_table_list->is_view() && @@ -794,7 +794,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, my_error(ER_WRONG_VALUE_COUNT_ON_ROW, MYF(0), counter); goto abort; } - if (setup_fields(thd, 0, *values, MARK_COLUMNS_READ, 0, 0)) + if (setup_fields(thd, 0, *values, MARK_COLUMNS_READ, 0, NULL, 0)) goto abort; switch_to_nullable_trigger_fields(*values, table); } @@ -1509,12 +1509,12 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, table_list->next_local= 0; context->resolve_in_table_list_only(table_list); - res= (setup_fields(thd, 0, *values, MARK_COLUMNS_READ, 0, 0) || + res= (setup_fields(thd, 0, *values, MARK_COLUMNS_READ, 0, NULL, 0) || check_insert_fields(thd, context->table_list, fields, *values, !insert_into_view, 0, &map)); if (!res) - res= setup_fields(thd, 0, update_values, MARK_COLUMNS_READ, 0, 0); + res= setup_fields(thd, 0, update_values, MARK_COLUMNS_READ, 0, NULL, 0); if (!res && duplic == DUP_UPDATE) { @@ -3478,7 +3478,7 @@ select_insert::prepare(List &values, SELECT_LEX_UNIT *u) */ lex->current_select= &lex->select_lex; - res= (setup_fields(thd, 0, values, MARK_COLUMNS_READ, 0, 0) || + res= (setup_fields(thd, 0, values, MARK_COLUMNS_READ, 0, NULL, 0) || check_insert_fields(thd, table_list, *fields, values, !insert_into_view, 1, &map)); @@ -3531,7 +3531,7 @@ select_insert::prepare(List &values, SELECT_LEX_UNIT *u) ctx_state.get_first_name_resolution_table(); res= res || setup_fields(thd, 0, *info.update_values, - MARK_COLUMNS_READ, 0, 0); + MARK_COLUMNS_READ, 0, NULL, 0); if (!res) { /* diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index b3a30c69a..8edd9b3fb 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -4861,4 +4861,3 @@ void binlog_unsafe_map_init() BINLOG_DIRECT_OFF & TRX_CACHE_NOT_EMPTY); } #endif - diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 240eb2373..116ac815e 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -743,6 +743,7 @@ class st_select_lex: public st_select_lex_node Group_list_ptrs *group_list_ptrs; List item_list; /* list of fields & expressions */ + List pre_fix; /* above list before fix_fields */ List interval_list; bool is_item_list_lookup; /* diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 1ba9de297..45c5dc038 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -353,22 +353,22 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, Let us also prepare SET clause, altough it is probably empty in this case. */ - if (setup_fields(thd, 0, set_fields, MARK_COLUMNS_WRITE, 0, 0) || - setup_fields(thd, 0, set_values, MARK_COLUMNS_READ, 0, 0)) + if (setup_fields(thd, 0, set_fields, MARK_COLUMNS_WRITE, 0, NULL, 0) || + setup_fields(thd, 0, set_values, MARK_COLUMNS_READ, 0, NULL, 0)) DBUG_RETURN(TRUE); } else { // Part field list /* TODO: use this conds for 'WITH CHECK OPTIONS' */ - if (setup_fields(thd, 0, fields_vars, MARK_COLUMNS_WRITE, 0, 0) || - setup_fields(thd, 0, set_fields, MARK_COLUMNS_WRITE, 0, 0) || + if (setup_fields(thd, 0, fields_vars, MARK_COLUMNS_WRITE, 0, NULL, 0) || + setup_fields(thd, 0, set_fields, MARK_COLUMNS_WRITE, 0, NULL, 0) || check_that_all_fields_are_given_values(thd, table, table_list)) DBUG_RETURN(TRUE); /* Add all fields with default functions to table->write_set. */ if (table->default_field) table->mark_default_fields_for_write(); /* Fix the expressions in SET clause */ - if (setup_fields(thd, 0, set_values, MARK_COLUMNS_READ, 0, 0)) + if (setup_fields(thd, 0, set_values, MARK_COLUMNS_READ, 0, NULL, 0)) DBUG_RETURN(TRUE); } switch_to_nullable_trigger_fields(fields_vars, table); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 6f9e4677c..7337a8aeb 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1160,8 +1160,7 @@ bool do_command(THD *thd) @retval FALSE The statement isn't updating any relevant tables. */ -static my_bool deny_updates_if_read_only_option(THD *thd, - TABLE_LIST *all_tables) +static bool deny_updates_if_read_only_option(THD *thd, TABLE_LIST *all_tables) { DBUG_ENTER("deny_updates_if_read_only_option"); @@ -1170,11 +1169,7 @@ static my_bool deny_updates_if_read_only_option(THD *thd, LEX *lex= thd->lex; - const my_bool user_is_super= - ((ulong)(thd->security_ctx->master_access & SUPER_ACL) == - (ulong)SUPER_ACL); - - if (user_is_super) + if (thd->security_ctx->master_access & SUPER_ACL) DBUG_RETURN(FALSE); if (!(sql_command_flags[lex->sql_command] & CF_CHANGES_DATA)) @@ -1184,28 +1179,26 @@ static my_bool deny_updates_if_read_only_option(THD *thd, if (lex->sql_command == SQLCOM_UPDATE_MULTI) DBUG_RETURN(FALSE); + if (lex->sql_command == SQLCOM_CREATE_DB || + lex->sql_command == SQLCOM_DROP_DB) + DBUG_RETURN(TRUE); + /* a table-to-be-created is not in the temp table list yet, so CREATE TABLE needs a special treatment */ - const bool update_real_tables= lex->sql_command == SQLCOM_CREATE_TABLE ? - !lex->tmp_table() : some_non_temp_table_to_be_updated(thd, all_tables); - - const bool create_or_drop_databases= - (lex->sql_command == SQLCOM_CREATE_DB) || - (lex->sql_command == SQLCOM_DROP_DB); - - if (update_real_tables || create_or_drop_databases) - { - /* - An attempt was made to modify one or more non-temporary tables. - */ - DBUG_RETURN(TRUE); - } + if (lex->sql_command == SQLCOM_CREATE_TABLE) + DBUG_RETURN(!lex->tmp_table()); + /* + a table-to-be-dropped might not exist (DROP TEMPORARY TABLE IF EXISTS), + cannot use the temp table list either. + */ + if (lex->sql_command == SQLCOM_DROP_TABLE && lex->tmp_table()) + DBUG_RETURN(FALSE); - /* Assuming that only temporary tables are modified. */ - DBUG_RETURN(FALSE); + /* Now, check thd->temporary_tables list */ + DBUG_RETURN(some_non_temp_table_to_be_updated(thd, all_tables)); } @@ -3310,7 +3303,7 @@ mysql_execute_command(THD *thd) #ifdef WITH_PARTITION_STORAGE_ENGINE { partition_info *part_info= thd->lex->part_info; - if (part_info && !(part_info= thd->lex->part_info->get_clone(thd))) + if (part_info && !(part_info= part_info->get_clone(thd))) { res= -1; goto end_with_restore_list; @@ -3780,7 +3773,7 @@ mysql_execute_command(THD *thd) if (up_result != 2) break; } - /* Fall through */ + /* fall through */ case SQLCOM_UPDATE_MULTI: { DBUG_ASSERT(first_table == all_tables && first_table != 0); @@ -3891,7 +3884,7 @@ mysql_execute_command(THD *thd) DBUG_PRINT("debug", ("Just after generate_incident()")); } #endif - /* fall through */ + /* fall through */ case SQLCOM_INSERT: { WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); @@ -5726,6 +5719,24 @@ mysql_execute_command(THD *thd) } if (thd->is_error() || (thd->variables.option_bits & OPTION_MASTER_SQL_ERROR)) trans_rollback_stmt(thd); +#ifdef WITH_WSREP + else if (thd->spcont && + (thd->wsrep_conflict_state == MUST_ABORT || + thd->wsrep_conflict_state == CERT_FAILURE)) + { + /* + The error was cleared, but THD was aborted by wsrep and + wsrep_conflict_state is still set accordingly. This + situation is expected if we are running a stored procedure + that declares a handler that catches ER_LOCK_DEADLOCK error. + In which case the error may have been cleared in method + sp_rcontext::handle_sql_condition(). + */ + trans_rollback_stmt(thd); + thd->wsrep_conflict_state= NO_CONFLICT; + thd->killed= NOT_KILLED; + } +#endif /* WITH_WSREP */ else { /* If commit fails, we should be able to reset the OK status. */ diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 5c6174fbf..dc5e7fe1a 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2005, 2014, Oracle and/or its affiliates. - Copyright (c) 2009, 2014, SkySQL Ab. +/* Copyright (c) 2005, 2017, Oracle and/or its affiliates. + Copyright (c) 2009, 2017, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -4712,7 +4712,7 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info, thd->work_part_info= thd->lex->part_info; if (thd->work_part_info && - !(thd->work_part_info= thd->lex->part_info->get_clone(thd))) + !(thd->work_part_info= thd->work_part_info->get_clone(thd))) DBUG_RETURN(TRUE); /* ALTER_ADMIN_PARTITION is handled in mysql_admin_table */ @@ -6832,7 +6832,8 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, lpt->alter_info= alter_info; lpt->create_info= create_info; lpt->db_options= create_info->table_options; - if (create_info->row_type == ROW_TYPE_DYNAMIC) + if (create_info->row_type != ROW_TYPE_FIXED && + create_info->row_type != ROW_TYPE_DEFAULT) lpt->db_options|= HA_OPTION_PACK_RECORD; lpt->table= table; lpt->key_info_buffer= 0; @@ -8308,6 +8309,7 @@ int create_partition_name(char *out, size_t outlen, const char *in1, } else transl_part= in2; + if (name_variant == NORMAL_PART_NAME) end= strxnmov(out, outlen-1, in1, "#P#", transl_part, NullS); else if (name_variant == TEMP_PART_NAME) @@ -8322,25 +8324,19 @@ int create_partition_name(char *out, size_t outlen, const char *in1, return 0; } - -/* - Create subpartition name - - SYNOPSIS - create_subpartition_name() - out:out The buffer for the created partition name string - must be *at least* of FN_REFLEN+1 bytes - in1 First part - in2 Second part - in3 Third part - name_variant Normal, temporary or renamed partition name - - RETURN VALUE - 0 if ok, error if name too long - - DESCRIPTION - This method is used to calculate the subpartition name, service routine to - the del_ren_cre_table method. +/** + Create subpartition name. This method is used to calculate the + subpartition name, service routine to the del_ren_cre_table method. + The output buffer size should be FN_REFLEN + 1(terminating '\0'). + + @param [out] out Created partition name string + @param in1 First part + @param in2 Second part + @param in3 Third part + @param name_variant Normal, temporary or renamed partition name + + @retval true Error. + @retval false Success. */ int create_subpartition_name(char *out, size_t outlen, @@ -8352,6 +8348,7 @@ int create_subpartition_name(char *out, size_t outlen, tablename_to_filename(in2, transl_part_name, FN_REFLEN); tablename_to_filename(in3, transl_subpart_name, FN_REFLEN); + if (name_variant == NORMAL_PART_NAME) end= strxnmov(out, outlen-1, in1, "#P#", transl_part_name, "#SP#", transl_subpart_name, NullS); diff --git a/sql/sql_partition.h b/sql/sql_partition.h index 76f162920..6629537b2 100644 --- a/sql/sql_partition.h +++ b/sql/sql_partition.h @@ -1,7 +1,8 @@ #ifndef SQL_PARTITION_INCLUDED #define SQL_PARTITION_INCLUDED -/* Copyright (c) 2006, 2013, Oracle and/or its affiliates. +/* Copyright (c) 2006, 2017, Oracle and/or its affiliates. + Copyright (c) 2011, 2017, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 5f5039528..f41d1e0fd 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -228,7 +228,6 @@ static DYNAMIC_ARRAY plugin_array; static HASH plugin_hash[MYSQL_MAX_PLUGIN_TYPE_NUM]; static MEM_ROOT plugin_mem_root; static bool reap_needed= false; -static int plugin_array_version=0; static bool initialized= 0; ulong dlopen_count; @@ -322,7 +321,6 @@ static void unlock_variables(THD *thd, struct system_variables *vars); static void cleanup_variables(struct system_variables *vars); static void plugin_vars_free_values(sys_var *vars); static void restore_ptr_backup(uint n, st_ptr_backup *backup); -static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref plugin); static void intern_plugin_unlock(LEX *lex, plugin_ref plugin); static void reap_plugins(void); @@ -943,15 +941,17 @@ SHOW_COMP_OPTION plugin_status(const char *name, size_t len, int type) } -static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref rc) +static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref rc, + uint state_mask= PLUGIN_IS_READY | + PLUGIN_IS_UNINITIALIZED | + PLUGIN_IS_DELETED) { st_plugin_int *pi= plugin_ref_to_int(rc); DBUG_ENTER("intern_plugin_lock"); mysql_mutex_assert_owner(&LOCK_plugin); - if (pi->state & (PLUGIN_IS_READY | PLUGIN_IS_UNINITIALIZED | - PLUGIN_IS_DELETED)) + if (pi->state & state_mask) { plugin_ref plugin; #ifdef DBUG_OFF @@ -1146,7 +1146,6 @@ static bool plugin_add(MEM_ROOT *tmp_root, if (!(tmp_plugin_ptr= plugin_insert_or_reuse(&tmp))) goto err; - plugin_array_version++; if (my_hash_insert(&plugin_hash[plugin->type], (uchar*)tmp_plugin_ptr)) tmp_plugin_ptr->state= PLUGIN_IS_FREED; init_alloc_root(&tmp_plugin_ptr->mem_root, 4096, 4096, MYF(0)); @@ -1240,7 +1239,6 @@ static void plugin_del(struct st_plugin_int *plugin) my_hash_delete(&plugin_hash[plugin->plugin->type], (uchar*)plugin); plugin_dl_del(plugin->plugin_dl); plugin->state= PLUGIN_IS_FREED; - plugin_array_version++; free_root(&plugin->mem_root, MYF(0)); } else @@ -1853,11 +1851,11 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list) switch ((*(p++)= *(list++))) { case '\0': list= NULL; /* terminate the loop */ -#ifndef __WIN__ /* fall through */ + case ';': +#ifndef __WIN__ case ':': /* can't use this as delimiter as it may be drive letter */ #endif - case ';': str->str[str->length]= '\0'; if (str == &name) // load all plugins in named module { @@ -2315,64 +2313,55 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name, bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func, int type, uint state_mask, void *arg) { - uint idx, total; - struct st_plugin_int *plugin, **plugins; - int version=plugin_array_version; + uint idx, total= 0; + struct st_plugin_int *plugin; + plugin_ref *plugins; + my_bool res= FALSE; DBUG_ENTER("plugin_foreach_with_mask"); if (!initialized) DBUG_RETURN(FALSE); - state_mask= ~state_mask; // do it only once - mysql_mutex_lock(&LOCK_plugin); - total= type == MYSQL_ANY_PLUGIN ? plugin_array.elements - : plugin_hash[type].records; /* Do the alloca out here in case we do have a working alloca: - leaving the nested stack frame invalidates alloca allocation. + leaving the nested stack frame invalidates alloca allocation. */ - plugins=(struct st_plugin_int **)my_alloca(total*sizeof(plugin)); if (type == MYSQL_ANY_PLUGIN) { - for (idx= 0; idx < total; idx++) + plugins= (plugin_ref*) my_alloca(plugin_array.elements * sizeof(plugin_ref)); + for (idx= 0; idx < plugin_array.elements; idx++) { plugin= *dynamic_element(&plugin_array, idx, struct st_plugin_int **); - plugins[idx]= !(plugin->state & state_mask) ? plugin : NULL; + if ((plugins[total]= intern_plugin_lock(0, plugin_int_to_ref(plugin), + state_mask))) + total++; } } else { HASH *hash= plugin_hash + type; - for (idx= 0; idx < total; idx++) + plugins= (plugin_ref*) my_alloca(hash->records * sizeof(plugin_ref)); + for (idx= 0; idx < hash->records; idx++) { plugin= (struct st_plugin_int *) my_hash_element(hash, idx); - plugins[idx]= !(plugin->state & state_mask) ? plugin : NULL; + if ((plugins[total]= intern_plugin_lock(0, plugin_int_to_ref(plugin), + state_mask))) + total++; } } mysql_mutex_unlock(&LOCK_plugin); for (idx= 0; idx < total; idx++) { - if (unlikely(version != plugin_array_version)) - { - mysql_mutex_lock(&LOCK_plugin); - for (uint i=idx; i < total; i++) - if (plugins[i] && plugins[i]->state & state_mask) - plugins[i]=0; - mysql_mutex_unlock(&LOCK_plugin); - } - plugin= plugins[idx]; /* It will stop iterating on first engine error when "func" returns TRUE */ - if (plugin && func(thd, plugin_int_to_ref(plugin), arg)) - goto err; + if ((res= func(thd, plugins[idx], arg))) + break; } + plugin_unlock_list(0, plugins, total); my_afree(plugins); - DBUG_RETURN(FALSE); -err: - my_afree(plugins); - DBUG_RETURN(TRUE); + DBUG_RETURN(res); } @@ -3491,7 +3480,6 @@ bool sys_var_pluginvar::global_update(THD *thd, set_var *var) options->max_value= getopt_double2ulonglong((opt)->max_val); \ options->block_size= (long) (opt)->blk_sz; - void plugin_opt_set_limits(struct my_option *options, const struct st_mysql_sys_var *opt) { diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index e0dd04b08..e5b85c3be 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1321,7 +1321,7 @@ static bool mysql_test_insert(Prepared_statement *stmt, my_error(ER_WRONG_VALUE_COUNT_ON_ROW, MYF(0), counter); goto error; } - if (setup_fields(thd, 0, *values, MARK_COLUMNS_NONE, 0, 0)) + if (setup_fields(thd, 0, *values, MARK_COLUMNS_NONE, 0, NULL, 0)) goto error; } } @@ -1411,7 +1411,7 @@ static int mysql_test_update(Prepared_statement *stmt, table_list->register_want_access(want_privilege); #endif thd->lex->select_lex.no_wrap_view_item= TRUE; - res= setup_fields(thd, 0, select->item_list, MARK_COLUMNS_READ, 0, 0); + res= setup_fields(thd, 0, select->item_list, MARK_COLUMNS_READ, 0, NULL, 0); thd->lex->select_lex.no_wrap_view_item= FALSE; if (res) goto error; @@ -1422,7 +1422,8 @@ static int mysql_test_update(Prepared_statement *stmt, (SELECT_ACL & ~table_list->table->grant.privilege); table_list->register_want_access(SELECT_ACL); #endif - if (setup_fields(thd, 0, stmt->lex->value_list, MARK_COLUMNS_NONE, 0, 0) || + if (setup_fields(thd, 0, stmt->lex->value_list, MARK_COLUMNS_NONE, 0, NULL, + 0) || check_unique_table(thd, table_list)) goto error; /* TODO: here we should send types of placeholders to the client. */ @@ -1592,7 +1593,7 @@ static bool mysql_test_do_fields(Prepared_statement *stmt, if (open_normal_and_derived_tables(thd, tables, MYSQL_OPEN_FORCE_SHARED_MDL, DT_PREPARE | DT_CREATE)) DBUG_RETURN(TRUE); - DBUG_RETURN(setup_fields(thd, 0, *values, MARK_COLUMNS_NONE, 0, 0)); + DBUG_RETURN(setup_fields(thd, 0, *values, MARK_COLUMNS_NONE, 0, NULL, 0)); } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index f9da12aac..b9fe8f316 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -797,7 +797,7 @@ JOIN::prepare(Item ***rref_pointer_array, wild_num)) || select_lex->setup_ref_array(thd, real_og_num) || setup_fields(thd, (*rref_pointer_array), fields_list, MARK_COLUMNS_READ, - &all_fields, 1) || + &all_fields, &select_lex->pre_fix, 1) || setup_without_group(thd, (*rref_pointer_array), tables_list, select_lex->leaf_tables, fields_list, all_fields, &conds, order, group_list, @@ -7874,9 +7874,11 @@ best_extension_by_limited_search(JOIN *join, best_access_path(join, s, remaining_tables, idx, disable_jbuf, record_count, join->positions + idx, &loose_scan_pos); - /* Compute the cost of extending the plan with 's' */ - - current_record_count= record_count * position->records_read; + /* Compute the cost of extending the plan with 's', avoid overflow */ + if (position->records_read < DBL_MAX / record_count) + current_record_count= record_count * position->records_read; + else + current_record_count= DBL_MAX; current_read_time=read_time + position->read_time + current_record_count / (double) TIME_FOR_COMPARE; @@ -14639,10 +14641,23 @@ simplify_joins(JOIN *join, List *join_list, COND *conds, bool top, nested_join= table->nested_join; if (table->sj_on_expr && !in_sj) { - /* - If this is a semi-join that is not contained within another semi-join, - leave it intact (otherwise it is flattened) - */ + /* + If this is a semi-join that is not contained within another semi-join + leave it intact (otherwise it is flattened) + */ + /* + Make sure that any semi-join appear in + the join->select_lex->sj_nests list only once + */ + List_iterator_fast sj_it(join->select_lex->sj_nests); + TABLE_LIST *sj_nest; + while ((sj_nest= sj_it++)) + { + if (table == sj_nest) + break; + } + if (sj_nest) + continue; join->select_lex->sj_nests.push_back(table, join->thd->mem_root); /* diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 953842e29..2c02f9326 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -126,6 +126,12 @@ bool get_lookup_field_values(THD *, COND *, TABLE_LIST *, LOOKUP_FIELD_VALUES *) ** List all table types supported ***************************************************************************/ + +static bool is_show_command(THD *thd) +{ + return sql_command_flags[thd->lex->sql_command] & CF_STATUS_COMMAND; +} + static int make_version_string(char *buf, int buf_length, uint version) { return my_snprintf(buf, buf_length, "%d.%d", version>>8,version&0xff); @@ -265,7 +271,7 @@ int fill_plugins(THD *thd, TABLE_LIST *tables, COND *cond) TABLE *table= tables->table; if (plugin_foreach_with_mask(thd, show_plugins, MYSQL_ANY_PLUGIN, - ~PLUGIN_IS_FREED, table)) + ~(PLUGIN_IS_FREED | PLUGIN_IS_DYING), table)) DBUG_RETURN(1); DBUG_RETURN(0); @@ -973,13 +979,20 @@ find_files(THD *thd, Dynamic_array *files, LEX_STRING *db, if (tl.add_file(file->name)) goto err; } - tl.sort(); } else { if (ha_discover_table_names(thd, db, dirp, &tl, false)) goto err; } +#if MYSQL_VERSION_ID < 100300 + /* incomplete optimization, but a less drastic change in GA version */ + if (!thd->lex->select_lex.order_list.elements && + !thd->lex->select_lex.group_list.elements) +#else + if (is_show_command(thd)) +#endif + tl.sort(); DBUG_PRINT("info",("found: %zu files", files->elements())); my_dirend(dirp); @@ -3640,6 +3653,15 @@ bool uses_only_table_name_fields(Item *item, TABLE_LIST *table) return 0; } } + else if (item->type() == Item::ROW_ITEM) + { + Item_row *item_row= static_cast(item); + for (uint i= 0; i < item_row->cols(); i++) + { + if (!uses_only_table_name_fields(item_row->element_index(i), table)) + return 0; + } + } else if (item->type() == Item::FIELD_ITEM) { Item_field *item_field= (Item_field*)item; @@ -3659,6 +3681,11 @@ bool uses_only_table_name_fields(Item *item, TABLE_LIST *table) strlen(item_field->field_name), 0))) return 0; } + else if (item->type() == Item::EXPR_CACHE_ITEM) + { + Item_cache_wrapper *tmp= static_cast(item); + return uses_only_table_name_fields(tmp->get_orig_item(), table); + } else if (item->type() == Item::REF_ITEM) return uses_only_table_name_fields(item->real_item(), table); @@ -4051,7 +4078,7 @@ make_table_name_list(THD *thd, Dynamic_array *table_names, */ if (res == FIND_FILES_DIR) { - if (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) + if (is_show_command(thd)) return 1; thd->clear_error(); return 2; @@ -5586,7 +5613,8 @@ int fill_schema_engines(THD *thd, TABLE_LIST *tables, COND *cond) DBUG_ENTER("fill_schema_engines"); if (plugin_foreach_with_mask(thd, iter_schema_engines, MYSQL_STORAGE_ENGINE_PLUGIN, - ~PLUGIN_IS_FREED, tables->table)) + ~(PLUGIN_IS_FREED | PLUGIN_IS_DYING), + tables->table)) DBUG_RETURN(1); DBUG_RETURN(0); } @@ -5871,13 +5899,13 @@ bool store_schema_proc(THD *thd, TABLE *table, TABLE *proc_table, val_int() == TYPE_ENUM_PROCEDURE)) return 0; - if ((lex->sql_command == SQLCOM_SHOW_STATUS_PROC && + if (!is_show_command(thd) || + (lex->sql_command == SQLCOM_SHOW_STATUS_PROC && proc_table->field[MYSQL_PROC_MYSQL_TYPE]->val_int() == TYPE_ENUM_PROCEDURE) || (lex->sql_command == SQLCOM_SHOW_STATUS_FUNC && proc_table->field[MYSQL_PROC_MYSQL_TYPE]->val_int() == - TYPE_ENUM_FUNCTION) || - (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) == 0) + TYPE_ENUM_FUNCTION)) { restore_record(table, s->default_values); if (!wild || !wild[0] || !wild_case_compare(system_charset_info, @@ -6009,6 +6037,10 @@ int fill_schema_proc(THD *thd, TABLE_LIST *tables, COND *cond) DBUG_RETURN(1); } + /* Disable padding temporarily so it doesn't break the query */ + ulonglong sql_mode_was = thd->variables.sql_mode; + thd->variables.sql_mode &= ~MODE_PAD_CHAR_TO_FULL_LENGTH; + if (proc_table->file->ha_index_init(0, 1)) { res= 1; @@ -6044,6 +6076,7 @@ int fill_schema_proc(THD *thd, TABLE_LIST *tables, COND *cond) (void) proc_table->file->ha_index_end(); close_system_tables(thd, &open_tables_state_backup); + thd->variables.sql_mode = sql_mode_was; DBUG_RETURN(res); } @@ -7626,7 +7659,7 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list) tmp_table_param->field_count= field_count; tmp_table_param->schema_table= 1; SELECT_LEX *select_lex= thd->lex->current_select; - bool keep_row_order= sql_command_flags[thd->lex->sql_command] & CF_STATUS_COMMAND; + bool keep_row_order= is_show_command(thd); if (!(table= create_tmp_table(thd, tmp_table_param, field_list, (ORDER*) 0, 0, 0, (select_lex->options | thd->variables.option_bits | diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 2751c79a0..24b86169d 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4161,7 +4161,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, if (!sql_field->def && !sql_field->has_default_function() && (sql_field->flags & NOT_NULL_FLAG) && - !is_timestamp_type(sql_field->sql_type)) + (!is_timestamp_type(sql_field->sql_type) || + opt_explicit_defaults_for_timestamp)) { sql_field->flags|= NO_DEFAULT_VALUE_FLAG; sql_field->pack_flag|= FIELDFLAG_NO_DEFAULT; @@ -4170,6 +4171,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, if (thd->variables.sql_mode & MODE_NO_ZERO_DATE && !sql_field->def && !sql_field->vcol_info && is_timestamp_type(sql_field->sql_type) && + !opt_explicit_defaults_for_timestamp && (sql_field->flags & NOT_NULL_FLAG) && (type == Field::NONE || type == Field::TIMESTAMP_UN_FIELD)) { @@ -6902,7 +6904,6 @@ bool alter_table_manage_keys(TABLE *table, int indexes_were_disabled, case Alter_info::LEAVE_AS_IS: if (!indexes_were_disabled) break; - /* disabled indexes */ /* fall through */ case Alter_info::DISABLE: error= table->file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE); diff --git a/sql/sql_update.cc b/sql/sql_update.cc index a87261aa3..e1d22e6a1 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -359,7 +359,7 @@ int mysql_update(THD *thd, table_list->grant.want_privilege= table->grant.want_privilege= (SELECT_ACL & ~table->grant.privilege); #endif - if (setup_fields(thd, 0, values, MARK_COLUMNS_READ, 0, 0)) + if (setup_fields(thd, 0, values, MARK_COLUMNS_READ, 0, NULL, 0)) { free_underlaid_joins(thd, select_lex); DBUG_RETURN(1); /* purecov: inspected */ @@ -1711,7 +1711,7 @@ int multi_update::prepare(List ¬_used_values, reference tables */ - int error= setup_fields(thd, 0, *values, MARK_COLUMNS_READ, 0, 0); + int error= setup_fields(thd, 0, *values, MARK_COLUMNS_READ, 0, NULL, 0); ti.rewind(); while ((table_ref= ti++)) diff --git a/sql/sql_yacc.cc b/sql/sql_yacc.cc index f559fd99a..27d63955c 100644 --- a/sql/sql_yacc.cc +++ b/sql/sql_yacc.cc @@ -2816,245 +2816,245 @@ static const yytype_uint16 yyrline[] = 4472, 4473, 4474, 4475, 4476, 4477, 4481, 4485, 4486, 4487, 4491, 4492, 4493, 4498, 4506, 4514, 4522, 4535, 4548, 4553, 4558, 4566, 4574, 4582, 4590, 4598, 4606, 4614, 4624, 4634, - 4644, 4646, 4650, 4655, 4665, 4666, 4711, 4710, 4713, 4719, - 4719, 4720, 4734, 4735, 4739, 4741, 4740, 4744, 4743, 4749, - 4786, 4787, 4792, 4791, 4810, 4825, 4824, 4841, 4845, 4853, - 4852, 4855, 4857, 4859, 4861, 4866, 4867, 4873, 4874, 4891, - 4892, 4896, 4897, 4901, 4917, 4927, 4938, 4947, 4948, 4961, - 4963, 4962, 4967, 4965, 4976, 4977, 4981, 4996, 5012, 5013, - 5026, 5035, 5057, 5058, 5063, 5062, 5087, 5099, 5115, 5114, - 5129, 5128, 5145, 5167, 5171, 5200, 5212, 5213, 5218, 5229, - 5217, 5254, 5255, 5259, 5272, 5293, 5306, 5332, 5333, 5338, - 5337, 5375, 5384, 5385, 5389, 5390, 5394, 5396, 5402, 5408, - 5410, 5412, 5414, 5416, 5418, 5428, 5443, 5427, 5457, 5458, - 5462, 5463, 5467, 5468, 5472, 5473, 5478, 5481, 5489, 5492, - 5499, 5503, 5509, 5511, 5515, 5516, 5520, 5521, 5522, 5526, - 5531, 5536, 5541, 5546, 5551, 5556, 5561, 5576, 5582, 5597, - 5602, 5617, 5623, 5641, 5646, 5651, 5656, 5661, 5666, 5672, - 5671, 5697, 5698, 5699, 5704, 5709, 5714, 5716, 5718, 5720, - 5726, 5731, 5736, 5744, 5752, 5758, 5767, 5775, 5792, 5813, - 5824, 5825, 5826, 5827, 5828, 5829, 5830, 5834, 5835, 5836, - 5840, 5841, 5842, 5843, 5848, 5855, 5856, 5860, 5861, 5865, - 5866, 5871, 5870, 5878, 5877, 5885, 5884, 5892, 5891, 5901, - 5898, 5909, 5907, 5916, 5915, 5950, 5953, 5955, 5959, 5963, - 5964, 5968, 5973, 5986, 5972, 6005, 6006, 6012, 6013, 6018, - 6021, 6025, 6032, 6033, 6037, 6038, 6042, 6048, 6054, 6058, - 6071, 6088, 6089, 6090, 6105, 6110, 6114, 6119, 6124, 6128, - 6133, 6138, 6144, 6149, 6155, 6159, 6164, 6169, 6187, 6189, - 6192, 6209, 6212, 6217, 6222, 6233, 6238, 6243, 6248, 6250, - 6252, 6254, 6256, 6258, 6260, 6262, 6264, 6266, 6268, 6270, - 6279, 6280, 6281, 6287, 6288, 6289, 6290, 6291, 6295, 6299, - 6300, 6304, 6305, 6309, 6310, 6311, 6312, 6313, 6317, 6318, - 6319, 6320, 6321, 6325, 6330, 6332, 6338, 6340, 6348, 6349, - 6351, 6356, 6365, 6366, 6370, 6371, 6375, 6376, 6377, 6381, - 6382, 6383, 6384, 6387, 6388, 6392, 6393, 6397, 6398, 6402, - 6403, 6407, 6408, 6409, 6410, 6417, 6418, 6424, 6430, 6436, - 6442, 6443, 6450, 6458, 6466, 6472, 6481, 6496, 6502, 6507, - 6508, 6512, 6517, 6521, 6522, 6526, 6527, 6531, 6537, 6541, - 6542, 6546, 6554, 6555, 6559, 6560, 6564, 6565, 6569, 6570, - 6571, 6579, 6580, 6581, 6582, 6583, 6587, 6588, 6593, 6592, - 6605, 6606, 6610, 6613, 6614, 6615, 6616, 6620, 6628, 6635, - 6636, 6640, 6650, 6651, 6655, 6656, 6659, 6661, 6665, 6677, - 6678, 6682, 6689, 6702, 6703, 6705, 6707, 6713, 6718, 6724, - 6730, 6737, 6747, 6748, 6749, 6750, 6751, 6755, 6756, 6760, - 6761, 6765, 6766, 6770, 6771, 6772, 6776, 6777, 6781, 6785, - 6797, 6798, 6802, 6803, 6807, 6808, 6812, 6813, 6817, 6818, - 6822, 6823, 6827, 6828, 6832, 6833, 6834, 6837, 6839, 6844, - 6846, 6848, 6856, 6864, 6870, 6878, 6879, 6883, 6887, 6888, - 6898, 6899, 6900, 6904, 6908, 6915, 6921, 6933, 6934, 6938, - 6939, 6943, 6945, 6954, 6968, 6953, 6988, 6987, 7001, 7010, - 7009, 7025, 7024, 7040, 7039, 7055, 7049, 7066, 7065, 7100, - 7105, 7110, 7115, 7121, 7120, 7129, 7130, 7131, 7132, 7136, - 7137, 7149, 7150, 7154, 7155, 7158, 7160, 7168, 7176, 7178, - 7180, 7181, 7189, 7190, 7196, 7205, 7203, 7216, 7229, 7228, - 7241, 7239, 7252, 7259, 7269, 7270, 7297, 7304, 7308, 7314, - 7312, 7331, 7333, 7338, 7346, 7345, 7361, 7365, 7364, 7376, - 7377, 7381, 7397, 7398, 7402, 7410, 7414, 7419, 7424, 7431, - 7438, 7448, 7458, 7469, 7479, 7485, 7491, 7500, 7510, 7526, - 7540, 7550, 7554, 7559, 7560, 7563, 7565, 7566, 7567, 7568, - 7571, 7576, 7584, 7589, 7597, 7598, 7602, 7603, 7607, 7607, - 7610, 7612, 7616, 7617, 7621, 7622, 7630, 7631, 7632, 7636, - 7637, 7642, 7650, 7651, 7652, 7653, 7658, 7657, 7667, 7666, - 7673, 7680, 7690, 7707, 7710, 7717, 7721, 7728, 7732, 7736, - 7743, 7743, 7749, 7750, 7754, 7755, 7756, 7760, 7761, 7770, - 7777, 7778, 7783, 7782, 7794, 7795, 7796, 7800, 7801, 7801, - 7806, 7805, 7826, 7827, 7831, 7832, 7836, 7837, 7838, 7842, - 7843, 7848, 7847, 7868, 7869, 7873, 7878, 7879, 7886, 7888, - 7892, 7894, 7893, 7905, 7907, 7906, 7919, 7920, 7925, 7934, - 7935, 7936, 7940, 7947, 7957, 7965, 7966, 7966, 7970, 7969, - 7992, 7993, 7997, 7998, 8002, 8003, 8004, 8005, 8006, 8007, - 8011, 8012, 8017, 8016, 8037, 8038, 8039, 8044, 8043, 8049, - 8056, 8062, 8071, 8072, 8076, 8090, 8089, 8102, 8103, 8107, - 8108, 8112, 8122, 8132, 8133, 8138, 8137, 8148, 8149, 8153, - 8154, 8158, 8168, 8179, 8178, 8186, 8186, 8195, 8196, 8201, - 8202, 8211, 8220, 8221, 8225, 8225, 8237, 8242, 8242, 8251, - 8256, 8255, 8270, 8274, 8275, 8296, 8296, 8310, 8321, 8324, - 8326, 8330, 8336, 8343, 8345, 8353, 8354, 8358, 8359, 8376, - 8395, 8397, 8404, 8415, 8416, 8417, 8431, 8436, 8458, 8464, - 8470, 8476, 8477, 8478, 8479, 8480, 8484, 8485, 8486, 8490, - 8491, 8492, 8496, 8497, 8502, 8553, 8560, 8603, 8609, 8615, - 8621, 8627, 8633, 8639, 8645, 8649, 8655, 8661, 8667, 8673, - 8679, 8683, 8689, 8698, 8704, 8712, 8718, 8728, 8734, 8743, - 8753, 8760, 8770, 8776, 8785, 8789, 8795, 8801, 8807, 8813, - 8819, 8825, 8831, 8837, 8843, 8849, 8855, 8861, 8867, 8873, - 8877, 8878, 8882, 8883, 8887, 8888, 8892, 8893, 8897, 8898, - 8899, 8900, 8901, 8902, 8906, 8907, 8912, 8918, 8922, 8929, - 8936, 8943, 8950, 8957, 8963, 8962, 8970, 8977, 8984, 8992, - 9003, 9025, 9032, 9040, 9041, 9042, 9043, 9044, 9045, 9056, - 9057, 9058, 9059, 9060, 9066, 9070, 9076, 9082, 9088, 9094, - 9096, 9103, 9110, 9116, 9140, 9150, 9157, 9165, 9171, 9178, - 9184, 9194, 9201, 9217, 9223, 9229, 9238, 9247, 9253, 9259, - 9265, 9271, 9285, 9296, 9302, 9308, 9314, 9320, 9326, 9333, - 9340, 9346, 9352, 9358, 9364, 9370, 9376, 9382, 9388, 9394, - 9402, 9423, 9430, 9436, 9443, 9450, 9457, 9464, 9470, 9476, - 9483, 9489, 9496, 9502, 9508, 9514, 9520, 9526, 9544, 9550, - 9556, 9563, 9570, 9578, 9585, 9592, 9599, 9606, 9623, 9629, - 9635, 9641, 9647, 9654, 9660, 9666, 9672, 9678, 9684, 9690, - 9697, 9705, 9711, 9717, 9723, 9729, 9737, 9743, 9757, 9763, - 9769, 9777, 9789, 9796, 9811, 9817, 9824, 9831, 9838, 9845, - 9852, 9856, 9876, 9875, 9947, 9985, 9987, 9992, 9993, 9997, - 9998, 10002, 10003, 10007, 10014, 10022, 10049, 10055, 10061, 10067, - 10073, 10079, 10088, 10095, 10097, 10094, 10104, 10115, 10121, 10127, - 10133, 10139, 10145, 10151, 10157, 10163, 10170, 10169, 10189, 10188, - 10200, 10210, 10218, 10234, 10235, 10240, 10245, 10248, 10251, 10250, - 10266, 10268, 10274, 10273, 10290, 10293, 10292, 10296, 10298, 10300, - 10302, 10304, 10306, 10308, 10310, 10316, 10322, 10325, 10324, 10330, - 10331, 10335, 10342, 10350, 10351, 10355, 10362, 10370, 10371, 10375, - 10376, 10380, 10388, 10399, 10400, 10412, 10423, 10424, 10430, 10431, - 10451, 10455, 10453, 10471, 10469, 10480, 10490, 10488, 10506, 10505, - 10515, 10526, 10524, 10543, 10542, 10553, 10565, 10566, 10567, 10571, - 10572, 10580, 10581, 10585, 10600, 10600, 10615, 10651, 10736, 10747, - 10744, 10769, 10782, 10782, 10798, 10797, 10818, 10835, 10818, 10842, - 10846, 10869, 10870, 10875, 10878, 10879, 10880, 10884, 10885, 10890, - 10889, 10895, 10894, 10902, 10903, 10906, 10908, 10908, 10912, 10912, - 10917, 10918, 10922, 10924, 10929, 10930, 10934, 10945, 10958, 10959, - 10960, 10961, 10962, 10963, 10964, 10965, 10966, 10967, 10968, 10969, - 10973, 10974, 10975, 10976, 10977, 10978, 10979, 10980, 10981, 10985, - 10986, 10987, 10988, 10991, 10993, 10994, 10998, 10999, 11007, 11009, - 11013, 11015, 11014, 11028, 11031, 11030, 11045, 11051, 11065, 11067, - 11071, 11073, 11078, 11079, 11096, 11118, 11122, 11123, 11127, 11139, - 11141, 11146, 11145, 11195, 11197, 11202, 11203, 11204, 11208, 11209, - 11213, 11226, 11233, 11238, 11245, 11252, 11259, 11269, 11296, 11300, - 11306, 11312, 11321, 11329, 11333, 11340, 11341, 11345, 11346, 11347, - 11351, 11352, 11353, 11354, 11355, 11356, 11360, 11361, 11362, 11363, - 11364, 11368, 11369, 11370, 11371, 11372, 11376, 11377, 11378, 11379, - 11380, 11384, 11389, 11390, 11394, 11395, 11399, 11401, 11400, 11438, - 11439, 11443, 11444, 11448, 11458, 11458, 11469, 11470, 11473, 11493, - 11497, 11511, 11512, 11517, 11516, 11526, 11536, 11525, 11538, 11551, - 11563, 11562, 11580, 11579, 11588, 11588, 11605, 11611, 11626, 11642, - 11650, 11654, 11659, 11658, 11667, 11672, 11678, 11683, 11688, 11696, - 11697, 11701, 11712, 11725, 11726, 11730, 11742, 11746, 11755, 11758, - 11765, 11766, 11774, 11782, 11773, 11792, 11799, 11791, 11809, 11817, - 11818, 11826, 11830, 11831, 11842, 11843, 11847, 11856, 11857, 11858, - 11860, 11859, 11870, 11872, 11876, 11877, 11879, 11878, 11882, 11881, - 11887, 11888, 11892, 11893, 11897, 11907, 11908, 11912, 11913, 11918, - 11917, 11931, 11932, 11936, 11941, 11949, 11950, 11958, 11960, 11960, - 11968, 11976, 11967, 11998, 11999, 12003, 12011, 12012, 12016, 12026, - 12027, 12034, 12033, 12049, 12060, 12048, 12063, 12062, 12074, 12073, - 12086, 12088, 12092, 12093, 12097, 12110, 12126, 12127, 12131, 12132, - 12136, 12137, 12138, 12143, 12142, 12163, 12165, 12168, 12170, 12173, - 12174, 12177, 12181, 12185, 12189, 12193, 12197, 12201, 12205, 12209, - 12217, 12220, 12230, 12229, 12245, 12252, 12260, 12268, 12276, 12284, - 12292, 12299, 12306, 12312, 12314, 12316, 12325, 12329, 12334, 12333, - 12340, 12339, 12344, 12353, 12360, 12365, 12370, 12375, 12377, 12379, - 12381, 12383, 12385, 12392, 12400, 12402, 12410, 12417, 12424, 12431, - 12437, 12442, 12450, 12458, 12462, 12467, 12474, 12479, 12486, 12493, - 12499, 12506, 12513, 12518, 12523, 12528, 12535, 12557, 12559, 12561, - 12566, 12567, 12570, 12572, 12576, 12577, 12581, 12582, 12586, 12587, - 12591, 12592, 12596, 12597, 12601, 12602, 12610, 12622, 12621, 12637, - 12636, 12646, 12647, 12648, 12649, 12650, 12654, 12655, 12659, 12666, - 12667, 12668, 12672, 12673, 12685, 12686, 12687, 12702, 12701, 12714, - 12713, 12725, 12729, 12730, 12743, 12746, 12745, 12757, 12758, 12763, - 12765, 12767, 12769, 12771, 12773, 12781, 12783, 12785, 12787, 12792, - 12794, 12802, 12804, 12806, 12808, 12824, 12825, 12829, 12830, 12834, - 12833, 12843, 12844, 12848, 12848, 12852, 12851, 12857, 12861, 12862, - 12866, 12867, 12875, 12874, 12885, 12889, 12893, 12906, 12905, 12920, - 12921, 12922, 12925, 12926, 12927, 12928, 12936, 12940, 12949, 12955, - 12967, 12978, 12988, 12998, 12966, 13006, 13007, 13011, 13012, 13016, - 13017, 13025, 13029, 13030, 13031, 13034, 13036, 13040, 13041, 13045, - 13050, 13057, 13062, 13069, 13071, 13075, 13076, 13080, 13085, 13093, - 13094, 13097, 13099, 13107, 13108, 13112, 13113, 13114, 13118, 13120, - 13125, 13126, 13135, 13136, 13140, 13141, 13145, 13158, 13182, 13194, - 13201, 13220, 13228, 13233, 13246, 13255, 13271, 13288, 13289, 13290, - 13298, 13299, 13300, 13301, 13315, 13321, 13327, 13333, 13339, 13345, - 13363, 13373, 13383, 13389, 13398, 13410, 13416, 13422, 13438, 13439, - 13443, 13452, 13467, 13471, 13514, 13518, 13535, 13539, 13611, 13635, - 13665, 13666, 13676, 13683, 13687, 13693, 13699, 13709, 13715, 13724, - 13734, 13735, 13763, 13777, 13791, 13806, 13807, 13817, 13818, 13828, - 13829, 13830, 13834, 13847, 13877, 13887, 13887, 13889, 13899, 13900, - 13901, 13902, 13903, 13904, 13905, 13906, 13907, 13908, 13909, 13910, - 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918, 13919, 13920, - 13921, 13922, 13923, 13924, 13925, 13926, 13927, 13928, 13929, 13930, - 13931, 13932, 13933, 13934, 13935, 13936, 13937, 13938, 13939, 13940, - 13941, 13942, 13943, 13944, 13945, 13946, 13947, 13948, 13949, 13950, - 13951, 13952, 13953, 13954, 13955, 13956, 13957, 13958, 13959, 13969, - 13970, 13971, 13972, 13973, 13974, 13975, 13976, 13977, 13978, 13979, - 13980, 13981, 13982, 13983, 13984, 13985, 13986, 13987, 13988, 13989, - 13990, 13991, 13992, 13993, 13994, 13995, 13996, 13997, 13998, 13999, - 14000, 14001, 14002, 14003, 14004, 14005, 14006, 14007, 14008, 14009, - 14010, 14011, 14012, 14013, 14014, 14015, 14016, 14017, 14018, 14023, - 14024, 14025, 14026, 14027, 14028, 14029, 14030, 14031, 14032, 14033, - 14034, 14035, 14036, 14037, 14038, 14039, 14040, 14041, 14042, 14043, - 14044, 14045, 14046, 14047, 14048, 14049, 14050, 14051, 14052, 14053, - 14054, 14055, 14056, 14057, 14058, 14059, 14060, 14061, 14062, 14063, - 14064, 14065, 14066, 14067, 14068, 14069, 14070, 14071, 14072, 14073, - 14074, 14075, 14076, 14077, 14078, 14079, 14080, 14081, 14082, 14083, - 14084, 14085, 14086, 14087, 14088, 14089, 14090, 14091, 14092, 14093, - 14094, 14095, 14096, 14097, 14098, 14099, 14100, 14101, 14102, 14103, - 14104, 14105, 14106, 14107, 14108, 14109, 14110, 14111, 14112, 14113, - 14114, 14115, 14116, 14117, 14118, 14119, 14120, 14121, 14122, 14123, - 14124, 14125, 14126, 14127, 14128, 14129, 14130, 14131, 14132, 14133, - 14134, 14135, 14136, 14137, 14138, 14139, 14140, 14141, 14142, 14143, - 14144, 14145, 14146, 14147, 14148, 14149, 14150, 14151, 14152, 14153, - 14154, 14155, 14156, 14157, 14158, 14159, 14160, 14161, 14162, 14163, - 14164, 14165, 14166, 14167, 14168, 14169, 14170, 14171, 14172, 14173, - 14174, 14175, 14176, 14177, 14178, 14179, 14180, 14181, 14182, 14183, - 14184, 14185, 14186, 14187, 14188, 14189, 14190, 14191, 14192, 14193, - 14194, 14195, 14196, 14197, 14198, 14199, 14200, 14201, 14202, 14203, - 14204, 14205, 14206, 14207, 14208, 14209, 14210, 14211, 14212, 14213, - 14214, 14215, 14216, 14217, 14218, 14219, 14220, 14221, 14222, 14223, - 14224, 14225, 14226, 14227, 14228, 14229, 14230, 14231, 14232, 14233, - 14234, 14235, 14236, 14237, 14238, 14239, 14240, 14241, 14242, 14243, - 14244, 14245, 14246, 14247, 14248, 14249, 14250, 14251, 14252, 14253, - 14254, 14255, 14256, 14257, 14258, 14259, 14260, 14261, 14262, 14263, - 14264, 14265, 14266, 14267, 14268, 14269, 14270, 14271, 14272, 14273, - 14274, 14275, 14276, 14277, 14278, 14279, 14280, 14281, 14293, 14292, - 14305, 14313, 14304, 14330, 14331, 14336, 14335, 14342, 14341, 14351, - 14350, 14361, 14360, 14366, 14374, 14376, 14381, 14381, 14390, 14389, - 14403, 14402, 14407, 14411, 14412, 14413, 14417, 14418, 14419, 14420, - 14424, 14425, 14426, 14427, 14432, 14456, 14482, 14493, 14505, 14519, - 14534, 14553, 14570, 14582, 14590, 14606, 14632, 14669, 14683, 14684, - 14685, 14686, 14690, 14708, 14726, 14727, 14731, 14732, 14733, 14734, - 14738, 14752, 14756, 14757, 14758, 14768, 14769, 14770, 14776, 14782, - 14794, 14793, 14806, 14807, 14811, 14812, 14816, 14831, 14832, 14833, - 14838, 14839, 14844, 14843, 14860, 14869, 14879, 14878, 14909, 14910, - 14914, 14915, 14919, 14920, 14921, 14922, 14924, 14923, 14936, 14937, - 14938, 14939, 14940, 14946, 14951, 14957, 14968, 14979, 14983, 14990, - 14999, 15001, 15006, 15011, 15018, 15030, 15042, 15049, 15061, 15062, - 15065, 15066, 15069, 15074, 15082, 15092, 15111, 15114, 15116, 15120, - 15121, 15128, 15130, 15134, 15135, 15140, 15139, 15143, 15142, 15146, - 15145, 15149, 15148, 15151, 15152, 15153, 15154, 15155, 15156, 15157, - 15158, 15159, 15160, 15161, 15162, 15163, 15164, 15165, 15166, 15167, - 15168, 15169, 15170, 15171, 15172, 15173, 15174, 15175, 15176, 15180, - 15181, 15185, 15186, 15190, 15197, 15204, 15214, 15225, 15234, 15243, - 15255, 15260, 15268, 15273, 15281, 15286, 15293, 15293, 15294, 15294, - 15297, 15304, 15309, 15315, 15321, 15327, 15331, 15335, 15336, 15340, - 15368, 15370, 15374, 15378, 15382, 15389, 15390, 15394, 15395, 15399, - 15400, 15404, 15405, 15411, 15417, 15423, 15429, 15439, 15438, 15448, - 15457, 15458, 15462, 15463, 15468, 15469, 15470, 15475, 15476, 15477, - 15481, 15482, 15486, 15498, 15507, 15517, 15526, 15540, 15541, 15546, - 15545, 15561, 15562, 15566, 15567, 15571, 15571, 15592, 15593, 15597, - 15598, 15599, 15603, 15608, 15616, 15619, 15617, 15632, 15639, 15660, - 15684, 15686, 15690, 15691, 15695, 15696, 15704, 15705, 15706, 15707, - 15713, 15719, 15729, 15731, 15733, 15738, 15739, 15740, 15741, 15742, - 15746, 15747, 15748, 15749, 15750, 15751, 15761, 15762, 15767, 15780, - 15796, 15798, 15800, 15806, 15807, 15809, 15815, 15814, 15833, 15834, - 15838, 15844, 15853, 15853, 15877, 15878, 15883, 15884, 15886, 15888, - 15902, 15911, 15917, 15922, 15899, 15972, 15973, 15977, 15997, 16018, - 16022, 16028, 16034, 15993, 16093, 16105, 16114, 16118, 16092, 16135, - 16139, 16143, 16147, 16151, 16155, 16162, 16169, 16176, 16186, 16187, - 16191, 16192, 16193, 16197, 16198, 16203, 16205, 16204, 16210, 16211, - 16215, 16222, 16232, 16238, 16249 + 4644, 4646, 4650, 4655, 4665, 4666, 4705, 4704, 4707, 4713, + 4713, 4714, 4728, 4729, 4733, 4735, 4734, 4738, 4737, 4743, + 4780, 4781, 4786, 4785, 4804, 4819, 4818, 4835, 4839, 4847, + 4846, 4849, 4851, 4853, 4855, 4860, 4861, 4867, 4868, 4885, + 4886, 4890, 4891, 4895, 4911, 4921, 4932, 4941, 4942, 4955, + 4957, 4956, 4961, 4959, 4970, 4971, 4975, 4990, 5006, 5007, + 5020, 5029, 5051, 5052, 5057, 5056, 5081, 5093, 5109, 5108, + 5123, 5122, 5139, 5161, 5165, 5194, 5206, 5207, 5212, 5223, + 5211, 5248, 5249, 5253, 5266, 5287, 5300, 5326, 5327, 5332, + 5331, 5369, 5378, 5379, 5383, 5384, 5388, 5390, 5396, 5402, + 5404, 5406, 5408, 5410, 5412, 5422, 5437, 5421, 5451, 5452, + 5456, 5457, 5461, 5462, 5466, 5467, 5472, 5475, 5483, 5486, + 5493, 5497, 5503, 5505, 5509, 5510, 5514, 5515, 5516, 5520, + 5525, 5530, 5535, 5540, 5545, 5550, 5555, 5570, 5576, 5591, + 5596, 5611, 5617, 5635, 5640, 5645, 5650, 5655, 5660, 5666, + 5665, 5691, 5692, 5693, 5698, 5703, 5708, 5710, 5712, 5714, + 5720, 5725, 5730, 5738, 5746, 5752, 5761, 5769, 5786, 5807, + 5818, 5819, 5820, 5821, 5822, 5823, 5824, 5828, 5829, 5830, + 5834, 5835, 5836, 5837, 5842, 5849, 5850, 5854, 5855, 5859, + 5860, 5865, 5864, 5872, 5871, 5879, 5878, 5886, 5885, 5895, + 5892, 5903, 5901, 5910, 5909, 5944, 5947, 5949, 5953, 5957, + 5958, 5962, 5967, 5980, 5966, 5999, 6000, 6006, 6007, 6012, + 6015, 6019, 6026, 6027, 6031, 6032, 6036, 6042, 6048, 6052, + 6065, 6082, 6083, 6084, 6099, 6104, 6108, 6113, 6118, 6122, + 6127, 6132, 6138, 6143, 6149, 6153, 6158, 6163, 6181, 6183, + 6186, 6203, 6206, 6211, 6216, 6227, 6232, 6237, 6242, 6244, + 6246, 6248, 6250, 6252, 6254, 6256, 6258, 6260, 6262, 6264, + 6273, 6274, 6275, 6281, 6282, 6283, 6284, 6285, 6289, 6293, + 6294, 6298, 6299, 6303, 6304, 6305, 6306, 6307, 6311, 6312, + 6313, 6314, 6315, 6319, 6324, 6326, 6332, 6334, 6342, 6343, + 6345, 6350, 6359, 6360, 6364, 6365, 6369, 6370, 6371, 6375, + 6376, 6377, 6378, 6381, 6382, 6386, 6387, 6391, 6392, 6396, + 6397, 6401, 6402, 6403, 6404, 6411, 6412, 6418, 6424, 6430, + 6436, 6437, 6444, 6452, 6460, 6466, 6475, 6490, 6496, 6501, + 6502, 6506, 6511, 6515, 6516, 6520, 6521, 6525, 6531, 6535, + 6536, 6540, 6548, 6549, 6553, 6554, 6558, 6559, 6563, 6564, + 6565, 6573, 6574, 6575, 6576, 6577, 6581, 6582, 6587, 6586, + 6599, 6600, 6604, 6607, 6608, 6609, 6610, 6614, 6622, 6629, + 6630, 6634, 6644, 6645, 6649, 6650, 6653, 6655, 6659, 6671, + 6672, 6676, 6683, 6696, 6697, 6699, 6701, 6707, 6712, 6718, + 6724, 6731, 6741, 6742, 6743, 6744, 6745, 6749, 6750, 6754, + 6755, 6759, 6760, 6764, 6765, 6766, 6770, 6771, 6775, 6779, + 6791, 6792, 6796, 6797, 6801, 6802, 6806, 6807, 6811, 6812, + 6816, 6817, 6821, 6822, 6826, 6827, 6828, 6831, 6833, 6838, + 6840, 6842, 6850, 6858, 6864, 6872, 6873, 6877, 6881, 6882, + 6892, 6893, 6894, 6898, 6902, 6909, 6915, 6927, 6928, 6932, + 6933, 6937, 6939, 6948, 6962, 6947, 6982, 6981, 6995, 7004, + 7003, 7019, 7018, 7034, 7033, 7049, 7043, 7060, 7059, 7094, + 7099, 7104, 7109, 7115, 7114, 7123, 7124, 7125, 7126, 7130, + 7131, 7143, 7144, 7148, 7149, 7152, 7154, 7162, 7170, 7172, + 7174, 7175, 7183, 7184, 7190, 7199, 7197, 7210, 7223, 7222, + 7235, 7233, 7246, 7253, 7263, 7264, 7291, 7298, 7302, 7308, + 7306, 7325, 7327, 7332, 7340, 7339, 7355, 7359, 7358, 7370, + 7371, 7375, 7391, 7392, 7396, 7404, 7408, 7413, 7418, 7425, + 7432, 7442, 7452, 7463, 7473, 7479, 7485, 7494, 7504, 7520, + 7534, 7544, 7548, 7553, 7554, 7557, 7559, 7560, 7561, 7562, + 7565, 7570, 7578, 7583, 7591, 7592, 7596, 7597, 7601, 7601, + 7604, 7606, 7610, 7611, 7615, 7616, 7624, 7625, 7626, 7630, + 7631, 7636, 7644, 7645, 7646, 7647, 7652, 7651, 7661, 7660, + 7667, 7674, 7684, 7701, 7704, 7711, 7715, 7722, 7726, 7730, + 7737, 7737, 7743, 7744, 7748, 7749, 7750, 7754, 7755, 7764, + 7771, 7772, 7777, 7776, 7788, 7789, 7790, 7794, 7795, 7795, + 7800, 7799, 7820, 7821, 7825, 7826, 7830, 7831, 7832, 7836, + 7837, 7842, 7841, 7862, 7863, 7867, 7872, 7873, 7880, 7882, + 7886, 7888, 7887, 7899, 7901, 7900, 7913, 7914, 7919, 7928, + 7929, 7930, 7934, 7941, 7951, 7959, 7960, 7960, 7964, 7963, + 7986, 7987, 7991, 7992, 7996, 7997, 7998, 7999, 8000, 8001, + 8005, 8006, 8011, 8010, 8031, 8032, 8033, 8038, 8037, 8043, + 8050, 8056, 8065, 8066, 8070, 8084, 8083, 8096, 8097, 8101, + 8102, 8106, 8116, 8126, 8127, 8132, 8131, 8142, 8143, 8147, + 8148, 8152, 8162, 8173, 8172, 8180, 8180, 8189, 8190, 8195, + 8196, 8205, 8214, 8215, 8219, 8219, 8231, 8236, 8236, 8245, + 8250, 8249, 8264, 8268, 8269, 8290, 8290, 8304, 8315, 8318, + 8320, 8324, 8330, 8337, 8339, 8347, 8348, 8352, 8353, 8370, + 8389, 8391, 8398, 8409, 8410, 8411, 8425, 8430, 8452, 8458, + 8464, 8470, 8471, 8472, 8473, 8474, 8478, 8479, 8480, 8484, + 8485, 8486, 8490, 8491, 8496, 8547, 8554, 8597, 8603, 8609, + 8615, 8621, 8627, 8633, 8639, 8643, 8649, 8655, 8661, 8667, + 8673, 8677, 8683, 8692, 8698, 8706, 8712, 8722, 8728, 8737, + 8747, 8754, 8764, 8770, 8779, 8783, 8789, 8795, 8801, 8807, + 8813, 8819, 8825, 8831, 8837, 8843, 8849, 8855, 8861, 8867, + 8871, 8872, 8876, 8877, 8881, 8882, 8886, 8887, 8891, 8892, + 8893, 8894, 8895, 8896, 8900, 8901, 8906, 8912, 8916, 8923, + 8930, 8937, 8944, 8951, 8957, 8956, 8964, 8971, 8978, 8986, + 8997, 9019, 9026, 9034, 9035, 9036, 9037, 9038, 9039, 9050, + 9051, 9052, 9053, 9054, 9060, 9064, 9070, 9076, 9082, 9088, + 9090, 9097, 9104, 9110, 9134, 9144, 9151, 9159, 9165, 9172, + 9178, 9188, 9195, 9211, 9217, 9223, 9232, 9241, 9247, 9253, + 9259, 9265, 9279, 9290, 9296, 9302, 9308, 9314, 9320, 9327, + 9334, 9340, 9346, 9352, 9358, 9364, 9370, 9376, 9382, 9388, + 9396, 9417, 9424, 9430, 9437, 9444, 9451, 9458, 9464, 9470, + 9477, 9483, 9490, 9496, 9502, 9508, 9514, 9520, 9538, 9544, + 9550, 9557, 9564, 9572, 9579, 9586, 9593, 9600, 9617, 9623, + 9629, 9635, 9641, 9648, 9654, 9660, 9666, 9672, 9678, 9684, + 9691, 9699, 9705, 9711, 9717, 9723, 9731, 9737, 9751, 9757, + 9763, 9771, 9783, 9790, 9805, 9811, 9818, 9825, 9832, 9839, + 9846, 9850, 9870, 9869, 9941, 9979, 9981, 9986, 9987, 9991, + 9992, 9996, 9997, 10001, 10008, 10016, 10043, 10049, 10055, 10061, + 10067, 10073, 10082, 10089, 10091, 10088, 10098, 10109, 10115, 10121, + 10127, 10133, 10139, 10145, 10151, 10157, 10164, 10163, 10183, 10182, + 10194, 10204, 10212, 10228, 10229, 10234, 10239, 10242, 10245, 10244, + 10260, 10262, 10268, 10267, 10284, 10287, 10286, 10290, 10292, 10294, + 10296, 10298, 10300, 10302, 10304, 10310, 10316, 10319, 10318, 10324, + 10325, 10329, 10336, 10344, 10345, 10349, 10356, 10364, 10365, 10369, + 10370, 10374, 10382, 10393, 10394, 10406, 10417, 10418, 10424, 10425, + 10445, 10449, 10447, 10465, 10463, 10474, 10484, 10482, 10500, 10499, + 10509, 10520, 10518, 10537, 10536, 10547, 10559, 10560, 10561, 10565, + 10566, 10574, 10575, 10579, 10594, 10594, 10609, 10645, 10730, 10741, + 10738, 10763, 10776, 10776, 10792, 10791, 10812, 10829, 10812, 10836, + 10840, 10863, 10864, 10869, 10872, 10873, 10874, 10878, 10879, 10884, + 10883, 10889, 10888, 10896, 10897, 10900, 10902, 10902, 10906, 10906, + 10911, 10912, 10916, 10918, 10923, 10924, 10928, 10939, 10952, 10953, + 10954, 10955, 10956, 10957, 10958, 10959, 10960, 10961, 10962, 10963, + 10967, 10968, 10969, 10970, 10971, 10972, 10973, 10974, 10975, 10979, + 10980, 10981, 10982, 10985, 10987, 10988, 10992, 10993, 11001, 11003, + 11007, 11009, 11008, 11022, 11025, 11024, 11039, 11045, 11059, 11061, + 11065, 11067, 11072, 11073, 11090, 11112, 11116, 11117, 11121, 11133, + 11135, 11140, 11139, 11189, 11191, 11196, 11197, 11198, 11202, 11203, + 11207, 11220, 11227, 11232, 11239, 11246, 11253, 11263, 11290, 11294, + 11300, 11306, 11315, 11323, 11327, 11334, 11335, 11339, 11340, 11341, + 11345, 11346, 11347, 11348, 11349, 11350, 11354, 11355, 11356, 11357, + 11358, 11362, 11363, 11364, 11365, 11366, 11370, 11371, 11372, 11373, + 11374, 11378, 11383, 11384, 11388, 11389, 11393, 11395, 11394, 11432, + 11433, 11437, 11438, 11442, 11452, 11452, 11463, 11464, 11467, 11487, + 11491, 11505, 11506, 11511, 11510, 11520, 11530, 11519, 11532, 11545, + 11557, 11556, 11574, 11573, 11582, 11582, 11599, 11605, 11620, 11636, + 11644, 11648, 11653, 11652, 11661, 11666, 11672, 11677, 11682, 11690, + 11691, 11695, 11706, 11719, 11720, 11724, 11736, 11740, 11749, 11752, + 11759, 11760, 11768, 11776, 11767, 11786, 11793, 11785, 11803, 11811, + 11812, 11820, 11824, 11825, 11836, 11837, 11841, 11850, 11851, 11852, + 11854, 11853, 11864, 11866, 11870, 11871, 11873, 11872, 11876, 11875, + 11881, 11882, 11886, 11887, 11891, 11901, 11902, 11906, 11907, 11912, + 11911, 11925, 11926, 11930, 11935, 11943, 11944, 11952, 11954, 11954, + 11962, 11970, 11961, 11992, 11993, 11997, 12005, 12006, 12010, 12020, + 12021, 12028, 12027, 12043, 12054, 12042, 12057, 12056, 12068, 12067, + 12080, 12082, 12086, 12087, 12091, 12104, 12120, 12121, 12125, 12126, + 12130, 12131, 12132, 12137, 12136, 12157, 12159, 12162, 12164, 12167, + 12168, 12171, 12175, 12179, 12183, 12187, 12191, 12195, 12199, 12203, + 12211, 12214, 12224, 12223, 12239, 12246, 12254, 12262, 12270, 12278, + 12286, 12293, 12300, 12306, 12308, 12310, 12319, 12323, 12328, 12327, + 12334, 12333, 12338, 12347, 12354, 12359, 12364, 12369, 12371, 12373, + 12375, 12377, 12379, 12386, 12394, 12396, 12404, 12411, 12418, 12425, + 12431, 12436, 12444, 12452, 12456, 12461, 12468, 12473, 12480, 12487, + 12493, 12500, 12507, 12512, 12517, 12522, 12529, 12551, 12553, 12555, + 12560, 12561, 12564, 12566, 12570, 12571, 12575, 12576, 12580, 12581, + 12585, 12586, 12590, 12591, 12595, 12596, 12604, 12616, 12615, 12631, + 12630, 12640, 12641, 12642, 12643, 12644, 12648, 12649, 12653, 12660, + 12661, 12662, 12666, 12667, 12679, 12680, 12681, 12696, 12695, 12708, + 12707, 12719, 12723, 12724, 12737, 12740, 12739, 12751, 12752, 12757, + 12759, 12761, 12763, 12765, 12767, 12775, 12777, 12779, 12781, 12786, + 12788, 12796, 12798, 12800, 12802, 12818, 12819, 12823, 12824, 12828, + 12827, 12837, 12838, 12842, 12842, 12846, 12845, 12851, 12855, 12856, + 12860, 12861, 12869, 12868, 12879, 12883, 12887, 12900, 12899, 12914, + 12915, 12916, 12919, 12920, 12921, 12922, 12930, 12934, 12943, 12949, + 12961, 12972, 12982, 12992, 12960, 13000, 13001, 13005, 13006, 13010, + 13011, 13019, 13023, 13024, 13025, 13028, 13030, 13034, 13035, 13039, + 13044, 13051, 13056, 13063, 13065, 13069, 13070, 13074, 13079, 13087, + 13088, 13091, 13093, 13101, 13102, 13106, 13107, 13108, 13112, 13114, + 13119, 13120, 13129, 13130, 13134, 13135, 13139, 13152, 13176, 13188, + 13195, 13214, 13222, 13227, 13240, 13249, 13265, 13282, 13283, 13284, + 13292, 13293, 13294, 13295, 13309, 13315, 13321, 13327, 13333, 13339, + 13357, 13367, 13377, 13383, 13392, 13404, 13410, 13416, 13432, 13433, + 13437, 13446, 13461, 13465, 13508, 13512, 13529, 13533, 13605, 13629, + 13659, 13660, 13670, 13677, 13681, 13687, 13693, 13703, 13709, 13718, + 13728, 13729, 13757, 13771, 13785, 13800, 13801, 13811, 13812, 13822, + 13823, 13824, 13828, 13841, 13871, 13881, 13881, 13883, 13893, 13894, + 13895, 13896, 13897, 13898, 13899, 13900, 13901, 13902, 13903, 13904, + 13905, 13906, 13907, 13908, 13909, 13910, 13911, 13912, 13913, 13914, + 13915, 13916, 13917, 13918, 13919, 13920, 13921, 13922, 13923, 13924, + 13925, 13926, 13927, 13928, 13929, 13930, 13931, 13932, 13933, 13934, + 13935, 13936, 13937, 13938, 13939, 13940, 13941, 13942, 13943, 13944, + 13945, 13946, 13947, 13948, 13949, 13950, 13951, 13952, 13953, 13963, + 13964, 13965, 13966, 13967, 13968, 13969, 13970, 13971, 13972, 13973, + 13974, 13975, 13976, 13977, 13978, 13979, 13980, 13981, 13982, 13983, + 13984, 13985, 13986, 13987, 13988, 13989, 13990, 13991, 13992, 13993, + 13994, 13995, 13996, 13997, 13998, 13999, 14000, 14001, 14002, 14003, + 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14012, 14017, + 14018, 14019, 14020, 14021, 14022, 14023, 14024, 14025, 14026, 14027, + 14028, 14029, 14030, 14031, 14032, 14033, 14034, 14035, 14036, 14037, + 14038, 14039, 14040, 14041, 14042, 14043, 14044, 14045, 14046, 14047, + 14048, 14049, 14050, 14051, 14052, 14053, 14054, 14055, 14056, 14057, + 14058, 14059, 14060, 14061, 14062, 14063, 14064, 14065, 14066, 14067, + 14068, 14069, 14070, 14071, 14072, 14073, 14074, 14075, 14076, 14077, + 14078, 14079, 14080, 14081, 14082, 14083, 14084, 14085, 14086, 14087, + 14088, 14089, 14090, 14091, 14092, 14093, 14094, 14095, 14096, 14097, + 14098, 14099, 14100, 14101, 14102, 14103, 14104, 14105, 14106, 14107, + 14108, 14109, 14110, 14111, 14112, 14113, 14114, 14115, 14116, 14117, + 14118, 14119, 14120, 14121, 14122, 14123, 14124, 14125, 14126, 14127, + 14128, 14129, 14130, 14131, 14132, 14133, 14134, 14135, 14136, 14137, + 14138, 14139, 14140, 14141, 14142, 14143, 14144, 14145, 14146, 14147, + 14148, 14149, 14150, 14151, 14152, 14153, 14154, 14155, 14156, 14157, + 14158, 14159, 14160, 14161, 14162, 14163, 14164, 14165, 14166, 14167, + 14168, 14169, 14170, 14171, 14172, 14173, 14174, 14175, 14176, 14177, + 14178, 14179, 14180, 14181, 14182, 14183, 14184, 14185, 14186, 14187, + 14188, 14189, 14190, 14191, 14192, 14193, 14194, 14195, 14196, 14197, + 14198, 14199, 14200, 14201, 14202, 14203, 14204, 14205, 14206, 14207, + 14208, 14209, 14210, 14211, 14212, 14213, 14214, 14215, 14216, 14217, + 14218, 14219, 14220, 14221, 14222, 14223, 14224, 14225, 14226, 14227, + 14228, 14229, 14230, 14231, 14232, 14233, 14234, 14235, 14236, 14237, + 14238, 14239, 14240, 14241, 14242, 14243, 14244, 14245, 14246, 14247, + 14248, 14249, 14250, 14251, 14252, 14253, 14254, 14255, 14256, 14257, + 14258, 14259, 14260, 14261, 14262, 14263, 14264, 14265, 14266, 14267, + 14268, 14269, 14270, 14271, 14272, 14273, 14274, 14275, 14287, 14286, + 14299, 14307, 14298, 14324, 14325, 14330, 14329, 14336, 14335, 14345, + 14344, 14355, 14354, 14360, 14368, 14370, 14375, 14375, 14384, 14383, + 14397, 14396, 14401, 14405, 14406, 14407, 14411, 14412, 14413, 14414, + 14418, 14419, 14420, 14421, 14426, 14450, 14476, 14487, 14499, 14513, + 14528, 14547, 14564, 14576, 14584, 14600, 14626, 14663, 14677, 14678, + 14679, 14680, 14684, 14702, 14720, 14721, 14725, 14726, 14727, 14728, + 14732, 14746, 14750, 14751, 14752, 14762, 14763, 14764, 14770, 14776, + 14788, 14787, 14800, 14801, 14805, 14806, 14810, 14825, 14826, 14827, + 14832, 14833, 14838, 14837, 14854, 14863, 14873, 14872, 14903, 14904, + 14908, 14909, 14913, 14914, 14915, 14916, 14918, 14917, 14930, 14931, + 14932, 14933, 14934, 14940, 14945, 14951, 14962, 14973, 14977, 14984, + 14993, 14995, 15000, 15005, 15012, 15024, 15036, 15043, 15055, 15056, + 15059, 15060, 15063, 15068, 15076, 15086, 15105, 15108, 15110, 15114, + 15115, 15122, 15124, 15128, 15129, 15134, 15133, 15137, 15136, 15140, + 15139, 15143, 15142, 15145, 15146, 15147, 15148, 15149, 15150, 15151, + 15152, 15153, 15154, 15155, 15156, 15157, 15158, 15159, 15160, 15161, + 15162, 15163, 15164, 15165, 15166, 15167, 15168, 15169, 15170, 15174, + 15175, 15179, 15180, 15184, 15191, 15198, 15208, 15219, 15228, 15237, + 15249, 15254, 15262, 15267, 15275, 15280, 15287, 15287, 15288, 15288, + 15291, 15298, 15303, 15309, 15315, 15321, 15325, 15329, 15330, 15334, + 15362, 15364, 15368, 15372, 15376, 15383, 15384, 15388, 15389, 15393, + 15394, 15398, 15399, 15405, 15411, 15417, 15423, 15433, 15432, 15442, + 15451, 15452, 15456, 15457, 15462, 15463, 15464, 15469, 15470, 15471, + 15475, 15476, 15480, 15492, 15501, 15511, 15520, 15534, 15535, 15540, + 15539, 15555, 15556, 15560, 15561, 15565, 15565, 15586, 15587, 15591, + 15592, 15593, 15597, 15602, 15610, 15613, 15611, 15626, 15633, 15654, + 15678, 15680, 15684, 15685, 15689, 15690, 15698, 15699, 15700, 15701, + 15707, 15713, 15723, 15725, 15727, 15732, 15733, 15734, 15735, 15736, + 15740, 15741, 15742, 15743, 15744, 15745, 15755, 15756, 15761, 15774, + 15790, 15792, 15794, 15800, 15801, 15803, 15809, 15808, 15827, 15828, + 15832, 15838, 15847, 15847, 15871, 15872, 15877, 15878, 15880, 15882, + 15896, 15905, 15911, 15916, 15893, 15966, 15967, 15971, 15991, 16012, + 16016, 16022, 16028, 15987, 16087, 16099, 16108, 16112, 16086, 16129, + 16133, 16137, 16141, 16145, 16149, 16156, 16163, 16170, 16180, 16181, + 16185, 16186, 16187, 16191, 16192, 16197, 16199, 16198, 16204, 16205, + 16209, 16216, 16226, 16232, 16243 }; #endif @@ -22883,17 +22883,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); switch (end_ptr[0]) { case 'g': - case 'G': - text_shift_number+=10; - /* fall through */ + case 'G': text_shift_number+=30; break; case 'm': - case 'M': - text_shift_number+=10; - /* fall through */ + case 'M': text_shift_number+=20; break; case 'k': - case 'K': - text_shift_number+=10; - break; + case 'K': text_shift_number+=10; break; default: my_yyabort_error((ER_WRONG_SIZE_NUMBER, MYF(0))); } @@ -22905,41 +22899,41 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_WRONG_SIZE_NUMBER, MYF(0))); (yyval.ulonglong_number)= number; } -#line 22909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 476: -#line 4711 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.option_list= NULL; } -#line 22915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 477: -#line 4712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 22921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 478: -#line 4713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 22927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 479: -#line 4719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_braces(1);} -#line 22933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 480: -#line 4719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 22939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 481: -#line 4721 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4715 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.add(DDL_options_st::OPT_LIKE); @@ -22950,53 +22944,53 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* CREATE TABLE ... LIKE is not allowed for views. */ src_table->required_type= FRMTYPE_TABLE; } -#line 22954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 482: -#line 4734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4728 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)= (yyvsp[0].table); } -#line 22960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 483: -#line 4735 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)= (yyvsp[-1].table); } -#line 22966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 484: -#line 4739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4733 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 22972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 485: -#line 4741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4735 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_braces(0);} -#line 22978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 486: -#line 4742 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4736 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 22984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 487: -#line 4744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4738 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_braces(1);} -#line 22990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 488: -#line 4745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 22996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 489: -#line 4750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Remove all tables used in PARTITION clause from the global table @@ -23006,17 +23000,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); last_non_sel_table->next_global= 0; Lex->query_tables_last= &last_non_sel_table->next_global; } -#line 23010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 490: -#line 4786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4780 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 492: -#line 4792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->part_info= new (thd->mem_root) partition_info(); @@ -23030,11 +23024,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.flags|= Alter_info::ALTER_PARTITION; } } -#line 23034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 494: -#line 4810 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4804 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { #ifdef WITH_PARTITION_STORAGE_ENGINE LEX_STRING partition_name={C_STRING_WITH_LEN("partition")}; @@ -23046,11 +23040,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); "--with-plugin-partition")); #endif } -#line 23050 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 495: -#line 4825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (!lex->part_info) @@ -23063,82 +23057,82 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); partition info string into part_info data structure. */ } -#line 23067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 496: -#line 4837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4831 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 498: -#line 4846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4840 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->list_of_part_fields= TRUE; part_info->column_list= FALSE; part_info->part_type= HASH_PARTITION; } -#line 23084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 499: -#line 4853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->part_type= HASH_PARTITION; } -#line 23090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 500: -#line 4854 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 501: -#line 4856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->part_type= RANGE_PARTITION; } -#line 23102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 502: -#line 4858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->part_type= RANGE_PARTITION; } -#line 23108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 503: -#line 4860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4854 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->part_type= LIST_PARTITION; } -#line 23114 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 504: -#line 4862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->part_type= LIST_PARTITION; } -#line 23120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23114 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 505: -#line 4866 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 506: -#line 4868 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->linear_hash_ind= TRUE;} -#line 23132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 507: -#line 4873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4867 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_NONE;} -#line 23138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 508: -#line 4875 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { switch ((yyvsp[0].ulong_num)) { case 1: @@ -23152,35 +23146,35 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 509: -#line 4891 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 510: -#line 4892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4886 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 511: -#line 4896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 512: -#line 4897 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4891 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 513: -#line 4902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->num_columns++; @@ -23193,21 +23187,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0), "list of partition fields")); } -#line 23197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 514: -#line 4918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->column_list= TRUE; part_info->list_of_part_fields= TRUE; } -#line 23207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23201 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 515: -#line 4928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->set_part_expr((yyvsp[-3].simple_string)+1, (yyvsp[-2].item), (yyvsp[-1].simple_string), FALSE)) @@ -23215,26 +23209,26 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); part_info->num_columns= 1; part_info->column_list= FALSE; } -#line 23219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 516: -#line 4939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->part_info->set_part_expr((yyvsp[-3].simple_string)+1, (yyvsp[-2].item), (yyvsp[-1].simple_string), TRUE)) { MYSQL_YYABORT; } } -#line 23228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 517: -#line 4947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 518: -#line 4949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { uint num_parts= (yyvsp[0].ulong_num); partition_info *part_info= Lex->part_info; @@ -23244,57 +23238,57 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); part_info->num_parts= num_parts; part_info->use_default_num_partitions= FALSE; } -#line 23248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23242 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 519: -#line 4961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4955 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23254 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 520: -#line 4963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->subpart_type= HASH_PARTITION; } -#line 23260 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23254 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 521: -#line 4964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23260 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 522: -#line 4967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->subpart_type= HASH_PARTITION; part_info->list_of_subpart_fields= TRUE; } -#line 23276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 523: -#line 4972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 524: -#line 4976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 525: -#line 4977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 526: -#line 4982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->subpart_field_list.push_back((yyvsp[0].lex_str).str, thd->mem_root)) @@ -23306,11 +23300,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0), "list of subpartition fields")); } -#line 23310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 527: -#line 4997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; bool not_corr_func; @@ -23323,17 +23317,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } (yyval.item)=(yyvsp[0].item); } -#line 23327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 528: -#line 5012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 529: -#line 5014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { uint num_parts= (yyvsp[0].ulong_num); LEX *lex= Lex; @@ -23342,11 +23336,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->part_info->num_subparts= num_parts; lex->part_info->use_default_num_subpartitions= FALSE; } -#line 23346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 530: -#line 5026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->part_type == RANGE_PARTITION) @@ -23356,11 +23350,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0), "LIST")); } -#line 23360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23354 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 531: -#line 5036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5030 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; uint count_curr_parts= part_info->partitions.elements; @@ -23379,23 +23373,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } part_info->count_curr_subparts= 0; } -#line 23383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 532: -#line 5057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 533: -#line 5058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 534: -#line 5063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; partition_element *p_elem= new (thd->mem_root) partition_element(); @@ -23412,17 +23406,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); part_info->use_default_partitions= FALSE; part_info->use_default_num_partitions= FALSE; } -#line 23416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 535: -#line 5083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 536: -#line 5088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; partition_element *p_elem= part_info->curr_part_elem; @@ -23430,11 +23424,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; p_elem->partition_name= (yyvsp[0].lex_str).str; } -#line 23434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 537: -#line 5099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; partition_info *part_info= lex->part_info; @@ -23450,11 +23444,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else part_info->part_type= HASH_PARTITION; } -#line 23454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23448 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 538: -#line 5115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; partition_info *part_info= lex->part_info; @@ -23467,17 +23461,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else part_info->part_type= RANGE_PARTITION; } -#line 23471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 539: -#line 5127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 540: -#line 5129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; partition_info *part_info= lex->part_info; @@ -23490,17 +23484,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else part_info->part_type= LIST_PARTITION; } -#line 23494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 541: -#line 5141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 542: -#line 5146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; @@ -23522,17 +23516,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 543: -#line 5167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 544: -#line 5172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; partition_info *part_info= lex->part_info; @@ -23561,11 +23555,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } } } -#line 23565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 545: -#line 5201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->num_columns < 2U) @@ -23574,23 +23568,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 546: -#line 5212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 547: -#line 5213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23590 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 548: -#line 5218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->print_debug("( part_value_item", NULL); @@ -23602,17 +23596,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23600 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 549: -#line 5229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 550: -#line 5231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->print_debug(") part_value_item", NULL); @@ -23633,23 +23627,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } part_info->curr_list_object= 0; } -#line 23637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 551: -#line 5254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 552: -#line 5255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23649 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 553: -#line 5260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->part_type == LIST_PARTITION) @@ -23662,11 +23656,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 554: -#line 5273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; partition_info *part_info= lex->part_info; @@ -23682,11 +23676,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23686 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23680 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 555: -#line 5293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->num_subparts != 0 && @@ -23700,11 +23694,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 556: -#line 5307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->num_subparts != 0) @@ -23727,23 +23721,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } part_info->count_curr_subparts= 0; } -#line 23731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 557: -#line 5332 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5326 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 558: -#line 5333 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 559: -#line 5338 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5332 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; partition_element *curr_part= part_info->current_partition; @@ -23777,113 +23771,113 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); part_info->use_default_num_subpartitions= FALSE; part_info->count_curr_subparts++; } -#line 23781 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23775 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 560: -#line 5371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23787 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23781 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 561: -#line 5376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (check_ident_length(&(yyvsp[0].lex_str))) MYSQL_YYABORT; Lex->part_info->curr_part_elem->partition_name= (yyvsp[0].lex_str).str; } -#line 23797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 562: -#line 5384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 563: -#line 5385 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 564: -#line 5389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 565: -#line 5390 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 566: -#line 5395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->tablespace_name= (yyvsp[0].lex_str).str; } -#line 23827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 567: -#line 5397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5391 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->curr_part_elem->engine_type= (yyvsp[0].db_type); part_info->default_engine_type= (yyvsp[0].db_type); } -#line 23837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 568: -#line 5403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->part_info->curr_part_elem->connect_string.str= (yyvsp[0].lex_str).str; lex->part_info->curr_part_elem->connect_string.length= (yyvsp[0].lex_str).length; } -#line 23847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 569: -#line 5409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->nodegroup_id= (uint16) (yyvsp[0].ulong_num); } -#line 23853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 570: -#line 5411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->part_max_rows= (ha_rows) (yyvsp[0].ulonglong_number); } -#line 23859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 571: -#line 5413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5407 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->part_min_rows= (ha_rows) (yyvsp[0].ulonglong_number); } -#line 23865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 572: -#line 5415 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->data_file_name= (yyvsp[0].lex_str).str; } -#line 23871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 573: -#line 5417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->index_file_name= (yyvsp[0].lex_str).str; } -#line 23877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 574: -#line 5419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->part_comment= (yyvsp[0].lex_str).str; } -#line 23883 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 575: -#line 5428 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5422 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->sql_command == SQLCOM_INSERT) @@ -23898,19 +23892,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); mysql_init_select(lex); lex->current_select->parsing_place= SELECT_LIST; } -#line 23902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 576: -#line 5443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= NO_MATTER; } -#line 23910 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 577: -#line 5447 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5441 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* The following work only with the local list, the global list @@ -23918,170 +23912,170 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ Lex->current_select->table_list.push_front(&Lex->save_list); } -#line 23922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 578: -#line 5457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 579: -#line 5458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23934 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 580: -#line 5462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5456 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23934 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 581: -#line 5463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 582: -#line 5467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5461 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23952 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 583: -#line 5468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23952 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 584: -#line 5472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5466 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23964 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 585: -#line 5473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23964 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 586: -#line 5478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_exists= FALSE; } -#line 23978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 587: -#line 5482 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_exists= TRUE; } -#line 23986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 588: -#line 5489 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5483 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.object_ddl_options).init(); } -#line 23994 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 589: -#line 5493 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.object_ddl_options).set(DDL_options_st::OPT_IF_NOT_EXISTS); } -#line 24002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 590: -#line 5500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.object_ddl_options).init(); } -#line 24010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 591: -#line 5504 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5498 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.object_ddl_options).set(DDL_options_st::OPT_OR_REPLACE); } -#line 24018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 599: -#line 5527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.db_type= (yyvsp[0].db_type); Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE; } -#line 24027 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24021 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 600: -#line 5532 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.max_rows= (yyvsp[0].ulonglong_number); Lex->create_info.used_fields|= HA_CREATE_USED_MAX_ROWS; } -#line 24036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 601: -#line 5537 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5531 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.min_rows= (yyvsp[0].ulonglong_number); Lex->create_info.used_fields|= HA_CREATE_USED_MIN_ROWS; } -#line 24045 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 602: -#line 5542 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.avg_row_length=(yyvsp[0].ulong_num); Lex->create_info.used_fields|= HA_CREATE_USED_AVG_ROW_LENGTH; } -#line 24054 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24048 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 603: -#line 5547 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.password=(yyvsp[0].lex_str).str; Lex->create_info.used_fields|= HA_CREATE_USED_PASSWORD; } -#line 24063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 604: -#line 5552 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5546 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.comment=(yyvsp[0].lex_str); Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT; } -#line 24072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 605: -#line 5557 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.auto_increment_value=(yyvsp[0].ulonglong_number); Lex->create_info.used_fields|= HA_CREATE_USED_AUTO; } -#line 24081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24075 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 606: -#line 5562 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { switch((yyvsp[0].ulong_num)) { case 0: @@ -24096,21 +24090,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS; } -#line 24100 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24094 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 607: -#line 5577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.table_options&= ~(HA_OPTION_PACK_KEYS | HA_OPTION_NO_PACK_KEYS); Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS; } -#line 24110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24104 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 608: -#line 5583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { switch((yyvsp[0].ulong_num)) { case 0: @@ -24125,20 +24119,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC; } -#line 24129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 609: -#line 5598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.stats_auto_recalc= HA_STATS_AUTO_RECALC_DEFAULT; Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC; } -#line 24138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 610: -#line 5603 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { switch((yyvsp[0].ulong_num)) { case 0: @@ -24153,21 +24147,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT; } -#line 24157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 611: -#line 5618 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5612 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.table_options&= ~(HA_OPTION_STATS_PERSISTENT | HA_OPTION_NO_STATS_PERSISTENT); Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT; } -#line 24167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 612: -#line 5624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5618 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* From user point of view STATS_SAMPLE_PAGES can be specified as STATS_SAMPLE_PAGES=N (where 0create_info.stats_sample_pages=(yyvsp[0].ulong_num); Lex->create_info.used_fields|= HA_CREATE_USED_STATS_SAMPLE_PAGES; } -#line 24189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24183 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 613: -#line 5642 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.stats_sample_pages=0; Lex->create_info.used_fields|= HA_CREATE_USED_STATS_SAMPLE_PAGES; } -#line 24198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 614: -#line 5647 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5641 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM; Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM; } -#line 24207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24201 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 615: -#line 5652 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5646 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM; Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM; } -#line 24216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 616: -#line 5657 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5651 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.used_fields|= HA_CREATE_USED_PAGE_CHECKSUM; Lex->create_info.page_checksum= (yyvsp[0].choice); } -#line 24225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 617: -#line 5662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5656 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_DELAY_KEY_WRITE : HA_OPTION_NO_DELAY_KEY_WRITE; Lex->create_info.used_fields|= HA_CREATE_USED_DELAY_KEY_WRITE; } -#line 24234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 618: -#line 5667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.row_type= (yyvsp[0].row_type); Lex->create_info.used_fields|= HA_CREATE_USED_ROW_FORMAT; } -#line 24243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 619: -#line 5672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->select_lex.table_list.save_and_clear(&Lex->save_list); } -#line 24251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 620: -#line 5676 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5670 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Move the union list to the merge_list and exclude its tables @@ -24273,84 +24267,84 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->create_info.used_fields|= HA_CREATE_USED_UNION; } -#line 24277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24271 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 623: -#line 5700 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.merge_insert_method= (yyvsp[0].ulong_num); Lex->create_info.used_fields|= HA_CREATE_USED_INSERT_METHOD; } -#line 24286 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24280 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 624: -#line 5705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.data_file_name= (yyvsp[0].lex_str).str; Lex->create_info.used_fields|= HA_CREATE_USED_DATADIR; } -#line 24295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 625: -#line 5710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5704 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.index_file_name= (yyvsp[0].lex_str).str; Lex->create_info.used_fields|= HA_CREATE_USED_INDEXDIR; } -#line 24304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24298 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 626: -#line 5715 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5709 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {Lex->create_info.tablespace= (yyvsp[0].lex_str).str;} -#line 24310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 627: -#line 5717 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5711 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {Lex->create_info.storage_media= HA_SM_DISK;} -#line 24316 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 628: -#line 5719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {Lex->create_info.storage_media= HA_SM_MEMORY;} -#line 24322 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24316 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 629: -#line 5721 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5715 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.connect_string.str= (yyvsp[0].lex_str).str; Lex->create_info.connect_string.length= (yyvsp[0].lex_str).length; Lex->create_info.used_fields|= HA_CREATE_USED_CONNECTION; } -#line 24332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 630: -#line 5727 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5721 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.used_fields|= HA_CREATE_USED_KEY_BLOCK_SIZE; Lex->create_info.key_block_size= (yyvsp[0].ulong_num); } -#line 24341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 631: -#line 5732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL; Lex->create_info.transactional= (yyvsp[0].choice); } -#line 24350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 632: -#line 5737 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH) my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].lex_str).str)); @@ -24358,11 +24352,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].lex_str), true, &Lex->create_info.option_list, &Lex->option_list_last); } -#line 24362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 633: -#line 5745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH) my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].lex_str).str)); @@ -24370,40 +24364,40 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].lex_str), false, &Lex->create_info.option_list, &Lex->option_list_last); } -#line 24374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 634: -#line 5753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { new (thd->mem_root) engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].ulonglong_number), &Lex->create_info.option_list, &Lex->option_list_last, thd->mem_root); } -#line 24384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 635: -#line 5759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { new (thd->mem_root) engine_option_value((yyvsp[-2].lex_str), &Lex->create_info.option_list, &Lex->option_list_last); } -#line 24394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 636: -#line 5768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->create_info.add_table_option_default_charset((yyvsp[0].charset))) MYSQL_YYABORT; } -#line 24403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 637: -#line 5776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { HA_CREATE_INFO *cinfo= &Lex->create_info; if ((cinfo->used_fields & HA_CREATE_USED_DEFAULT_CHARSET) && @@ -24417,11 +24411,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->create_info.default_table_charset= (yyvsp[0].charset); Lex->create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET; } -#line 24421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 638: -#line 5793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5787 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { plugin_ref plugin= ha_resolve_by_name(thd, &(yyvsp[0].lex_str), thd->lex->create_info.tmp_table()); @@ -24439,11 +24433,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[0].lex_str).str); } } -#line 24443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 639: -#line 5814 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { plugin_ref plugin; if ((plugin= ha_resolve_by_name(thd, &(yyvsp[0].lex_str), false))) @@ -24451,199 +24445,199 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else my_yyabort_error((ER_UNKNOWN_STORAGE_ENGINE, MYF(0), (yyvsp[0].lex_str).str)); } -#line 24455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 640: -#line 5824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5818 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_DEFAULT; } -#line 24461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 641: -#line 5825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_FIXED; } -#line 24467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 642: -#line 5826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_DYNAMIC; } -#line 24473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 643: -#line 5827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5821 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_COMPRESSED; } -#line 24479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 644: -#line 5828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5822 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_REDUNDANT; } -#line 24485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 645: -#line 5829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5823 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_COMPACT; } -#line 24491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 646: -#line 5830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_PAGE; } -#line 24497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 647: -#line 5834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= MERGE_INSERT_DISABLED; } -#line 24503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 648: -#line 5835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= MERGE_INSERT_TO_FIRST; } -#line 24509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 649: -#line 5836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= MERGE_INSERT_TO_LAST; } -#line 24515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 650: -#line 5840 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.num) = (int) STRING_RESULT; } -#line 24521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 651: -#line 5841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.num) = (int) REAL_RESULT; } -#line 24527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 652: -#line 5842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.num) = (int) DECIMAL_RESULT; } -#line 24533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 653: -#line 5843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.num) = (int) INT_RESULT; } -#line 24539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 654: -#line 5849 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_last_non_select_table= Lex->last_table(); } -#line 24547 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 661: -#line 5871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_list= NULL; if (Lex->add_key(Key::MULTIPLE, (yyvsp[-1].lex_str), (yyvsp[0].key_alg), (yyvsp[-2].object_ddl_options))) MYSQL_YYABORT; } -#line 24557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 662: -#line 5876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 663: -#line 5878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_list= NULL; if (Lex->add_key(Key::MULTIPLE, (yyvsp[-2].lex_str), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))) MYSQL_YYABORT; } -#line 24573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24567 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 664: -#line 5883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 665: -#line 5885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_list= NULL; if (Lex->add_key((yyvsp[-3].key_type), (yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))) MYSQL_YYABORT; } -#line 24589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 666: -#line 5890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 667: -#line 5892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5886 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_list= NULL; if (Lex->add_key((yyvsp[-3].key_type), (yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))) MYSQL_YYABORT; } -#line 24605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 668: -#line 5897 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5891 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24611 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 669: -#line 5901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_list= NULL; if (Lex->add_key((yyvsp[-3].key_type), (yyvsp[-1].lex_str).str ? (yyvsp[-1].lex_str) : (yyvsp[-4].lex_str), (yyvsp[0].key_alg), (yyvsp[-2].object_ddl_options))) MYSQL_YYABORT; } -#line 24621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 670: -#line 5906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 671: -#line 5909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_list= NULL; if (Lex->add_key((yyvsp[-4].key_type), (yyvsp[-2].lex_str).str ? (yyvsp[-2].lex_str) : (yyvsp[-5].lex_str), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))) MYSQL_YYABORT; } -#line 24637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 672: -#line 5914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 673: -#line 5916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->check_add_key((yyvsp[-1].object_ddl_options)) || !(Lex->last_key= (new (thd->mem_root) @@ -24652,11 +24646,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Lex->option_list= NULL; } -#line 24656 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24650 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 674: -#line 5925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Key *key= (new (thd->mem_root) @@ -24682,35 +24676,35 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Only used for ALTER TABLE. Ignored otherwise. */ lex->alter_info.flags|= Alter_info::ADD_FOREIGN_KEY; } -#line 24686 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24680 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 675: -#line 5950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24692 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24686 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 679: -#line 5963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= null_lex_str; } -#line 24698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24692 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 680: -#line 5964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= (yyvsp[0].lex_str); } -#line 24704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 681: -#line 5968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 24710 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 682: -#line 5973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Create_field *f= new (thd->mem_root) Create_field(); @@ -24724,17 +24718,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->init_last_field(f, (yyvsp[0].lex_str).str, NULL); } -#line 24728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 683: -#line 5986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_last_field_type((yyvsp[0].field_type)); } -#line 24734 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 684: -#line 5988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Create_field *f= lex->last_field; @@ -24749,91 +24743,91 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else if (f->flags & (UNIQUE_FLAG | UNIQUE_KEY_FLAG)) add_key_to_list(lex, &(yyvsp[-4].lex_str), Key::UNIQUE, Lex->check_exists); } -#line 24753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 687: -#line 6012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 24759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 688: -#line 6013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 24765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 689: -#line 6018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE); } -#line 24773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 690: -#line 6022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE); } -#line 24781 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24775 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 691: -#line 6026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE); } -#line 24789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 692: -#line 6032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 24795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 693: -#line 6033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 24801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 694: -#line 6037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 24807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 696: -#line 6043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->last_field->flags|= UNIQUE_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 24817 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 697: -#line 6049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->last_field->flags|= UNIQUE_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 24827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 698: -#line 6054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->comment= (yyvsp[0].lex_str); } -#line 24833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 699: -#line 6059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6053 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* "PARSE_VCOL_EXPR" can only be used by the SQL server @@ -24843,11 +24837,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!Lex->parse_vcol_expr) my_yyabort_error((ER_SYNTAX_ERROR, MYF(0))); } -#line 24847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 700: -#line 6072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Virtual_column_info *v= new (thd->mem_root) Virtual_column_info(); if (!v) @@ -24861,23 +24855,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); v->expr_item= (yyvsp[-1].item); Lex->last_field->vcol_info= v; } -#line 24865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 701: -#line 6088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=(yyvsp[-2].field_type); } -#line 24871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 702: -#line 6089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=(yyvsp[-2].field_type); } -#line 24877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 703: -#line 6091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_FLOAT; if (Lex->length && !Lex->dec) @@ -24892,127 +24886,127 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->length= 0; } } -#line 24896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 704: -#line 6106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (char*) "1"; (yyval.field_type)=MYSQL_TYPE_BIT; } -#line 24905 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 705: -#line 6111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_BIT; } -#line 24913 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 706: -#line 6115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (char*) "1"; (yyval.field_type)=MYSQL_TYPE_TINY; } -#line 24922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 707: -#line 6120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (char*) "1"; (yyval.field_type)=MYSQL_TYPE_TINY; } -#line 24931 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24925 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 708: -#line 6125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_STRING; } -#line 24939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 709: -#line 6129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (char*) "1"; (yyval.field_type)=MYSQL_TYPE_STRING; } -#line 24948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 710: -#line 6134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_STRING; bincmp_collation(national_charset_info, (yyvsp[0].num)); } -#line 24957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 711: -#line 6139 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (char*) "1"; (yyval.field_type)=MYSQL_TYPE_STRING; bincmp_collation(national_charset_info, (yyvsp[0].num)); } -#line 24967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24961 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 712: -#line 6145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6139 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_STRING; } -#line 24976 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 713: -#line 6150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (char*) "1"; Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_STRING; } -#line 24986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 714: -#line 6156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)= MYSQL_TYPE_VARCHAR; } -#line 24994 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 715: -#line 6160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)= MYSQL_TYPE_VARCHAR; bincmp_collation(national_charset_info, (yyvsp[0].num)); } -#line 25003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24997 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 716: -#line 6165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)= MYSQL_TYPE_VARCHAR; } -#line 25012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25006 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 717: -#line 6170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->length) { @@ -25030,24 +25024,24 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } (yyval.field_type)=MYSQL_TYPE_YEAR; } -#line 25034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 718: -#line 6188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_DATE; } -#line 25040 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 719: -#line 6190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)= opt_mysql56_temporal_format ? MYSQL_TYPE_TIME2 : MYSQL_TYPE_TIME; } -#line 25047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 720: -#line 6193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (thd->variables.sql_mode & MODE_MAXDB) (yyval.field_type)= opt_mysql56_temporal_format ? @@ -25064,36 +25058,36 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); : MYSQL_TYPE_TIMESTAMP; } } -#line 25068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 721: -#line 6210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)= opt_mysql56_temporal_format ? MYSQL_TYPE_DATETIME2 : MYSQL_TYPE_DATETIME; } -#line 25075 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25069 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 722: -#line 6213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_TINY_BLOB; } -#line 25084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 723: -#line 6218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_BLOB; } -#line 25093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 724: -#line 6223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { #ifdef HAVE_SPATIAL Lex->charset=&my_charset_bin; @@ -25104,519 +25098,519 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); sym_group_geom.needed_define)); #endif } -#line 25108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 725: -#line 6234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_MEDIUM_BLOB; } -#line 25117 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 726: -#line 6239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_LONG_BLOB; } -#line 25126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 727: -#line 6244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_MEDIUM_BLOB; } -#line 25135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 728: -#line 6249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6243 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_MEDIUM_BLOB; } -#line 25141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 729: -#line 6251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_TINY_BLOB; } -#line 25147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 730: -#line 6253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_BLOB; } -#line 25153 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 731: -#line 6255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_MEDIUM_BLOB; } -#line 25159 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25153 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 732: -#line 6257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_LONG_BLOB; } -#line 25165 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25159 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 733: -#line 6259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_NEWDECIMAL;} -#line 25171 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25165 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 734: -#line 6261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_NEWDECIMAL;} -#line 25177 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25171 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 735: -#line 6263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_NEWDECIMAL;} -#line 25183 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25177 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 736: -#line 6265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_ENUM; } -#line 25189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25183 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 737: -#line 6267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_SET; } -#line 25195 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 738: -#line 6269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_MEDIUM_BLOB; } -#line 25201 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25195 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 739: -#line 6271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_LONGLONG; Lex->last_field->flags|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG | UNIQUE_FLAG); } -#line 25211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 740: -#line 6279 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_GEOMETRY; } -#line 25217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 741: -#line 6280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_GEOMETRYCOLLECTION; } -#line 25223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 742: -#line 6282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= const_cast(STRINGIFY_ARG (MAX_LEN_GEOM_POINT_FIELD)); (yyval.geom_type)= Field::GEOM_POINT; } -#line 25233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 743: -#line 6287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6281 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_MULTIPOINT; } -#line 25239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 744: -#line 6288 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_LINESTRING; } -#line 25245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 745: -#line 6289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6283 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_MULTILINESTRING; } -#line 25251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 746: -#line 6290 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6284 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_POLYGON; } -#line 25257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 747: -#line 6291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_MULTIPOLYGON; } -#line 25263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 748: -#line 6295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 749: -#line 6299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 750: -#line 6300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 751: -#line 6304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 752: -#line 6305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 753: -#line 6309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 754: -#line 6310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 755: -#line 6311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 756: -#line 6312 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6306 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25317 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 757: -#line 6313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25317 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 758: -#line 6317 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_LONG; } -#line 25329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 759: -#line 6318 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6312 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_TINY; } -#line 25335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 760: -#line 6319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_SHORT; } -#line 25341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 761: -#line 6320 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6314 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_INT24; } -#line 25347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 762: -#line 6321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_LONGLONG; } -#line 25353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 763: -#line 6326 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6320 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)= thd->variables.sql_mode & MODE_REAL_AS_FLOAT ? MYSQL_TYPE_FLOAT : MYSQL_TYPE_DOUBLE; } -#line 25362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 764: -#line 6331 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6325 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_DOUBLE; } -#line 25368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 765: -#line 6333 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_DOUBLE; } -#line 25374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 766: -#line 6338 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6332 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->srid= 0; } -#line 25380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 767: -#line 6341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6335 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->srid=atoi((yyvsp[0].lex_str).str); } -#line 25388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 768: -#line 6348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6342 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->dec=Lex->length= (char*)0; } -#line 25394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 769: -#line 6350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6344 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->dec= (char*)0; } -#line 25400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 770: -#line 6352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25406 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 771: -#line 6357 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->length=(yyvsp[-3].lex_str).str; lex->dec=(yyvsp[-1].lex_str).str; } -#line 25416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 772: -#line 6365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 773: -#line 6366 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6360 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 774: -#line 6370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 775: -#line 6371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 776: -#line 6375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 777: -#line 6376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->flags|= UNSIGNED_FLAG;} -#line 25452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 778: -#line 6377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->flags|= UNSIGNED_FLAG | ZEROFILL_FLAG; } -#line 25458 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 779: -#line 6381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (yyvsp[-1].lex_str).str; } -#line 25464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25458 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 780: -#line 6382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (yyvsp[-1].lex_str).str; } -#line 25470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 781: -#line 6383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (yyvsp[-1].lex_str).str; } -#line 25476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 782: -#line 6384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (yyvsp[-1].lex_str).str; } -#line 25482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 783: -#line 6387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length=(char*) 0; /* use default length */ } -#line 25488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 784: -#line 6388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 25494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 785: -#line 6392 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6386 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 786: -#line 6393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 787: -#line 6397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6391 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 788: -#line 6398 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6392 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 789: -#line 6402 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6396 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 791: -#line 6407 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->flags&= ~ NOT_NULL_FLAG; } -#line 25530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 792: -#line 6408 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6402 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->flags|= NOT_NULL_FLAG; } -#line 25536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 793: -#line 6409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->def= (yyvsp[0].item); } -#line 25542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 794: -#line 6411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num)); if (item == NULL) MYSQL_YYABORT; Lex->last_field->on_update= item; } -#line 25553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25547 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 795: -#line 6417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; } -#line 25559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 796: -#line 6419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 25569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 797: -#line 6425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->last_field->flags|= PRI_KEY_FLAG | NOT_NULL_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 25579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 798: -#line 6431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->last_field->flags|= UNIQUE_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 25589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 799: -#line 6437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->last_field->flags|= UNIQUE_KEY_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 25599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 800: -#line 6442 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6436 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->comment= (yyvsp[0].lex_str); } -#line 25605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 801: -#line 6444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->charset && !my_charset_same(Lex->charset,(yyvsp[0].charset))) my_yyabort_error((ER_COLLATION_CHARSET_MISMATCH, MYF(0), (yyvsp[0].charset)->name,Lex->charset->csname)); Lex->last_field->charset= (yyvsp[0].charset); } -#line 25616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25610 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 802: -#line 6451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6445 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH) my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].lex_str).str)); @@ -25624,11 +25618,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].lex_str), true, &Lex->last_field->option_list, &Lex->option_list_last); } -#line 25628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 803: -#line 6459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH) my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].lex_str).str)); @@ -25636,30 +25630,30 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].lex_str), false, &Lex->last_field->option_list, &Lex->option_list_last); } -#line 25640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 804: -#line 6467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6461 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { new (thd->mem_root) engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].ulonglong_number), &Lex->last_field->option_list, &Lex->option_list_last, thd->mem_root); } -#line 25650 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 805: -#line 6473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { new (thd->mem_root) engine_option_value((yyvsp[-2].lex_str), &Lex->last_field->option_list, &Lex->option_list_last); } -#line 25659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 806: -#line 6482 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)= (yyvsp[-1].field_type); @@ -25670,214 +25664,214 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } Lex->set_last_field_type((yyvsp[-1].field_type)); } -#line 25674 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25668 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 807: -#line 6497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 25684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 808: -#line 6503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=(yyvsp[0].item); } -#line 25690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 809: -#line 6507 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 810: -#line 6508 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6502 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 811: -#line 6513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6507 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str,MY_CS_PRIMARY,MYF(0)))) my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str)); } -#line 25711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 812: -#line 6517 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6511 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)= &my_charset_bin; } -#line 25717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 813: -#line 6521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=(yyvsp[0].charset); } -#line 25723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 814: -#line 6522 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6516 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=NULL; } -#line 25729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 815: -#line 6526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6520 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)= NULL; } -#line 25735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 816: -#line 6527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)= (yyvsp[0].charset); } -#line 25741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 817: -#line 6532 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str,MY_CS_PRIMARY,MYF(0))) && !((yyval.charset)=get_old_charset_by_name((yyvsp[0].lex_str).str))) my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str)); } -#line 25751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 818: -#line 6537 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6531 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)= &my_charset_bin; } -#line 25757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 819: -#line 6541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=(yyvsp[0].charset); } -#line 25763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 820: -#line 6542 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=NULL; } -#line 25769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 821: -#line 6547 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.charset)= mysqld_collation_get_by_name((yyvsp[0].lex_str).str))) MYSQL_YYABORT; } -#line 25778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 822: -#line 6554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=NULL; } -#line 25784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 823: -#line 6555 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=(yyvsp[0].charset); } -#line 25790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 824: -#line 6559 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6553 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=(yyvsp[0].charset); } -#line 25796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 825: -#line 6560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=NULL; } -#line 25802 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 826: -#line 6564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25808 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25802 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 827: -#line 6565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6559 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25814 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25808 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 828: -#line 6569 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6563 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)= (yyvsp[0].charset); } -#line 25820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25814 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 829: -#line 6570 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)= &my_charset_latin1; } -#line 25826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 830: -#line 6572 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.charset)= get_charset_by_csname("ucs2", MY_CS_PRIMARY,MYF(0)))) my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), "ucs2")); } -#line 25835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25829 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 831: -#line 6579 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6573 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { bincmp_collation(NULL, false); } -#line 25841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 832: -#line 6580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6574 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { bincmp_collation(&my_charset_bin, false); } -#line 25847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 833: -#line 6581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6575 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { bincmp_collation((yyvsp[-1].charset), (yyvsp[0].num)); } -#line 25853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 834: -#line 6582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6576 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { bincmp_collation(NULL, true); } -#line 25859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 835: -#line 6583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { bincmp_collation((yyvsp[0].charset), true); } -#line 25865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 836: -#line 6587 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= false; } -#line 25871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 837: -#line 6588 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= true; } -#line 25877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 838: -#line 6593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6587 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].ulong_num) == 0) { @@ -25885,148 +25879,148 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 25889 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25883 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 839: -#line 6601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6595 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[-2].ulong_num); } -#line 25895 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25889 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 840: -#line 6605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6599 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= 0; } -#line 25901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25895 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 841: -#line 6606 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= 1 << MY_STRXFRM_DESC_SHIFT; } -#line 25907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 842: -#line 6610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= 1 << MY_STRXFRM_REVERSE_SHIFT; } -#line 25913 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 843: -#line 6613 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6607 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= 0; } -#line 25919 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25913 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 844: -#line 6614 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6608 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num); } -#line 25925 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25919 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 845: -#line 6615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6609 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[-1].ulong_num) | (yyvsp[0].ulong_num); } -#line 25931 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25925 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 846: -#line 6616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num) ; } -#line 25937 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25931 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 847: -#line 6621 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num) < 1 ? 1 : ((yyvsp[0].ulong_num) > MY_STRXFRM_NLEVELS ? MY_STRXFRM_NLEVELS : (yyvsp[0].ulong_num)); (yyval.ulong_num)--; } -#line 25946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 848: -#line 6629 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6623 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (1 | (yyvsp[0].ulong_num)) << (yyvsp[-1].ulong_num); } -#line 25954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 849: -#line 6635 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6629 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num); } -#line 25960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 850: -#line 6636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)|= (yyvsp[0].ulong_num); } -#line 25966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 851: -#line 6641 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6635 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { uint start= (yyvsp[-2].ulong_num); uint end= (yyvsp[0].ulong_num); for ((yyval.ulong_num)= 0; start <= end; start++) (yyval.ulong_num)|= (1 << start); } -#line 25977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 852: -#line 6650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6644 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num); } -#line 25983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 853: -#line 6651 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6645 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num); } -#line 25989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 854: -#line 6655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6649 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= 0; } -#line 25995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 855: -#line 6656 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num); } -#line 26001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 858: -#line 6670 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6664 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)=(yyvsp[-3].table); } -#line 26009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 859: -#line 6677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ref_list.empty(); } -#line 26015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 861: -#line 6683 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Key_part_spec *key= new (thd->mem_root) Key_part_spec((yyvsp[0].lex_str), 0); if (key == NULL) MYSQL_YYABORT; Lex->ref_list.push_back(key, thd->mem_root); } -#line 26026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26020 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 862: -#line 6690 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Key_part_spec *key= new (thd->mem_root) Key_part_spec((yyvsp[0].lex_str), 0); if (key == NULL) @@ -26035,181 +26029,181 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->ref_list.empty(); lex->ref_list.push_back(key, thd->mem_root); } -#line 26039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 863: -#line 6702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->fk_match_option= Foreign_key::FK_MATCH_UNDEF; } -#line 26045 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 864: -#line 6704 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6698 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->fk_match_option= Foreign_key::FK_MATCH_FULL; } -#line 26051 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26045 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 865: -#line 6706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6700 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->fk_match_option= Foreign_key::FK_MATCH_PARTIAL; } -#line 26057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26051 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 866: -#line 6708 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->fk_match_option= Foreign_key::FK_MATCH_SIMPLE; } -#line 26063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 867: -#line 6713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->fk_update_opt= Foreign_key::FK_OPTION_UNDEF; lex->fk_delete_opt= Foreign_key::FK_OPTION_UNDEF; } -#line 26073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 868: -#line 6719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->fk_update_opt= (yyvsp[0].m_fk_option); lex->fk_delete_opt= Foreign_key::FK_OPTION_UNDEF; } -#line 26083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 869: -#line 6725 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->fk_update_opt= Foreign_key::FK_OPTION_UNDEF; lex->fk_delete_opt= (yyvsp[0].m_fk_option); } -#line 26093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 870: -#line 6732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->fk_update_opt= (yyvsp[-3].m_fk_option); lex->fk_delete_opt= (yyvsp[0].m_fk_option); } -#line 26103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26097 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 871: -#line 6739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6733 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->fk_update_opt= (yyvsp[0].m_fk_option); lex->fk_delete_opt= (yyvsp[-3].m_fk_option); } -#line 26113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 872: -#line 6747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_fk_option)= Foreign_key::FK_OPTION_RESTRICT; } -#line 26119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 873: -#line 6748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6742 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_fk_option)= Foreign_key::FK_OPTION_CASCADE; } -#line 26125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 874: -#line 6749 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6743 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_fk_option)= Foreign_key::FK_OPTION_SET_NULL; } -#line 26131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 875: -#line 6750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_fk_option)= Foreign_key::FK_OPTION_NO_ACTION; } -#line 26137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 876: -#line 6751 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_fk_option)= Foreign_key::FK_OPTION_DEFAULT; } -#line 26143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 877: -#line 6755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6749 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_type)= Key::PRIMARY; } -#line 26149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 878: -#line 6756 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_type)= Key::UNIQUE; } -#line 26155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 879: -#line 6760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 880: -#line 6761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 881: -#line 6765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 883: -#line 6770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 884: -#line 6771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 885: -#line 6772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 886: -#line 6776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_type)= Key::MULTIPLE; } -#line 26197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 887: -#line 6777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_type)= Key::UNIQUE; } -#line 26203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 888: -#line 6781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6775 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_type)= Key::FULLTEXT;} -#line 26209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 889: -#line 6786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6780 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { #ifdef HAVE_SPATIAL (yyval.key_type)= Key::SPATIAL; @@ -26218,101 +26212,101 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); sym_group_geom.needed_define)); #endif } -#line 26222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 890: -#line 6797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6791 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 891: -#line 6798 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->option_list= Lex->option_list; } -#line 26234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 892: -#line 6802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 893: -#line 6803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->option_list= Lex->option_list; } -#line 26246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 894: -#line 6807 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 895: -#line 6808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->option_list= Lex->option_list; } -#line 26258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 902: -#line 6827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6821 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= HA_KEY_ALG_UNDEF; } -#line 26264 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 903: -#line 6828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6822 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= (yyvsp[0].key_alg); } -#line 26270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26264 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 904: -#line 6832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= HA_KEY_ALG_UNDEF; } -#line 26276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 905: -#line 6833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= (yyvsp[0].key_alg); } -#line 26282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 906: -#line 6834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= (yyvsp[0].key_alg); } -#line 26288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 907: -#line 6838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); } -#line 26294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 908: -#line 6840 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); } -#line 26300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 909: -#line 6845 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->key_create_info.block_size= (yyvsp[0].ulong_num); } -#line 26306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 910: -#line 6847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->key_create_info.comment= (yyvsp[0].lex_str); } -#line 26312 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 911: -#line 6849 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH) my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].lex_str).str)); @@ -26320,11 +26314,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].lex_str), true, &Lex->option_list, &Lex->option_list_last); } -#line 26324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26318 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 912: -#line 6857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6851 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH) my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].lex_str).str)); @@ -26332,85 +26326,85 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].lex_str), false, &Lex->option_list, &Lex->option_list_last); } -#line 26336 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26330 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 913: -#line 6865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6859 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { new (thd->mem_root) engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].ulonglong_number), &Lex->option_list, &Lex->option_list_last, thd->mem_root); } -#line 26346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 914: -#line 6871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { new (thd->mem_root) engine_option_value((yyvsp[-2].lex_str), &Lex->option_list, &Lex->option_list_last); } -#line 26355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 919: -#line 6889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (plugin_is_ready(&(yyvsp[0].lex_str), MYSQL_FTPARSER_PLUGIN)) Lex->last_key->key_create_info.parser_name= (yyvsp[0].lex_str); else my_yyabort_error((ER_FUNCTION_NOT_DEFINED, MYF(0), (yyvsp[0].lex_str).str)); } -#line 26366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 920: -#line 6898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= HA_KEY_ALG_BTREE; } -#line 26372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 921: -#line 6899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6893 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= HA_KEY_ALG_RTREE; } -#line 26378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 922: -#line 6900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= HA_KEY_ALG_HASH; } -#line 26384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 923: -#line 6905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root); } -#line 26392 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 924: -#line 6909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root); } -#line 26400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 925: -#line 6916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_part)= new (thd->mem_root) Key_part_spec((yyvsp[0].lex_str), 0); if ((yyval.key_part) == NULL) MYSQL_YYABORT; } -#line 26410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 926: -#line 6922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int key_part_len= atoi((yyvsp[-1].lex_str).str); if (!key_part_len) @@ -26419,47 +26413,47 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.key_part) == NULL) MYSQL_YYABORT; } -#line 26423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 927: -#line 6933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= null_lex_str; } -#line 26429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 928: -#line 6934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= (yyvsp[0].lex_str); } -#line 26435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 929: -#line 6938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= null_lex_str; } -#line 26441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 930: -#line 6939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= (yyvsp[0].lex_str); } -#line 26447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 931: -#line 6944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); } -#line 26453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 932: -#line 6946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); } -#line 26459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 933: -#line 6954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->name= null_lex_str; Lex->only_view= FALSE; @@ -26473,11 +26467,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->create_info.storage_media= HA_SM_DEFAULT; DBUG_ASSERT(!Lex->m_sql_cmd); } -#line 26477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 934: -#line 6968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Lex->select_lex.add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_UPDATING, @@ -26487,11 +26481,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->select_lex.db= (Lex->select_lex.table_list.first)->db; Lex->create_last_non_select_table= Lex->last_table(); } -#line 26491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 935: -#line 6978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Lex->m_sql_cmd) { @@ -26501,20 +26495,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 26505 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 936: -#line 6988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.default_table_charset= NULL; Lex->create_info.used_fields= 0; } -#line 26514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 937: -#line 6993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command=SQLCOM_ALTER_DB; @@ -26523,11 +26517,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->copy_db_to(&lex->name.str, &lex->name.length)) MYSQL_YYABORT; } -#line 26527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 938: -#line 7002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->sphead) @@ -26535,11 +26529,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_ALTER_DB_UPGRADE; lex->name= (yyvsp[-4].lex_str); } -#line 26539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 939: -#line 7010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -26547,22 +26541,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PROCEDURE")); bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics)); } -#line 26551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 940: -#line 7018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_ALTER_PROCEDURE; lex->spname= (yyvsp[-2].spname); } -#line 26562 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26556 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 941: -#line 7025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -26570,22 +26564,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "FUNCTION")); bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics)); } -#line 26574 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 942: -#line 7033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_ALTER_FUNCTION; lex->spname= (yyvsp[-2].spname); } -#line 26585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 943: -#line 7040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -26593,17 +26587,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "ALTER VIEW")); lex->create_view_mode= VIEW_ALTER; } -#line 26597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 944: -#line 7048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 945: -#line 7055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -26612,17 +26606,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->create_view_algorithm= VIEW_ALGORITHM_INHERIT; lex->create_view_mode= VIEW_ALTER; } -#line 26616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26610 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 946: -#line 7064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 947: -#line 7066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* It is safe to use Lex->spname because @@ -26639,11 +26633,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->sql_command= SQLCOM_ALTER_EVENT; Lex->stmt_definition_begin= (yyvsp[-2].simple_string); } -#line 26643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 948: -#line 7087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyvsp[-4].num) || (yyvsp[-3].num) || (yyvsp[-2].num) || (yyvsp[-1].num) || (yyvsp[0].num))) { @@ -26657,93 +26651,93 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->sql_command= SQLCOM_ALTER_EVENT; Lex->stmt_definition_end= (char*)YYLIP->get_cpp_ptr(); } -#line 26661 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26655 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 949: -#line 7101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= ALTER_TABLESPACE; } -#line 26670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 950: -#line 7106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= ALTER_LOGFILE_GROUP; } -#line 26679 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26673 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 951: -#line 7111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= CHANGE_FILE_TABLESPACE; } -#line 26688 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 952: -#line 7116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= ALTER_ACCESS_MODE_TABLESPACE; } -#line 26697 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 953: -#line 7121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_ALTER_SERVER; lex->server_options.reset((yyvsp[0].lex_str)); } -#line 26707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 954: -#line 7125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 26713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 955: -#line 7129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0;} -#line 26719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 956: -#line 7130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 26725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 957: -#line 7131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 26731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 958: -#line 7132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 26737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 959: -#line 7136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0;} -#line 26743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 960: -#line 7138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Use lex's spname to hold the new name. @@ -26752,35 +26746,35 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->spname= (yyvsp[0].spname); (yyval.num)= 1; } -#line 26756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26750 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 961: -#line 7149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0;} -#line 26762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 962: -#line 7150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 26768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 963: -#line 7154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= null_lex_str; } -#line 26774 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 964: -#line 7155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= (yyvsp[0].lex_str); } -#line 26780 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26774 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 966: -#line 7161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_discard_import_tablespace( @@ -26788,11 +26782,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (Lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26792 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26786 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 967: -#line 7169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_discard_import_tablespace( @@ -26800,31 +26794,31 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (Lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26798 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 973: -#line 7191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_DROP_PARTITION; DBUG_ASSERT(!Lex->if_exists()); Lex->create_info.add((yyvsp[-1].object_ddl_options)); } -#line 26814 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26808 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 974: -#line 7198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_info.flags|= Alter_info::ALTER_REBUILD_PARTITION; lex->no_write_to_binlog= (yyvsp[-1].num); } -#line 26824 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 975: -#line 7205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; lex->no_write_to_binlog= (yyvsp[-1].num); @@ -26835,11 +26829,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 977: -#line 7218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; lex->no_write_to_binlog= (yyvsp[-1].num); @@ -26850,11 +26844,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 978: -#line 7229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; lex->check_opt.init(); @@ -26864,11 +26858,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26868 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 980: -#line 7241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; lex->no_write_to_binlog= (yyvsp[-1].num); @@ -26879,22 +26873,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26883 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 982: -#line 7253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_info.flags|= Alter_info::ALTER_COALESCE_PARTITION; lex->no_write_to_binlog= (yyvsp[-1].num); lex->alter_info.num_parts= (yyvsp[0].ulong_num); } -#line 26894 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 983: -#line 7260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; lex->check_opt.init(); @@ -26904,11 +26898,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 985: -#line 7272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; size_t dummy; @@ -26931,27 +26925,27 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 986: -#line 7298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_REMOVE_PARTITIONING; } -#line 26943 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26937 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 987: -#line 7305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_ALL_PARTITION; } -#line 26951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 989: -#line 7314 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7308 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->part_info= new (thd->mem_root) partition_info(); @@ -26965,34 +26959,34 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->create_info.set((yyvsp[-1].object_ddl_options)); lex->no_write_to_binlog= (yyvsp[0].num); } -#line 26969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 990: -#line 7328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7322 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 992: -#line 7334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->part_info->num_parts= lex->part_info->partitions.elements; } -#line 26984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 993: -#line 7339 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7333 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->num_parts= (yyvsp[0].ulong_num); } -#line 26992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 994: -#line 7346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->part_info= new (thd->mem_root) partition_info(); @@ -27003,48 +26997,48 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } lex->no_write_to_binlog= (yyvsp[0].num); } -#line 27007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 996: -#line 7361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_TABLE_REORG; } -#line 27015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 997: -#line 7365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_REORGANIZE_PARTITION; } -#line 27023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 998: -#line 7369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7363 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->num_parts= part_info->partitions.elements; } -#line 27032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 999: -#line 7376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1000: -#line 7377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1001: -#line 7382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->alter_info.partition_names.push_back((yyvsp[0].lex_str).str, thd->mem_root)) @@ -27053,66 +27047,66 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 27057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27051 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1004: -#line 7403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->alter_info.flags|= Alter_info::ALTER_ADD_COLUMN; } -#line 27066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27060 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1005: -#line 7411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_last_non_select_table= Lex->last_table(); } -#line 27074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1006: -#line 7415 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_last_non_select_table= Lex->last_table(); Lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 27083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1007: -#line 7420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7414 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_ADD_COLUMN | Alter_info::ALTER_ADD_INDEX; } -#line 27092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27086 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1008: -#line 7426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN; Lex->create_last_non_select_table= Lex->last_table(); Lex->last_field->change= (yyvsp[-2].lex_str).str; } -#line 27102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1009: -#line 7433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN; Lex->create_last_non_select_table= Lex->last_table(); Lex->last_field->change= Lex->last_field->field_name; } -#line 27112 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27106 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1010: -#line 7439 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_drop *ad= (new (thd->mem_root) @@ -27122,11 +27116,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.drop_list.push_back(ad, thd->mem_root); lex->alter_info.flags|= Alter_info::ALTER_DROP_COLUMN; } -#line 27126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1011: -#line 7449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_drop *ad= (new (thd->mem_root) @@ -27136,11 +27130,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.drop_list.push_back(ad, thd->mem_root); lex->alter_info.flags|= Alter_info::DROP_FOREIGN_KEY; } -#line 27140 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27134 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1012: -#line 7459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_drop *ad= (new (thd->mem_root) @@ -27151,11 +27145,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.drop_list.push_back(ad, thd->mem_root); lex->alter_info.flags|= Alter_info::ALTER_DROP_INDEX; } -#line 27155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1013: -#line 7470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_drop *ad= (new (thd->mem_root) @@ -27165,31 +27159,31 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.drop_list.push_back(ad, thd->mem_root); lex->alter_info.flags|= Alter_info::ALTER_DROP_INDEX; } -#line 27169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1014: -#line 7480 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->alter_info.keys_onoff= Alter_info::DISABLE; lex->alter_info.flags|= Alter_info::ALTER_KEYS_ONOFF; } -#line 27179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1015: -#line 7486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7480 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->alter_info.keys_onoff= Alter_info::ENABLE; lex->alter_info.flags|= Alter_info::ALTER_KEYS_ONOFF; } -#line 27189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27183 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1016: -#line 7492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_column *ac= new (thd->mem_root) Alter_column((yyvsp[-3].lex_str).str,(yyvsp[0].item)); @@ -27198,11 +27192,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.alter_list.push_back(ac, thd->mem_root); lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN_DEFAULT; } -#line 27202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27196 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1017: -#line 7501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7495 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_column *ac= (new (thd->mem_root) @@ -27212,11 +27206,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.alter_list.push_back(ac, thd->mem_root); lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN_DEFAULT; } -#line 27216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1018: -#line 7511 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7505 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; size_t dummy; @@ -27232,11 +27226,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->name= (yyvsp[0].table)->table; lex->alter_info.flags|= Alter_info::ALTER_RENAME; } -#line 27236 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27230 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1019: -#line 7527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!(yyvsp[-1].charset)) { @@ -27250,11 +27244,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Lex->alter_info.flags|= Alter_info::ALTER_OPTIONS; } -#line 27254 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1020: -#line 7541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->alter_info.flags|= Alter_info::ALTER_OPTIONS; @@ -27264,230 +27258,230 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->create_info.used_fields&= ~HA_CREATE_USED_ENGINE; } } -#line 27268 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27262 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1021: -#line 7551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7545 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_RECREATE; } -#line 27276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1022: -#line 7555 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->alter_info.flags|= Alter_info::ALTER_ORDER; } -#line 27285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1030: -#line 7572 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.requested_algorithm= Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT; } -#line 27294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1031: -#line 7577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->alter_info.set_requested_algorithm(&(yyvsp[0].lex_str))) my_yyabort_error((ER_UNKNOWN_ALTER_ALGORITHM, MYF(0), (yyvsp[0].lex_str).str)); } -#line 27303 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27297 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1032: -#line 7585 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7579 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.requested_lock= Alter_info::ALTER_TABLE_LOCK_DEFAULT; } -#line 27312 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1033: -#line 7590 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7584 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->alter_info.set_requested_lock(&(yyvsp[0].lex_str))) my_yyabort_error((ER_UNKNOWN_ALTER_LOCK, MYF(0), (yyvsp[0].lex_str).str)); } -#line 27321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1034: -#line 7597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1035: -#line 7598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1036: -#line 7602 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7596 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ignore= 0;} -#line 27339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1037: -#line 7603 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ignore= 1;} -#line 27345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1038: -#line 7607 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ignore= 0;} -#line 27351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1044: -#line 7621 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ignore= 1;} -#line 27357 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1045: -#line 7623 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7617 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.requested_lock= Alter_info::ALTER_TABLE_LOCK_NONE; } -#line 27366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1046: -#line 7630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->drop_mode= DROP_DEFAULT; } -#line 27372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1047: -#line 7631 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7625 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->drop_mode= DROP_RESTRICT; } -#line 27378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1048: -#line 7632 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7626 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->drop_mode= DROP_CASCADE; } -#line 27384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1049: -#line 7636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1050: -#line 7638 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7632 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { store_position_for_column((yyvsp[0].lex_str).str); Lex->alter_info.flags |= Alter_info::ALTER_COLUMN_ORDER; } -#line 27399 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27393 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1051: -#line 7643 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7637 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { store_position_for_column(first_keyword); Lex->alter_info.flags |= Alter_info::ALTER_COLUMN_ORDER; } -#line 27408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1052: -#line 7650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7644 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1053: -#line 7651 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7645 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1054: -#line 7652 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7646 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27426 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1055: -#line 7653 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7647 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27432 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27426 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1056: -#line 7658 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7652 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_SLAVE_START; lex->type = 0; /* If you change this code don't forget to update SLAVE START too */ } -#line 27443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1057: -#line 7665 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7659 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1058: -#line 7667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_SLAVE_ALL_START; lex->type = 0; } -#line 27459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1059: -#line 7672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1060: -#line 7674 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_SLAVE_STOP; lex->type = 0; /* If you change this code don't forget to update SLAVE STOP too */ } -#line 27476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1061: -#line 7681 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7675 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_SLAVE_ALL_STOP; lex->type = 0; /* If you change this code don't forget to update SLAVE STOP too */ } -#line 27487 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27481 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1062: -#line 7691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_BEGIN; @@ -27500,103 +27494,103 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } lex->start_transaction_opt= (yyvsp[0].num); } -#line 27504 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27498 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1063: -#line 7707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7701 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 27512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1064: -#line 7711 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[0].num); } -#line 27520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1065: -#line 7718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[0].num); } -#line 27528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27522 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1066: -#line 7722 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7716 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[-2].num) | (yyvsp[0].num); } -#line 27536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1067: -#line 7729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7723 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT; } -#line 27544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1068: -#line 7733 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7727 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= MYSQL_START_TRANS_OPT_READ_ONLY; } -#line 27552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27546 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1069: -#line 7737 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= MYSQL_START_TRANS_OPT_READ_WRITE; } -#line 27560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1070: -#line 7743 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7737 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->slave_thd_opt= 0; } -#line 27566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1071: -#line 7745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1074: -#line 7754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1075: -#line 7755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7749 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->slave_thd_opt|=SLAVE_SQL; } -#line 27584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1076: -#line 7756 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->slave_thd_opt|=SLAVE_IO; } -#line 27590 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1077: -#line 7760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27596 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27590 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1078: -#line 7762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7756 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (((lex->mi.log_file_name || lex->mi.pos) && @@ -27605,60 +27599,60 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (lex->mi.relay_log_name && lex->mi.relay_log_pos))) my_yyabort_error((ER_BAD_SLAVE_UNTIL_COND, MYF(0))); } -#line 27609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1079: -#line 7771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->mi.gtid_pos_str = (yyvsp[0].lex_str); } -#line 27617 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27611 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1082: -#line 7783 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_CHECKSUM; /* Will be overriden during execution. */ YYPS->m_lock_type= TL_UNLOCK; } -#line 27628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1083: -#line 7790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1084: -#line 7794 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7788 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags= 0; } -#line 27640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1085: -#line 7795 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7789 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags= T_QUICK; } -#line 27646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1086: -#line 7796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags= T_EXTEND; } -#line 27652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1088: -#line 7801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7795 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->only_view= TRUE; } -#line 27658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1090: -#line 7806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7800 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_REPAIR; @@ -27668,11 +27662,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Will be overriden during execution. */ YYPS->m_lock_type= TL_UNLOCK; } -#line 27672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1091: -#line 7816 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7810 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); @@ -27680,65 +27674,65 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 27684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1092: -#line 7826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags = T_MEDIUM; } -#line 27690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1093: -#line 7827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7821 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1094: -#line 7831 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1095: -#line 7832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1096: -#line 7836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_QUICK; } -#line 27714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1097: -#line 7837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7831 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_EXTEND; } -#line 27720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1098: -#line 7838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.sql_flags|= TT_USEFRM; } -#line 27726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1099: -#line 7842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 27732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1100: -#line 7843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.sql_flags|= TT_FROM_MYSQL; } -#line 27738 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1101: -#line 7848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_ANALYZE; @@ -27748,11 +27742,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Will be overriden during execution. */ YYPS->m_lock_type= TL_UNLOCK; } -#line 27752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1102: -#line 7858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); @@ -27760,137 +27754,137 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 27764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27758 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1106: -#line 7878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27770 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1107: -#line 7880 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7874 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { thd->lex->with_persistent_for_clause= TRUE; } -#line 27778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1108: -#line 7887 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7881 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1109: -#line 7889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1110: -#line 7892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7886 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1111: -#line 7894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7888 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; lex->column_list= new (thd->mem_root) List; if (lex->column_list == NULL) MYSQL_YYABORT; } -#line 27807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1113: -#line 7905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1114: -#line 7907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; lex->index_list= new (thd->mem_root) List; if (lex->index_list == NULL) MYSQL_YYABORT; } -#line 27824 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1116: -#line 7919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27830 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27824 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1117: -#line 7921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->column_list->push_back((LEX_STRING*) thd->memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)), thd->mem_root); } -#line 27839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1118: -#line 7926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->column_list->push_back((LEX_STRING*) thd->memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)), thd->mem_root); } -#line 27848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27842 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1119: -#line 7934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1122: -#line 7941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->index_list->push_back((LEX_STRING*) thd->memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)), thd->mem_root); } -#line 27864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1123: -#line 7948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX_STRING str= {(char*) "PRIMARY", 7}; Lex->index_list->push_back((LEX_STRING*) thd->memdup(&str, sizeof(LEX_STRING)), thd->mem_root); } -#line 27875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1124: -#line 7958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT; Lex->comment= (yyvsp[0].lex_str); } -#line 27884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27878 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1126: -#line 7966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->only_view= TRUE; } -#line 27890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1128: -#line 7970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; @@ -27900,11 +27894,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Will be overriden during execution. */ YYPS->m_lock_type= TL_UNLOCK; } -#line 27904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1129: -#line 7980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; if (lex->sphead) @@ -27914,83 +27908,83 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 27918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1130: -#line 7992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags = T_MEDIUM; } -#line 27924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1131: -#line 7993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1132: -#line 7997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27936 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1133: -#line 7998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27936 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1134: -#line 8002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_QUICK; } -#line 27948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1135: -#line 8003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_FAST; } -#line 27954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1136: -#line 8004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_MEDIUM; } -#line 27960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1137: -#line 8005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_EXTEND; } -#line 27966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1138: -#line 8006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; } -#line 27972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1139: -#line 8007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; } -#line 27978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1140: -#line 8011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 27984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1141: -#line 8012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; } -#line 27990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1142: -#line 8017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_OPTIMIZE; @@ -28000,11 +27994,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Will be overriden during execution. */ YYPS->m_lock_type= TL_UNLOCK; } -#line 28004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1143: -#line 8027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8021 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); @@ -28012,71 +28006,71 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 28016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1144: -#line 8037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 28022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1145: -#line 8038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 28028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1146: -#line 8039 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 28034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1147: -#line 8044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_RENAME_TABLE; } -#line 28042 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1148: -#line 8048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 28048 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28042 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1149: -#line 8050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_RENAME_USER; } -#line 28056 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28050 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1150: -#line 8057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[-2].lex_user), thd->mem_root) || Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 28066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28060 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1151: -#line 8063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[-2].lex_user), thd->mem_root) || Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 28076 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28070 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1154: -#line 8077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; SELECT_LEX *sl= lex->current_select; @@ -28086,146 +28080,146 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); TL_IGNORE, MDL_EXCLUSIVE)) MYSQL_YYABORT; } -#line 28090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1155: -#line 8090 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.reset(); } -#line 28098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1156: -#line 8094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_ASSIGN_TO_KEYCACHE; lex->ident= (yyvsp[0].lex_str); } -#line 28108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1161: -#line 8113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, 0, TL_READ, MDL_SHARED_READ, Select->pop_index_hints())) MYSQL_YYABORT; } -#line 28119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1162: -#line 8123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, 0, TL_READ, MDL_SHARED_READ, Select->pop_index_hints())) MYSQL_YYABORT; } -#line 28130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1163: -#line 8132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= (yyvsp[0].lex_str); } -#line 28136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1164: -#line 8133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str) = default_key_cache_base; } -#line 28142 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1165: -#line 8138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command=SQLCOM_PRELOAD_KEYS; lex->alter_info.reset(); } -#line 28152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28146 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1166: -#line 8144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 28158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1171: -#line 8159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, (yyvsp[0].num), TL_READ, MDL_SHARED_READ, Select->pop_index_hints())) MYSQL_YYABORT; } -#line 28169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1172: -#line 8169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[-3].table), NULL, (yyvsp[0].num), TL_READ, MDL_SHARED_READ, Select->pop_index_hints())) MYSQL_YYABORT; } -#line 28180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1173: -#line 8179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION; } -#line 28188 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28182 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1175: -#line 8186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->select_lex.alloc_index_hints(thd); Select->set_index_hint_type(INDEX_HINT_USE, INDEX_HINT_MASK_ALL); } -#line 28198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1177: -#line 8195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 28204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1179: -#line 8201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 28210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1180: -#line 8202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= TL_OPTION_IGNORE_LEAVES; } -#line 28216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1181: -#line 8212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SELECT; } -#line 28225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1184: -#line 8225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* In order to correctly parse UNION's global ORDER BY we need to @@ -28233,47 +28227,47 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ Lex->current_select->set_braces(true); } -#line 28237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1185: -#line 8233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (setup_select_in_parentheses(Lex)) MYSQL_YYABORT; } -#line 28246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1187: -#line 8242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->current_select->set_braces(true); } -#line 28254 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1188: -#line 8247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (setup_select_in_parentheses(Lex)) MYSQL_YYABORT; } -#line 28263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1190: -#line 8256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; /* Parentheses carry no meaning here */ lex->current_select->set_braces(false); } -#line 28273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1194: -#line 8286 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[-9].num) && (yyvsp[-1].num)) /* double "INTO" clause */ my_yyabort_error((ER_WRONG_USAGE, MYF(0), "INTO", "INTO")); @@ -28281,11 +28275,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyvsp[-2].num) && ((yyvsp[-9].num) || (yyvsp[-1].num))) /* "INTO" with "PROCEDURE ANALYSE" */ my_yyabort_error((ER_WRONG_USAGE, MYF(0), "PROCEDURE", "INTO")); } -#line 28285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1195: -#line 8296 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8290 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; SELECT_LEX *sel= lex->current_select; @@ -28293,38 +28287,38 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); mysql_init_select(lex); lex->current_select->parsing_place= SELECT_LIST; } -#line 28297 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28291 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1196: -#line 8304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= NO_MATTER; } -#line 28305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1201: -#line 8331 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8325 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->context.table_list= Select->context.first_name_resolution_table= Select->table_list.first; } -#line 28315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1204: -#line 8346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Select->options & SELECT_DISTINCT && Select->options & SELECT_ALL) my_yyabort_error((ER_WRONG_USAGE, MYF(0), "ALL", "DISTINCT")); } -#line 28324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28318 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1208: -#line 8360 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Allow this flag only on the first top-level SELECT statement, if @@ -28341,11 +28335,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->select_lex.options&= ~OPTION_TO_QUERY_CACHE; Lex->select_lex.sql_cache= SELECT_LEX::SQL_NO_CACHE; } -#line 28345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1209: -#line 8377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Allow this flag only on the first top-level SELECT statement, if @@ -28362,22 +28356,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->select_lex.options|= OPTION_TO_QUERY_CACHE; Lex->select_lex.sql_cache= SELECT_LEX::SQL_CACHE; } -#line 28366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1211: -#line 8398 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8392 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->current_select->lock_type= TL_WRITE; lex->current_select->set_lock_for_tables(TL_WRITE); lex->safe_to_cache_query=0; } -#line 28377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28371 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1212: -#line 8405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->current_select->lock_type= TL_READ_WITH_SHARED_LOCKS; @@ -28385,11 +28379,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS); lex->safe_to_cache_query=0; } -#line 28389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1215: -#line 8418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_field(thd, &thd->lex->current_select->context, @@ -28400,20 +28394,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; (thd->lex->current_select->with_wild)++; } -#line 28404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28398 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1216: -#line 8432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_item_to_list(thd, (yyvsp[-1].item))) MYSQL_YYABORT; } -#line 28413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1217: -#line 8437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT((yyvsp[-3].simple_string) < (yyvsp[-1].simple_string)); @@ -28432,113 +28426,113 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[-2].item)->set_name((yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset()); } } -#line 28436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1218: -#line 8458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.simple_string)= (char*) YYLIP->get_tok_start(); } -#line 28444 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28438 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1219: -#line 8464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_start(); } -#line 28452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1220: -#line 8470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end(); } -#line 28460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1221: -#line 8476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=null_lex_str;} -#line 28466 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1222: -#line 8477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 28472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28466 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1223: -#line 8478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 28478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1224: -#line 8479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 28484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1225: -#line 8480 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 28490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1226: -#line 8484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= NOT_FIXED_DEC; } -#line 28496 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1227: -#line 8485 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= NOT_FIXED_DEC; } -#line 28502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28496 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1228: -#line 8486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8480 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[-1].ulong_num); } -#line 28508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1229: -#line 8490 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 28514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1230: -#line 8491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8485 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 28520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1231: -#line 8492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[-1].ulong_num); } -#line 28526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1232: -#line 8496 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8490 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 28532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1233: -#line 8497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 28538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1234: -#line 8503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Design notes: @@ -28589,22 +28583,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 28593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1235: -#line 8554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* XOR is a proprietary extension */ (yyval.item)= new (thd->mem_root) Item_func_xor(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28604 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28598 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1236: -#line 8561 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8555 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* See comments in rule expr: expr or expr */ Item_cond_and *item1; @@ -28647,141 +28641,141 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 28651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1237: -#line 8604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= negate_expression(thd, (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28661 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28655 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1238: -#line 8610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_istrue(thd, (yyvsp[-2].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1239: -#line 8616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isnottrue(thd, (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1240: -#line 8622 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isfalse(thd, (yyvsp[-2].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28685 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1241: -#line 8628 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8622 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isnotfalse(thd, (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1242: -#line 8634 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8628 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1243: -#line 8640 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8634 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28721 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28715 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1245: -#line 8650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8644 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1246: -#line 8656 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1247: -#line 8662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8656 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_equal(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1248: -#line 8668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (*(yyvsp[-1].boolfunc2creator))(0)->create(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28755 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1249: -#line 8674 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= all_any_subquery_creator(thd, (yyvsp[-5].item), (yyvsp[-4].boolfunc2creator), (yyvsp[-3].num), (yyvsp[-1].select_lex)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1251: -#line 8684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8678 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_in_subselect(thd, (yyvsp[-4].item), (yyvsp[-1].select_lex)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28781 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28775 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1252: -#line 8690 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_in_subselect(thd, (yyvsp[-5].item), (yyvsp[-1].select_lex)); if (item == NULL) @@ -28790,21 +28784,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1253: -#line 8699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8693 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[-4].item), true, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28798 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1254: -#line 8705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root); (yyvsp[-1].item_list)->push_front((yyvsp[-6].item), thd->mem_root); @@ -28812,21 +28806,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28816 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28810 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1255: -#line 8713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[-5].item), false, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1256: -#line 8719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root); (yyvsp[-1].item_list)->push_front((yyvsp[-7].item), thd->mem_root); @@ -28836,21 +28830,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); item->negate(); (yyval.item)= item; } -#line 28840 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28834 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1257: -#line 8729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8723 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_between(thd, (yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28850 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28844 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1258: -#line 8735 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_func_between *item; item= new (thd->mem_root) Item_func_between(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[0].item)); @@ -28859,11 +28853,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); item->negate(); (yyval.item)= item; } -#line 28863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1259: -#line 8744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8738 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item1= new (thd->mem_root) Item_func_soundex(thd, (yyvsp[-3].item)); Item *item4= new (thd->mem_root) Item_func_soundex(thd, (yyvsp[0].item)); @@ -28873,22 +28867,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1260: -#line 8754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_like(thd, (yyvsp[-3].item), (yyvsp[-1].item), (yyvsp[0].item), Lex->escape_used); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1261: -#line 8761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_func_like(thd, (yyvsp[-4].item), (yyvsp[-1].item), (yyvsp[0].item), Lex->escape_used); @@ -28898,21 +28892,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1262: -#line 8771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_regex(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28906 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1263: -#line 8777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_func_regex(thd, (yyvsp[-3].item), (yyvsp[0].item)); if (item == NULL) @@ -28921,318 +28915,318 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28925 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28919 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1265: -#line 8790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_bit_or(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1266: -#line 8796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_bit_and(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1267: -#line 8802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_shift_left(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28955 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28949 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1268: -#line 8808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_shift_right(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1269: -#line 8814 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_plus(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1270: -#line 8820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8814 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_minus(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28985 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1271: -#line 8826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-4].item), (yyvsp[-1].item), (yyvsp[0].interval), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1272: -#line 8832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-4].item), (yyvsp[-1].item), (yyvsp[0].interval), 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1273: -#line 8838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_mul(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1274: -#line 8844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_div(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1275: -#line 8850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1276: -#line 8856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_int_div(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29045 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1277: -#line 8862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1278: -#line 8868 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_bit_xor(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1288: -#line 8897 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8891 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.boolfunc2creator) = &comp_eq_creator; } -#line 29071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1289: -#line 8898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.boolfunc2creator) = &comp_ge_creator; } -#line 29077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1290: -#line 8899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8893 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.boolfunc2creator) = &comp_gt_creator; } -#line 29083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1291: -#line 8900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.boolfunc2creator) = &comp_le_creator; } -#line 29089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1292: -#line 8901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.boolfunc2creator) = &comp_lt_creator; } -#line 29095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1293: -#line 8902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.boolfunc2creator) = &comp_ne_creator; } -#line 29101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1294: -#line 8906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 1; } -#line 29107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1295: -#line 8907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 0; } -#line 29113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1296: -#line 8912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_NULL; /* automatic type */ lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1297: -#line 8918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[0].num); } -#line 29130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1298: -#line 8923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_INT; lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1299: -#line 8930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8924 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_UINT; lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29146 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1300: -#line 8937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_DOUBLE; lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1301: -#line 8944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_DOUBLE; lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1302: -#line 8951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_DOUBLE; lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1303: -#line 8958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= DYN_COL_DECIMAL; Lex->charset= NULL; } -#line 29194 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29188 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1304: -#line 8963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset= thd->variables.collation_connection; } -#line 29200 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29194 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1305: -#line 8965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_STRING; lex->length= lex->dec= 0; } -#line 29210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1306: -#line 8971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_STRING; lex->charset= national_charset_info; lex->length= lex->dec= 0; } -#line 29221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1307: -#line 8978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_DATE; lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29232 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29226 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1308: -#line 8985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_TIME; @@ -29240,11 +29234,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->dec= lex->length; lex->length= 0; } -#line 29244 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29238 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1309: -#line 8993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_DATETIME; @@ -29252,11 +29246,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->dec= lex->length; lex->length= 0; } -#line 29256 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29250 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1310: -#line 9004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.dyncol_def)= (DYNCALL_CREATE_DEF *) @@ -29276,31 +29270,31 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else (yyval.dyncol_def)->len= 0; } -#line 29280 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29274 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1311: -#line 9026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.dyncol_def_list)= new (thd->mem_root) List; if ((yyval.dyncol_def_list) == NULL) MYSQL_YYABORT; (yyval.dyncol_def_list)->push_back((yyvsp[0].dyncol_def), thd->mem_root); } -#line 29291 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1312: -#line 9033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-2].dyncol_def_list)->push_back((yyvsp[0].dyncol_def), thd->mem_root); (yyval.dyncol_def_list)= (yyvsp[-2].dyncol_def_list); } -#line 29300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1318: -#line 9046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *i1= new (thd->mem_root) Item_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, @@ -29311,113 +29305,113 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1320: -#line 9057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item_param); } -#line 29321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1323: -#line 9061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_concat(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1324: -#line 9067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 29339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1325: -#line 9071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_neg(thd, (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1326: -#line 9077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_bit_neg(thd, (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29359 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1327: -#line 9083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= negate_expression(thd, (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29363 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1328: -#line 9089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_singlerow_subselect(thd, (yyvsp[-1].select_lex)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1329: -#line 9095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[-1].item); } -#line 29385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1330: -#line 9097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root); (yyval.item)= new (thd->mem_root) Item_row(thd, *(yyvsp[-1].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29396 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1331: -#line 9104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root); (yyval.item)= new (thd->mem_root) Item_row(thd, *(yyvsp[-1].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29401 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1332: -#line 9111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_exists_subselect(thd, (yyvsp[-1].select_lex)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1333: -#line 9117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= NULL; /* @@ -29441,11 +29435,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) (yyval.item)= (yyvsp[-1].item); } -#line 29445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1334: -#line 9141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-5].item_list)->push_front((yyvsp[-2].item), thd->mem_root); Item_func_match *i1= new (thd->mem_root) Item_func_match(thd, *(yyvsp[-5].item_list), @@ -29455,22 +29449,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Select->add_ftfunc_to_list(thd, i1); (yyval.item)= i1; } -#line 29459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1335: -#line 9151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= create_func_cast(thd, (yyvsp[0].item), ITEM_CAST_CHAR, NULL, NULL, &my_charset_bin); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1336: -#line 9158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.item)= create_func_cast(thd, (yyvsp[-3].item), (yyvsp[-1].cast_type), lex->length, lex->dec, @@ -29478,42 +29472,42 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1337: -#line 9166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_case(thd, *(yyvsp[-2].item_list), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29486 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1338: -#line 9172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= create_func_cast(thd, (yyvsp[-3].item), (yyvsp[-1].cast_type), Lex->length, Lex->dec, Lex->charset); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1339: -#line 9179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_conv_charset(thd, (yyvsp[-3].item), (yyvsp[-1].charset)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1340: -#line 9185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_splocal *il= (yyvsp[-1].item)->get_item_splocal(); if (il) @@ -29523,52 +29517,52 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1341: -#line 9195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_insert_value(thd, Lex->current_context(), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1342: -#line 9203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[0].item), (yyvsp[-3].item), (yyvsp[-2].interval), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1343: -#line 9218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_char(thd, *(yyvsp[-1].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29558 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1344: -#line 9224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_char(thd, *(yyvsp[-3].item_list), (yyvsp[-1].charset)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29562 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1345: -#line 9230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_current_user(thd, Lex->current_context()); @@ -29577,11 +29571,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); Lex->safe_to_cache_query= 0; } -#line 29581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1346: -#line 9239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_current_role(thd, Lex->current_context()); @@ -29590,51 +29584,51 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); Lex->safe_to_cache_query= 0; } -#line 29594 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29588 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1347: -#line 9248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_typecast(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29604 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29598 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1348: -#line 9254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_dayofmonth(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29614 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1349: -#line 9260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_hour(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1350: -#line 9266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_insert(thd, (yyvsp[-7].item), (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1351: -#line 9272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { List *list= new (thd->mem_root) List; if (list == NULL) @@ -29648,11 +29642,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1352: -#line 9286 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root); (yyvsp[-1].item_list)->push_front((yyvsp[-5].item), thd->mem_root); @@ -29663,173 +29657,173 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29667 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29661 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1353: -#line 9297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_left(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1354: -#line 9303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_minute(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1355: -#line 9309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_month(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29697 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1356: -#line 9315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_right(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1357: -#line 9321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_second(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1358: -#line 9327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_time_typecast(thd, (yyvsp[-1].item), AUTO_SEC_PART_DIGITS); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1359: -#line 9334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_datetime_typecast(thd, (yyvsp[-1].item), AUTO_SEC_PART_DIGITS); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1360: -#line 9341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9335 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_add_time(thd, (yyvsp[-3].item), (yyvsp[-1].item), 1, 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1361: -#line 9347 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_trim(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1362: -#line 9353 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9347 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_ltrim(thd, (yyvsp[-1].item), (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1363: -#line 9359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9353 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_rtrim(thd, (yyvsp[-1].item), (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1364: -#line 9365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_trim(thd, (yyvsp[-1].item), (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1365: -#line 9371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_ltrim(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29799 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29793 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1366: -#line 9377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_rtrim(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1367: -#line 9383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_trim(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1368: -#line 9389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_trim(thd, (yyvsp[-1].item), (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29829 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29823 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1369: -#line 9395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_user(thd); if ((yyval.item) == NULL) @@ -29837,186 +29831,186 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); Lex->safe_to_cache_query=0; } -#line 29841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1370: -#line 9403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_year(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1371: -#line 9424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-3].item), (yyvsp[-1].item), INTERVAL_DAY, 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29856 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1372: -#line 9431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29872 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1373: -#line 9437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_curdate_local(thd); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 29883 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1374: -#line 9444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_curtime_local(thd, (yyvsp[0].num)); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 29894 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1375: -#line 9452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1376: -#line 9459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29914 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1377: -#line 9465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=new (thd->mem_root) Item_extract(thd, (yyvsp[-3].interval), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1378: -#line 9471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_get_format(thd, (yyvsp[-3].date_time_type), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29934 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1379: -#line 9477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num)); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 29945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1380: -#line 9484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_locate(thd, (yyvsp[-1].item), (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29955 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29949 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1381: -#line 9490 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-3].item), (yyvsp[-1].item), INTERVAL_DAY, 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1382: -#line 9497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29976 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1383: -#line 9503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_substr(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1384: -#line 9509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_substr(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1385: -#line 9515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_substr(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30006 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30000 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1386: -#line 9521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_substr(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1387: -#line 9527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Unlike other time-related functions, SYSDATE() is @@ -30034,104 +30028,104 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 30038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1388: -#line 9545 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9539 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-1].item), (yyvsp[-3].item), (yyvsp[-5].interval_time_st), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30048 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30042 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1389: -#line 9551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9545 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_timestamp_diff(thd, (yyvsp[-3].item), (yyvsp[-1].item), (yyvsp[-5].interval_time_st)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30058 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30052 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1390: -#line 9557 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_curdate_utc(thd); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 30069 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1391: -#line 9564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_curtime_utc(thd, (yyvsp[0].num)); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 30080 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1392: -#line 9571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_now_utc(thd, (yyvsp[0].num)); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 30091 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1393: -#line 9579 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9573 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= create_func_dyncol_add(thd, (yyvsp[-3].item), *(yyvsp[-1].dyncol_def_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1394: -#line 9586 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= create_func_dyncol_delete(thd, (yyvsp[-3].item), *(yyvsp[-1].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1395: -#line 9593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9587 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_dyncol_check(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1396: -#line 9600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9594 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= create_func_dyncol_create(thd, *(yyvsp[-1].dyncol_def_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1397: -#line 9607 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.item)= create_func_dyncol_get(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].cast_type), @@ -30140,133 +30134,133 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1398: -#line 9624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9618 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_ascii(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30154 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30148 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1399: -#line 9630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_charset(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30164 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1400: -#line 9636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_coalesce(thd, *(yyvsp[-1].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1401: -#line 9642 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_collation(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30184 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1402: -#line 9648 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9642 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_database(thd); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 30195 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1403: -#line 9655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9649 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_if(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30199 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1404: -#line 9661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_format(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1405: -#line 9667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_format(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1406: -#line 9673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_last_value(thd, *(yyvsp[-1].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1407: -#line 9679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_microsecond(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1408: -#line 9685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1409: -#line 9691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_password(thd, (yyvsp[-1].item), Item_func_password::OLD); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30260 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1410: -#line 9698 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9692 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item* i1; i1= new (thd->mem_root) Item_func_password(thd, (yyvsp[-1].item)); @@ -30274,51 +30268,51 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; (yyval.item)= i1; } -#line 30278 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30272 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1411: -#line 9706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9700 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_quarter(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1412: -#line 9712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_repeat(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30298 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30292 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1413: -#line 9718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_replace(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30302 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1414: -#line 9724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_reverse(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30318 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30312 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1415: -#line 9730 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_row_count(thd); if ((yyval.item) == NULL) @@ -30326,21 +30320,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); Lex->safe_to_cache_query= 0; } -#line 30330 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1416: -#line 9738 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_round(thd, (yyvsp[-3].item), (yyvsp[-1].item), 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30334 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1417: -#line 9744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9738 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *i1; LEX_STRING name= {C_STRING_WITH_LEN("default_week_format")}; @@ -30354,31 +30348,31 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1418: -#line 9758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9752 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_week(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1419: -#line 9764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_weight_string(thd, (yyvsp[-2].item), 0, 0, (yyvsp[-1].ulong_num)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1420: -#line 9770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_weight_string(thd, (yyvsp[-5].item), 0, (yyvsp[-2].ulong_num), @@ -30386,11 +30380,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1421: -#line 9778 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_char_typecast(thd, (yyvsp[-4].item), (yyvsp[-1].ulong_num), &my_charset_bin); @@ -30402,22 +30396,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30406 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1422: -#line 9790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_weight_string(thd, (yyvsp[-7].item), (yyvsp[-5].ulong_num), (yyvsp[-3].ulong_num), (yyvsp[-1].ulong_num)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1423: -#line 9797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9791 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { #ifdef HAVE_SPATIAL (yyval.item)= (yyvsp[0].item); @@ -30429,95 +30423,95 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); sym_group_geom.needed_define)); #endif } -#line 30433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1424: -#line 9812 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_precise_rel(thd, (yyvsp[-3].item), (yyvsp[-1].item), Item_func::SP_CONTAINS_FUNC)); } -#line 30443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1425: -#line 9818 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9812 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_collection(thd, *(yyvsp[-1].item_list), Geometry::wkb_geometrycollection, Geometry::wkb_point)); } -#line 30454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30448 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1426: -#line 9825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_collection(thd, *(yyvsp[-1].item_list), Geometry::wkb_linestring, Geometry::wkb_point)); } -#line 30465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1427: -#line 9832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_collection(thd, *(yyvsp[-1].item_list), Geometry::wkb_multilinestring, Geometry::wkb_linestring)); } -#line 30476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1428: -#line 9839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_collection(thd, *(yyvsp[-1].item_list), Geometry::wkb_multipoint, Geometry::wkb_point)); } -#line 30487 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30481 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1429: -#line 9846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9840 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_collection(thd, *(yyvsp[-1].item_list), Geometry::wkb_multipolygon, Geometry::wkb_polygon)); } -#line 30498 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1430: -#line 9853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_point(thd, (yyvsp[-3].item), (yyvsp[-1].item))); } -#line 30506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1431: -#line 9857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9851 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_collection(thd, *(yyvsp[-1].item_list), Geometry::wkb_polygon, Geometry::wkb_linestring)); } -#line 30517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1432: -#line 9876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { #ifdef HAVE_DLOPEN udf_func *udf= 0; @@ -30536,11 +30530,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.udf)= udf; #endif } -#line 30540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1433: -#line 9895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Create_func *builder; Item *item= NULL; @@ -30593,11 +30587,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 30597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1434: -#line 9948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Create_qfunc *builder; Item *item= NULL; @@ -30632,79 +30626,79 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 30636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1435: -#line 9986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[-1].num) | (yyvsp[0].num); } -#line 30642 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1436: -#line 9988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= FT_BOOL; } -#line 30648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30642 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1437: -#line 9992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= FT_NL; } -#line 30654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1438: -#line 9993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= FT_NL; } -#line 30660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1439: -#line 9997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 30666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1440: -#line 9998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= FT_EXPAND; } -#line 30672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1441: -#line 10002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= NULL; } -#line 30678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1442: -#line 10003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= (yyvsp[0].item_list); } -#line 30684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1443: -#line 10008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= new (thd->mem_root) List; if ((yyval.item_list) == NULL) MYSQL_YYABORT; (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root); } -#line 30695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1444: -#line 10015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root); (yyval.item_list)= (yyvsp[-2].item_list); } -#line 30704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1445: -#line 10023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Use Item::name as a storage for the attribute value of user @@ -30728,61 +30722,61 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[-2].item)->set_name((yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset()); (yyval.item)= (yyvsp[-2].item); } -#line 30732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1446: -#line 10050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_avg(thd, (yyvsp[-1].item), FALSE); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30742 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30736 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1447: -#line 10056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_avg(thd, (yyvsp[-1].item), TRUE); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1448: -#line 10062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_and(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1449: -#line 10068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_or(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30766 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1450: -#line 10074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_xor(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30776 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1451: -#line 10080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_int(thd, (int32) 0L, 1); if (item == NULL) @@ -30791,149 +30785,149 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1452: -#line 10089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_count(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30805 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30799 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1453: -#line 10095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->in_sum_expr++; } -#line 30811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30805 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1454: -#line 10097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->in_sum_expr--; } -#line 30817 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1455: -#line 10099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_count(thd, *(yyvsp[-2].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1456: -#line 10105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1457: -#line 10116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1458: -#line 10122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1459: -#line 10128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30867 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30861 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1460: -#line 10134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_std(thd, (yyvsp[-1].item), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1461: -#line 10140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_variance(thd, (yyvsp[-1].item), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30881 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1462: -#line 10146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_std(thd, (yyvsp[-1].item), 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1463: -#line 10152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_variance(thd, (yyvsp[-1].item), 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1464: -#line 10158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_sum(thd, (yyvsp[-1].item), FALSE); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1465: -#line 10164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_sum(thd, (yyvsp[-1].item), TRUE); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1466: -#line 10170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->in_sum_expr++; } -#line 30933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1467: -#line 10174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->in_sum_expr--; @@ -30945,28 +30939,28 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[-3].item_list)->empty(); sel->gorder_list.empty(); } -#line 30949 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30943 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1468: -#line 10189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (! Lex->parsing_options.allows_variable) my_yyabort_error((ER_VIEW_SELECT_VARIABLE, MYF(0))); } -#line 30958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30952 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1469: -#line 10194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 30966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1470: -#line 10201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_func_set_user_var *item; (yyval.item)= item= new (thd->mem_root) Item_func_set_user_var(thd, (yyvsp[-2].lex_str), (yyvsp[0].item)); @@ -30976,11 +30970,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->uncacheable(UNCACHEABLE_SIDEEFFECT); lex->set_var_list.push_back(item, thd->mem_root); } -#line 30980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30974 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1471: -#line 10211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_get_user_var(thd, (yyvsp[0].lex_str)); if ((yyval.item) == NULL) @@ -30988,11 +30982,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); LEX *lex= Lex; lex->uncacheable(UNCACHEABLE_SIDEEFFECT); } -#line 30992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1472: -#line 10219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* disallow "SELECT @@global.global.variable" */ if ((yyvsp[-1].lex_str).str && (yyvsp[0].lex_str).str && check_reserved_words(&(yyvsp[-1].lex_str))) @@ -31005,39 +30999,39 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!((Item_func_get_system_var*) (yyval.item))->is_written_to_binlog()) Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_VARIABLE); } -#line 31009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1473: -#line 10234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 0; } -#line 31015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1474: -#line 10235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 1; } -#line 31021 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1475: -#line 10240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.string)= new (thd->mem_root) String(",", 1, &my_charset_latin1); if ((yyval.string) == NULL) MYSQL_YYABORT; } -#line 31031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1476: -#line 10245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 31037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1478: -#line 10251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; SELECT_LEX *sel= lex->current_select; @@ -31049,23 +31043,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); "CUBE/ROLLUP", "ORDER BY")); } } -#line 31053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1480: -#line 10267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))) MYSQL_YYABORT; } -#line 31059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1481: -#line 10269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))) MYSQL_YYABORT; } -#line 31065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1482: -#line 10274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->current_select->inc_in_sum_expr()) @@ -31074,206 +31068,206 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 31078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1483: -#line 10283 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->in_sum_expr--; (yyval.item)= (yyvsp[0].item); } -#line 31087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1484: -#line 10291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_CHAR; Lex->charset= &my_charset_bin; Lex->dec= 0; } -#line 31093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1485: -#line 10293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset= thd->variables.collation_connection; } -#line 31099 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1486: -#line 10295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_CHAR; Lex->dec= 0; } -#line 31105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31099 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1487: -#line 10297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_CHAR; Lex->charset= national_charset_info; Lex->dec=0; } -#line 31111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1488: -#line 10299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_SIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; } -#line 31117 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1489: -#line 10301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_SIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; } -#line 31123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31117 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1490: -#line 10303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_SIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; } -#line 31129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1491: -#line 10305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_UNSIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; } -#line 31135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1492: -#line 10307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_UNSIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; } -#line 31141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1493: -#line 10309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_DATE; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; } -#line 31147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1494: -#line 10311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_TIME; LEX *lex= Lex; lex->charset= NULL; lex->dec= lex->length; lex->length= (char*)0; } -#line 31157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1495: -#line 10317 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_DATETIME; LEX *lex= Lex; lex->charset= NULL; lex->dec= lex->length; lex->length= (char*)0; } -#line 31167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1496: -#line 10323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10317 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_DECIMAL; Lex->charset= NULL; } -#line 31173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1497: -#line 10325 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset= NULL; Lex->length= Lex->dec= 0;} -#line 31179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1498: -#line 10327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_DOUBLE; } -#line 31185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1499: -#line 10330 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10324 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= NULL; } -#line 31191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1500: -#line 10331 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10325 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= (yyvsp[0].item_list);} -#line 31197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1501: -#line 10336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10330 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= new (thd->mem_root) List; if ((yyval.item_list) == NULL) MYSQL_YYABORT; (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root); } -#line 31208 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1502: -#line 10343 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10337 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root); (yyval.item_list)= (yyvsp[-2].item_list); } -#line 31217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1503: -#line 10350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10344 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= (yyvsp[0].item_list); } -#line 31223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1504: -#line 10351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= (yyvsp[-1].item_list); } -#line 31229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1505: -#line 10356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= new (thd->mem_root) List; if ((yyval.item_list) == NULL) MYSQL_YYABORT; (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root); } -#line 31240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1506: -#line 10363 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10357 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root); (yyval.item_list)= (yyvsp[-2].item_list); } -#line 31249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1507: -#line 10370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= NULL; } -#line 31255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1508: -#line 10371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 31261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1509: -#line 10375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= NULL; } -#line 31267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1510: -#line 10376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 31273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1511: -#line 10381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= new (thd->mem_root) List; if ((yyval.item_list) == NULL) @@ -31281,27 +31275,27 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.item_list)->push_back((yyvsp[-2].item), thd->mem_root); (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root); } -#line 31285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1512: -#line 10389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-4].item_list)->push_back((yyvsp[-2].item), thd->mem_root); (yyvsp[-4].item_list)->push_back((yyvsp[0].item), thd->mem_root); (yyval.item_list)= (yyvsp[-4].item_list); } -#line 31295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1513: -#line 10399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table_list)=(yyvsp[0].table_list); } -#line 31301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1514: -#line 10401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (!((yyval.table_list)= lex->current_select->nest_last_join(thd))) @@ -31310,49 +31304,49 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 31314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1515: -#line 10412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10406 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyval.table_list)=(yyvsp[0].table_list)); } -#line 31320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1516: -#line 10423 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table_list)=(yyvsp[0].table_list); } -#line 31326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1517: -#line 10424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table_list)=(yyvsp[-1].table_list); } -#line 31332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1518: -#line 10430 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table_list)=(yyvsp[0].table_list); } -#line 31338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1519: -#line 10432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list))); } -#line 31346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1520: -#line 10452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list))); (yyvsp[0].table_list)->straight=(yyvsp[-1].num); } -#line 31352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1521: -#line 10455 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && (yyvsp[-1].table_list)); /* Change the current name resolution context to a local context. */ @@ -31360,50 +31354,50 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Select->parsing_place= IN_ON; } -#line 31364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1522: -#line 10463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-3].table_list)->straight=(yyvsp[-4].num); add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item)); Lex->pop_context(); Select->parsing_place= NO_MATTER; } -#line 31375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1523: -#line 10471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && (yyvsp[-1].table_list)); } -#line 31383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1524: -#line 10475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-5].table_list)->straight=(yyvsp[-6].num); add_join_natural((yyvsp[-7].table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select); (yyval.table_list)=(yyvsp[-5].table_list); } -#line 31393 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31387 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1525: -#line 10481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && ((yyval.table_list)=(yyvsp[0].table_list))); (yyvsp[0].table_list)->straight=(yyvsp[-1].num); add_join_natural((yyvsp[-3].table_list),(yyvsp[0].table_list),NULL,Select); } -#line 31403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1526: -#line 10490 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[-1].table_list)); /* Change the current name resolution context to a local context. */ @@ -31411,11 +31405,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Select->parsing_place= IN_ON; } -#line 31415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31409 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1527: -#line 10498 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item)); Lex->pop_context(); @@ -31423,40 +31417,40 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.table_list)=(yyvsp[-3].table_list); Select->parsing_place= NO_MATTER; } -#line 31427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1528: -#line 10506 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list)); } -#line 31435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1529: -#line 10510 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10504 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { add_join_natural((yyvsp[-9].table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select); (yyvsp[-5].table_list)->outer_join|=JOIN_TYPE_LEFT; (yyval.table_list)=(yyvsp[-5].table_list); } -#line 31445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1530: -#line 10516 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10510 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[0].table_list)); add_join_natural((yyvsp[-5].table_list),(yyvsp[0].table_list),NULL,Select); (yyvsp[0].table_list)->outer_join|=JOIN_TYPE_LEFT; (yyval.table_list)=(yyvsp[0].table_list); } -#line 31456 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31450 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1531: -#line 10526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10520 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[-1].table_list)); /* Change the current name resolution context to a local context. */ @@ -31464,11 +31458,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Select->parsing_place= IN_ON; } -#line 31468 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31462 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1532: -#line 10534 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10528 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (!((yyval.table_list)= lex->current_select->convert_right_join())) @@ -31477,30 +31471,30 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->pop_context(); Select->parsing_place= NO_MATTER; } -#line 31481 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31475 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1533: -#line 10543 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10537 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list)); } -#line 31489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1534: -#line 10547 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (!((yyval.table_list)= lex->current_select->convert_right_join())) MYSQL_YYABORT; add_join_natural((yyval.table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select); } -#line 31500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1535: -#line 10554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[0].table_list)); add_join_natural((yyvsp[0].table_list),(yyvsp[-5].table_list),NULL,Select); @@ -31508,64 +31502,64 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!((yyval.table_list)= lex->current_select->convert_right_join())) MYSQL_YYABORT; } -#line 31512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1536: -#line 10565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10559 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 0; } -#line 31518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1537: -#line 10566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 0; } -#line 31524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1538: -#line 10567 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10561 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 1; } -#line 31530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1539: -#line 10571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = (yyvsp[0].num); } -#line 31536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1540: -#line 10572 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 0; } -#line 31542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1541: -#line 10580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10574 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.string_list)= 0;} -#line 31548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1543: -#line 10586 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.string_list)= (yyvsp[-2].string_list); } -#line 31556 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1544: -#line 10600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10594 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->table_join_options= 0; } -#line 31565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1545: -#line 10605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10599 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[-3].table), (yyvsp[-1].lex_str_ptr), Select->get_table_join_options(), @@ -31576,11 +31570,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Select->add_joined_table((yyval.table_list)); } -#line 31580 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31574 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1546: -#line 10616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; SELECT_LEX *sel= lex->current_select; @@ -31598,11 +31592,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* incomplete derived tables return NULL, we must be nested in select_derived rule to be here. */ } -#line 31602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31596 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1547: -#line 10652 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10646 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Use $2 instead of Lex->current_select as derived table will alter value of Lex->current_select. */ @@ -31665,11 +31659,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); !(yyval.table_list)->derived->first_select()->next_select()) (yyval.table_list)->select_lex->add_where_field((yyval.table_list)->derived->first_select()); } -#line 31669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1548: -#line 10737 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[-1].table_list) && (yyvsp[0].num)) { @@ -31677,20 +31671,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 31681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1549: -#line 10747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_select_to_union_list(Lex, (bool)(yyvsp[0].num), FALSE)) MYSQL_YYABORT; } -#line 31690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1550: -#line 10752 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10746 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Remove from the name resolution context stack the context of the @@ -31704,11 +31698,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 31708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1551: -#line 10770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->current_select->set_braces(0)) @@ -31717,11 +31711,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 31721 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31715 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1552: -#line 10782 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; SELECT_LEX *sel= lex->current_select; @@ -31729,28 +31723,28 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); mysql_init_select(lex); lex->current_select->parsing_place= SELECT_LIST; } -#line 31733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31727 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1553: -#line 10790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= NO_MATTER; } -#line 31741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1554: -#line 10798 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].select_lex)->init_nested_join(thd)) MYSQL_YYABORT; } -#line 31750 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31744 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1555: -#line 10803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* for normal joins, $3 != NULL and end_nested_join() != NULL, for derived tables, both must equal NULL */ @@ -31763,11 +31757,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 31767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1556: -#line 10818 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10812 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->derived_tables|= DERIVED_SUBQUERY; @@ -31784,25 +31778,25 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->current_select->linkage= DERIVED_TABLE_TYPE; lex->current_select->parsing_place= SELECT_LIST; } -#line 31788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1557: -#line 10835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= NO_MATTER; } -#line 31796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1559: -#line 10842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.select_lex)= Select; } -#line 31802 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1560: -#line 10847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -31822,113 +31816,113 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); !embedding->nested_join->join_list.elements; /* return true if we are deeply nested */ } -#line 31826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1561: -#line 10869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10863 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 31832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1562: -#line 10870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10864 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 31838 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1563: -#line 10875 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= thd->variables.old_mode ? INDEX_HINT_MASK_JOIN : INDEX_HINT_MASK_ALL; } -#line 31846 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31840 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1564: -#line 10878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= INDEX_HINT_MASK_JOIN; } -#line 31852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31846 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1565: -#line 10879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= INDEX_HINT_MASK_ORDER; } -#line 31858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1566: -#line 10880 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10874 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= INDEX_HINT_MASK_GROUP; } -#line 31864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1567: -#line 10884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.index_hint)= INDEX_HINT_FORCE; } -#line 31870 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1568: -#line 10885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.index_hint)= INDEX_HINT_IGNORE; } -#line 31876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31870 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1569: -#line 10890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_index_hint_type((yyvsp[-2].index_hint), (yyvsp[0].num)); } -#line 31884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31878 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1571: -#line 10895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_index_hint_type(INDEX_HINT_USE, (yyvsp[0].num)); } -#line 31892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31886 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1576: -#line 10908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->alloc_index_hints(thd); } -#line 31898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1578: -#line 10912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->clear_index_hints(); } -#line 31904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1580: -#line 10917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10911 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->add_index_hint(thd, NULL, 0); } -#line 31910 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1581: -#line 10918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 31916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31910 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1582: -#line 10923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->add_index_hint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); } -#line 31922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1583: -#line 10925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->add_index_hint(thd, (char *)"PRIMARY", 7); } -#line 31928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1586: -#line 10935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.string_list)= new (thd->mem_root) List)) MYSQL_YYABORT; @@ -31939,11 +31933,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; (yyval.string_list)->push_back(s, thd->mem_root); } -#line 31943 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31937 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1587: -#line 10946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { String *s= new (thd->mem_root) String((const char *) (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, @@ -31953,191 +31947,191 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[-2].string_list)->push_back(s, thd->mem_root); (yyval.string_list)= (yyvsp[-2].string_list); } -#line 31957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1588: -#line 10958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 31963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1589: -#line 10959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_DAY_HOUR; } -#line 31969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1590: -#line 10960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_DAY_MICROSECOND; } -#line 31975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1591: -#line 10961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10955 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_DAY_MINUTE; } -#line 31981 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1592: -#line 10962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_DAY_SECOND; } -#line 31987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31981 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1593: -#line 10963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_HOUR_MICROSECOND; } -#line 31993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1594: -#line 10964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_HOUR_MINUTE; } -#line 31999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1595: -#line 10965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_HOUR_SECOND; } -#line 32005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1596: -#line 10966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_MINUTE_MICROSECOND; } -#line 32011 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1597: -#line 10967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_MINUTE_SECOND; } -#line 32017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32011 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1598: -#line 10968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_SECOND_MICROSECOND; } -#line 32023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1599: -#line 10969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_YEAR_MONTH; } -#line 32029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1600: -#line 10973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_DAY; } -#line 32035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1601: -#line 10974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_WEEK; } -#line 32041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1602: -#line 10975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_HOUR; } -#line 32047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1603: -#line 10976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_MINUTE; } -#line 32053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1604: -#line 10977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_MONTH; } -#line 32059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1605: -#line 10978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_QUARTER; } -#line 32065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1606: -#line 10979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_SECOND; } -#line 32071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1607: -#line 10980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_MICROSECOND; } -#line 32077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1608: -#line 10981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_YEAR; } -#line 32083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1609: -#line 10985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATE;} -#line 32089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1610: -#line 10986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.date_time_type)=MYSQL_TIMESTAMP_TIME;} -#line 32095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1611: -#line 10987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;} -#line 32101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1612: -#line 10988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;} -#line 32107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1616: -#line 10998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str_ptr)=0; } -#line 32113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1617: -#line 11000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10994 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str_ptr)= (LEX_STRING*) thd->memdup(&(yyvsp[0].lex_str),sizeof(LEX_STRING)); if ((yyval.lex_str_ptr) == NULL) MYSQL_YYABORT; } -#line 32123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32117 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1620: -#line 11013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->where= 0; } -#line 32129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1621: -#line 11015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= IN_WHERE; } -#line 32137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1622: -#line 11019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *select= Select; select->where= normalize_cond(thd, (yyvsp[0].item)); @@ -32145,19 +32139,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyvsp[0].item)) (yyvsp[0].item)->top_level_item(); } -#line 32149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1624: -#line 11031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= IN_HAVING; } -#line 32157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1625: -#line 11035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->having= normalize_cond(thd, (yyvsp[0].item)); @@ -32165,20 +32159,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyvsp[0].item)) (yyvsp[0].item)->top_level_item(); } -#line 32169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1626: -#line 11046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->escape_used= TRUE; (yyval.item)= (yyvsp[0].item); } -#line 32178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1627: -#line 11051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->escape_used= FALSE; (yyval.item)= ((thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) ? @@ -32187,29 +32181,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 32191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1630: -#line 11072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))) MYSQL_YYABORT; } -#line 32197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1631: -#line 11074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))) MYSQL_YYABORT; } -#line 32203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1632: -#line 11078 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1633: -#line 11080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* 'WITH CUBE' is reserved in the MySQL syntax, but not implemented, @@ -32226,11 +32220,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_NOT_SUPPORTED_YET, MYF(0), "CUBE")); } -#line 32230 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32224 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1634: -#line 11097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* 'WITH ROLLUP' is needed for backward compatibility, @@ -32245,21 +32239,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); "global union parameters")); lex->current_select->olap= ROLLUP_TYPE; } -#line 32249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1638: -#line 11128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { bool ascending= ((yyvsp[0].num) == 1) ? true : false; if (add_order_to_list(thd, (yyvsp[-1].item), ascending)) MYSQL_YYABORT; } -#line 32259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1641: -#line 11146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; SELECT_LEX *sel= lex->current_select; @@ -32302,61 +32296,61 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->current_select= sel->master_unit()->fake_select_lex; } } -#line 32306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1642: -#line 11189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 32314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1643: -#line 11196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))) MYSQL_YYABORT; } -#line 32320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1644: -#line 11198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))) MYSQL_YYABORT; } -#line 32326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1645: -#line 11202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 1; } -#line 32332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1646: -#line 11203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) =1; } -#line 32338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1647: -#line 11204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) =0; } -#line 32344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1648: -#line 11208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1649: -#line 11209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1650: -#line 11214 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; if (sel->master_unit()->is_union() && !sel->braces) @@ -32366,71 +32360,71 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); DBUG_ASSERT(Select); } } -#line 32370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1651: -#line 11227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; if (!sel->select_limit->basic_const_item() || sel->select_limit->val_int() > 0) Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT); } -#line 32381 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1652: -#line 11235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT); } -#line 32389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1653: -#line 11239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT); } -#line 32397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32391 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1654: -#line 11246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->select_limit= (yyvsp[0].item); sel->offset_limit= 0; sel->explicit_limit= 1; } -#line 32408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1655: -#line 11253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->select_limit= (yyvsp[0].item); sel->offset_limit= (yyvsp[-2].item); sel->explicit_limit= 1; } -#line 32419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1656: -#line 11260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->select_limit= (yyvsp[-2].item); sel->offset_limit= (yyvsp[0].item); sel->explicit_limit= 1; } -#line 32430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32424 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1657: -#line 11270 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11264 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_splocal *splocal; LEX *lex= thd->lex; @@ -32457,258 +32451,258 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); splocal->limit_clause_param= TRUE; (yyval.item)= splocal; } -#line 32461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1658: -#line 11297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[0].item_param)->limit_clause_param= TRUE; } -#line 32469 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1659: -#line 11301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 32479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1660: -#line 11307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 32489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1661: -#line 11313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 32499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32493 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1662: -#line 11322 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->limit_rows_examined= (yyvsp[0].item); } -#line 32508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1663: -#line 11329 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->current_select->select_limit= 0; } -#line 32517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1664: -#line 11334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->select_limit= (yyvsp[0].item); Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT); sel->explicit_limit= 1; } -#line 32528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32522 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1665: -#line 11340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { my_parse_error(thd, ER_SYNTAX_ERROR); MYSQL_YYABORT; } -#line 32534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1666: -#line 11341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11335 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { my_parse_error(thd, ER_SYNTAX_ERROR); MYSQL_YYABORT; } -#line 32540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1667: -#line 11345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11339 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.num)= (int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32546 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1668: -#line 11346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.num)= -(int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32546 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1669: -#line 11347 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.num)= -(int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32558 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1670: -#line 11351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32564 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32558 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1671: -#line 11352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (ulong) strtol((yyvsp[0].lex_str).str, (char**) 0, 16); } -#line 32570 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32564 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1672: -#line 11353 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11347 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32570 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1673: -#line 11354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32582 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1674: -#line 11355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11349 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32588 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32582 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1675: -#line 11356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32594 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32588 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1676: -#line 11360 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32600 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32594 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1677: -#line 11361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (ulong) strtol((yyvsp[0].lex_str).str, (char**) 0, 16); } -#line 32606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32600 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1678: -#line 11362 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1679: -#line 11363 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11357 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1680: -#line 11364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11358 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT; } -#line 32624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1681: -#line 11368 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11362 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1682: -#line 11369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11363 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1683: -#line 11370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32642 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1684: -#line 11371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32642 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1685: -#line 11372 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11366 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1686: -#line 11376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1687: -#line 11377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1688: -#line 11378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11372 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulonglong_number)= strtoull((yyvsp[0].lex_str).str, (char**) 0, 16); } -#line 32672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1689: -#line 11379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11373 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1690: -#line 11380 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11374 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT; } -#line 32684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1691: -#line 11385 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { my_parse_error(thd, ER_ONLY_INTEGERS_ALLOWED); } -#line 32690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1694: -#line 11394 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.choice)= (yyvsp[0].ulong_num) != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; } -#line 32696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1695: -#line 11395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.choice)= HA_CHOICE_UNDEF; } -#line 32702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1696: -#line 11399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= false; } -#line 32708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1697: -#line 11401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; @@ -32737,67 +32731,67 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ Lex->expr_allows_subselect= false; } -#line 32741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1698: -#line 11430 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Subqueries are allowed from now.*/ Lex->expr_allows_subselect= true; (yyval.num)= true; } -#line 32751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1699: -#line 11438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1700: -#line 11439 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1703: -#line 11449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_proc_to_list(thd, (yyvsp[-1].item))) MYSQL_YYABORT; if (!(yyvsp[-1].item)->name) (yyvsp[-1].item)->set_name((yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset()); } -#line 32774 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1704: -#line 11458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (!lex->describe && (!(lex->result= new (thd->mem_root) select_dumpvar(thd)))) MYSQL_YYABORT; } -#line 32785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1705: -#line 11465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1707: -#line 11470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1708: -#line 11474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->result) { @@ -32814,19 +32808,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); DBUG_ASSERT(Lex->describe); } } -#line 32818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1709: -#line 11494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11488 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.myvar) = Lex->result ? new (thd->mem_root) my_var_user((yyvsp[0].lex_str)) : NULL; } -#line 32826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1710: -#line 11498 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { sp_variable *t; @@ -32837,32 +32831,32 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->sphead)) : NULL; } -#line 32841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1711: -#line 11511 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11505 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= false; } -#line 32847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1712: -#line 11512 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11506 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= true; } -#line 32853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1713: -#line 11517 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11511 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (! Lex->parsing_options.allows_select_into) my_yyabort_error((ER_VIEW_SELECT_CLAUSE, MYF(0), "INTO")); } -#line 32862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32856 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1715: -#line 11526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11520 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->uncacheable(UNCACHEABLE_SIDEEFFECT); @@ -32872,17 +32866,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); new (thd->mem_root) select_export(thd, lex->exchange))) MYSQL_YYABORT; } -#line 32876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32870 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1716: -#line 11536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11530 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->exchange->cs= (yyvsp[0].charset); } -#line 32882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1718: -#line 11539 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11533 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (!lex->describe) @@ -32895,60 +32889,60 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 32899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1719: -#line 11552 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11546 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->uncacheable(UNCACHEABLE_SIDEEFFECT); } -#line 32907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1720: -#line 11563 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11557 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_DO; mysql_init_select(lex); } -#line 32917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1721: -#line 11569 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11563 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->insert_list= (yyvsp[0].item_list); } -#line 32925 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32919 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1722: -#line 11580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11574 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->set_command(SQLCOM_DROP_TABLE, (yyvsp[-2].num), (yyvsp[0].object_ddl_options)); YYPS->m_lock_type= TL_UNLOCK; YYPS->m_mdl_type= MDL_EXCLUSIVE; } -#line 32936 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1723: -#line 11587 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32936 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1724: -#line 11588 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1725: -#line 11589 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_drop *ad= (new (thd->mem_root) @@ -32965,21 +32959,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MDL_SHARED_UPGRADABLE)) MYSQL_YYABORT; } -#line 32969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1726: -#line 11606 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->set_command(SQLCOM_DROP_DB, (yyvsp[-1].object_ddl_options)); lex->name= (yyvsp[0].lex_str); } -#line 32979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1727: -#line 11612 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11606 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; sp_name *spname; @@ -32994,11 +32988,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); spname->init_qname(thd); lex->spname= spname; } -#line 32998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1728: -#line 11627 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11621 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; LEX_STRING db= {0, 0}; @@ -33014,11 +33008,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); spname->init_qname(thd); lex->spname= spname; } -#line 33018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1729: -#line 11643 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11637 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->sphead) @@ -33026,90 +33020,90 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->set_command(SQLCOM_DROP_PROCEDURE, (yyvsp[-1].object_ddl_options)); lex->spname= (yyvsp[0].spname); } -#line 33030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1730: -#line 11651 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11645 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_command(SQLCOM_DROP_USER, (yyvsp[-2].object_ddl_options)); } -#line 33038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1731: -#line 11655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11649 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_command(SQLCOM_DROP_ROLE, (yyvsp[-2].object_ddl_options)); } -#line 33046 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33040 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1732: -#line 11659 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11653 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->set_command(SQLCOM_DROP_VIEW, (yyvsp[0].object_ddl_options)); YYPS->m_lock_type= TL_UNLOCK; YYPS->m_mdl_type= MDL_EXCLUSIVE; } -#line 33057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33051 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1733: -#line 11666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1734: -#line 11668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->spname= (yyvsp[0].spname); Lex->set_command(SQLCOM_DROP_EVENT, (yyvsp[-1].object_ddl_options)); } -#line 33072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1735: -#line 11673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->set_command(SQLCOM_DROP_TRIGGER, (yyvsp[-1].object_ddl_options)); lex->spname= (yyvsp[0].spname); } -#line 33082 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33076 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1736: -#line 11679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= DROP_TABLESPACE; } -#line 33091 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1737: -#line 11684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11678 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= DROP_LOGFILE_GROUP; } -#line 33100 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33094 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1738: -#line 11689 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11683 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_command(SQLCOM_DROP_SERVER, (yyvsp[-1].object_ddl_options)); Lex->server_options.reset((yyvsp[0].lex_str)); } -#line 33109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1741: -#line 11702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_UPDATING, @@ -33117,11 +33111,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_mdl_type)) MYSQL_YYABORT; } -#line 33121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1742: -#line 11713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING, @@ -33131,11 +33125,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[0].string_list))) MYSQL_YYABORT; } -#line 33135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1745: -#line 11731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11725 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_UPDATING | TL_OPTION_ALIAS, @@ -33143,109 +33137,109 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_mdl_type)) MYSQL_YYABORT; } -#line 33147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1746: -#line 11742 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11736 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_exists= FALSE; (yyval.num)= 0; } -#line 33156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1747: -#line 11747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_exists= TRUE; (yyval.num)= 1; } -#line 33165 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33159 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1748: -#line 11755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11749 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.object_ddl_options).set(DDL_options_st::OPT_NONE); } -#line 33173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1749: -#line 11759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.object_ddl_options).set(DDL_options_st::OPT_IF_EXISTS); } -#line 33181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1750: -#line 11765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 33187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1751: -#line 11766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= HA_LEX_CREATE_TMP_TABLE; } -#line 33193 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1752: -#line 11774 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_INSERT; lex->duplicates= DUP_ERROR; mysql_init_select(lex); } -#line 33204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1753: -#line 11782 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_lock_for_tables((yyvsp[-2].lock_type)); Lex->current_select= &Lex->select_lex; } -#line 33213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1754: -#line 11787 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1755: -#line 11792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_REPLACE; lex->duplicates= DUP_REPLACE; mysql_init_select(lex); } -#line 33230 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33224 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1756: -#line 11799 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_lock_for_tables((yyvsp[-1].lock_type)); Lex->current_select= &Lex->select_lex; } -#line 33239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1757: -#line 11804 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11798 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1758: -#line 11809 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* If it is SP we do not allow insert optimisation when result of @@ -33254,17 +33248,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ (yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT); } -#line 33258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1759: -#line 11817 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11811 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; } -#line 33264 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1760: -#line 11819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11813 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->keyword_delayed_begin_offset= (uint)(YYLIP->get_tok_start() - thd->query()); @@ -33272,23 +33266,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYLIP->yyLength() + 1; (yyval.lock_type)= TL_WRITE_DELAYED; } -#line 33276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1761: -#line 11826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= TL_WRITE; } -#line 33282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1762: -#line 11830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= (yyvsp[0].lock_type); } -#line 33288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1763: -#line 11832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->keyword_delayed_begin_offset= (uint)(YYLIP->get_tok_start() - thd->query()); @@ -33296,222 +33290,222 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYLIP->yyLength() + 1; (yyval.lock_type)= TL_WRITE_DELAYED; } -#line 33300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1764: -#line 11842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1765: -#line 11843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33312 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1766: -#line 11848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->field_list.empty(); lex->many_values.empty(); lex->insert_list=0; } -#line 33323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33317 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1767: -#line 11856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1768: -#line 11857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11851 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1769: -#line 11858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1770: -#line 11860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11854 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (!(lex->insert_list= new (thd->mem_root) List_item) || lex->many_values.push_back(lex->insert_list, thd->mem_root)) MYSQL_YYABORT; } -#line 33352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1772: -#line 11871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); } -#line 33358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1773: -#line 11872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11866 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); } -#line 33364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1774: -#line 11876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1775: -#line 11877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1776: -#line 11879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_braces(0);} -#line 33382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1777: -#line 11880 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11874 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1778: -#line 11882 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_braces(1);} -#line 33394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1779: -#line 11883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1784: -#line 11898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->field_list.push_back((yyvsp[-2].item), thd->mem_root) || lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)) MYSQL_YYABORT; } -#line 33411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1785: -#line 11907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1786: -#line 11908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1787: -#line 11912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1788: -#line 11913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1789: -#line 11918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!(Lex->insert_list= new (thd->mem_root) List_item)) MYSQL_YYABORT; } -#line 33444 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33438 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1790: -#line 11923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->many_values.push_back(lex->insert_list, thd->mem_root)) MYSQL_YYABORT; } -#line 33454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33448 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1791: -#line 11931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1793: -#line 11937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)) MYSQL_YYABORT; } -#line 33469 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1794: -#line 11942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)) MYSQL_YYABORT; } -#line 33478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1795: -#line 11949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item);} -#line 33484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1796: -#line 11951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_default_value(thd, Lex->current_context()); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 33494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1798: -#line 11960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->duplicates= DUP_UPDATE; } -#line 33500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1800: -#line 11968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; mysql_init_select(lex); lex->sql_command= SQLCOM_UPDATE; lex->duplicates= DUP_ERROR; } -#line 33511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33505 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1801: -#line 11976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->select_lex.table_list.elements > 1) @@ -33530,49 +33524,49 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ Select->set_lock_for_tables((yyvsp[-4].lock_type)); } -#line 33534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1802: -#line 11994 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1805: -#line 12004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_item_to_list(thd, (yyvsp[-2].item)) || add_value_to_list(thd, (yyvsp[0].item))) MYSQL_YYABORT; } -#line 33549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1808: -#line 12017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->update_list.push_back((yyvsp[-2].item), thd->mem_root) || lex->value_list.push_back((yyvsp[0].item), thd->mem_root)) MYSQL_YYABORT; } -#line 33560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1809: -#line 12026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= TL_WRITE_DEFAULT; } -#line 33566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1810: -#line 12027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12021 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; } -#line 33572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1811: -#line 12034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_DELETE; @@ -33583,11 +33577,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->ignore= 0; lex->select_lex.init_order(); } -#line 33587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1813: -#line 12049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING, YYPS->m_lock_type, @@ -33598,61 +33592,61 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_lock_type= TL_READ_DEFAULT; YYPS->m_mdl_type= MDL_SHARED_READ; } -#line 33602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33596 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1814: -#line 12060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1815: -#line 12061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33614 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1816: -#line 12063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { mysql_init_multi_delete(Lex); YYPS->m_lock_type= TL_READ_DEFAULT; YYPS->m_mdl_type= MDL_SHARED_READ; } -#line 33624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1817: -#line 12069 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (multi_delete_set_locks_and_link_aux_tables(Lex)) MYSQL_YYABORT; } -#line 33633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1818: -#line 12074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { mysql_init_multi_delete(Lex); YYPS->m_lock_type= TL_READ_DEFAULT; YYPS->m_mdl_type= MDL_SHARED_READ; } -#line 33643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1819: -#line 12080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (multi_delete_set_locks_and_link_aux_tables(Lex)) MYSQL_YYABORT; } -#line 33652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1824: -#line 12098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Table_ident *ti= new (thd->mem_root) Table_ident((yyvsp[-1].lex_str)); if (ti == NULL) @@ -33665,11 +33659,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_mdl_type)) MYSQL_YYABORT; } -#line 33669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1825: -#line 12111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Table_ident *ti= new (thd->mem_root) Table_ident(thd, (yyvsp[-3].lex_str), (yyvsp[-1].lex_str), 0); if (ti == NULL) @@ -33682,53 +33676,53 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_mdl_type)) MYSQL_YYABORT; } -#line 33686 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33680 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1826: -#line 12126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33692 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33686 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1827: -#line 12127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33692 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1828: -#line 12131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1829: -#line 12132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33710 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1830: -#line 12136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->options|= OPTION_QUICK; } -#line 33716 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33710 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1831: -#line 12137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { YYPS->m_lock_type= TL_WRITE_LOW_PRIORITY; } -#line 33722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33716 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1832: -#line 12138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ignore= 1; } -#line 33728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1833: -#line 12143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= Lex; lex->sql_command= SQLCOM_TRUNCATE; @@ -33739,11 +33733,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_lock_type= TL_WRITE; YYPS->m_mdl_type= MDL_EXCLUSIVE; } -#line 33743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1834: -#line 12154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); @@ -33751,99 +33745,99 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 33755 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1841: -#line 12178 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_CPU; } -#line 33763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1842: -#line 12182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_MEMORY; } -#line 33771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1843: -#line 12186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_BLOCK_IO; } -#line 33779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1844: -#line 12190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_CONTEXT; } -#line 33787 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33781 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1845: -#line 12194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_PAGE_FAULTS; } -#line 33795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1846: -#line 12198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_IPC; } -#line 33803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1847: -#line 12202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_SWAPS; } -#line 33811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33805 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1848: -#line 12206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12200 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_SOURCE; } -#line 33819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1849: -#line 12210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_ALL; } -#line 33827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1850: -#line 12217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_query_id= 0; } -#line 33835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33829 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1851: -#line 12221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_query_id= atoi((yyvsp[0].lex_str).str); } -#line 33843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1852: -#line 12230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->wild=0; @@ -33852,30 +33846,30 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->current_select->parsing_place= SELECT_LIST; lex->create_info.init(); } -#line 33856 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33850 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1853: -#line 12239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= NO_MATTER; } -#line 33864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1854: -#line 12246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_DATABASES; if (prepare_schema_table(thd, lex, 0, SCH_SCHEMATA)) MYSQL_YYABORT; } -#line 33875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1855: -#line 12253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_TABLES; @@ -33883,11 +33877,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES)) MYSQL_YYABORT; } -#line 33887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33881 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1856: -#line 12261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_TRIGGERS; @@ -33895,11 +33889,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_TRIGGERS)) MYSQL_YYABORT; } -#line 33899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1857: -#line 12269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_EVENTS; @@ -33907,11 +33901,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_EVENTS)) MYSQL_YYABORT; } -#line 33911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33905 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1858: -#line 12277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_TABLE_STATUS; @@ -33919,11 +33913,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_TABLES)) MYSQL_YYABORT; } -#line 33923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1859: -#line 12285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12279 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_OPEN_TABLES; @@ -33931,55 +33925,55 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES)) MYSQL_YYABORT; } -#line 33935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1860: -#line 12293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_PLUGINS; if (prepare_schema_table(thd, lex, 0, SCH_PLUGINS)) MYSQL_YYABORT; } -#line 33946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1861: -#line 12300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ident= (yyvsp[0].lex_str); Lex->sql_command= SQLCOM_SHOW_PLUGINS; if (prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)) MYSQL_YYABORT; } -#line 33957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1862: -#line 12307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_PLUGINS; if (prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)) MYSQL_YYABORT; } -#line 33967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33961 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1863: -#line 12313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.db_type= (yyvsp[-1].db_type); } -#line 33973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1864: -#line 12315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.db_type= NULL; } -#line 33979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1865: -#line 12317 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_FIELDS; @@ -33988,45 +33982,45 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_COLUMNS)) MYSQL_YYABORT; } -#line 33992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1866: -#line 12326 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12320 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_BINLOGS; } -#line 34000 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33994 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1867: -#line 12330 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12324 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_SLAVE_HOSTS; } -#line 34008 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1868: -#line 12334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS; } -#line 34017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34011 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1870: -#line 12340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS; } -#line 34026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34020 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1872: -#line 12345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12339 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_KEYS; @@ -34035,90 +34029,90 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_STATISTICS)) MYSQL_YYABORT; } -#line 34039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1873: -#line 12354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES; if (prepare_schema_table(thd, lex, 0, SCH_ENGINES)) MYSQL_YYABORT; } -#line 34050 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1874: -#line 12361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_AUTHORS; } -#line 34059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1875: -#line 12366 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12360 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_CONTRIBUTORS; } -#line 34068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1876: -#line 12371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_PRIVILEGES; } -#line 34077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1877: -#line 12376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (void) create_select_for_variable("warning_count"); } -#line 34083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1878: -#line 12378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12372 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (void) create_select_for_variable("error_count"); } -#line 34089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1879: -#line 12380 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12374 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_WARNS;} -#line 34095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1880: -#line 12382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_ERRORS;} -#line 34101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1881: -#line 12384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_PROFILES; } -#line 34107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1882: -#line 12386 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12380 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_PROFILE; if (prepare_schema_table(thd, lex, NULL, SCH_PROFILES) != 0) MYSQL_YYABORT; } -#line 34118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34112 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1883: -#line 12393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_STATUS; @@ -34126,17 +34120,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_SESSION_STATUS)) MYSQL_YYABORT; } -#line 34130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1884: -#line 12401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;} -#line 34136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1885: -#line 12403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_VARIABLES; @@ -34144,63 +34138,63 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_SESSION_VARIABLES)) MYSQL_YYABORT; } -#line 34148 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34142 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1886: -#line 12411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_CHARSETS; if (prepare_schema_table(thd, lex, 0, SCH_CHARSETS)) MYSQL_YYABORT; } -#line 34159 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34153 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1887: -#line 12418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_COLLATIONS; if (prepare_schema_table(thd, lex, 0, SCH_COLLATIONS)) MYSQL_YYABORT; } -#line 34170 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34164 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1888: -#line 12425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_GRANTS; if (!(Lex->grant_user= (LEX_USER*)thd->alloc(sizeof(LEX_USER)))) MYSQL_YYABORT; Lex->grant_user->user= current_user_and_current_role; } -#line 34181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1889: -#line 12432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_GRANTS; lex->grant_user=(yyvsp[-1].lex_user); } -#line 34191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1890: -#line 12438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_command(SQLCOM_SHOW_CREATE_DB, (yyvsp[-1].object_ddl_options)); Lex->name= (yyvsp[0].lex_str); } -#line 34200 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34194 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1891: -#line 12443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command = SQLCOM_SHOW_CREATE; @@ -34208,11 +34202,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->create_info.storage_media= HA_SM_DEFAULT; } -#line 34212 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34206 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1892: -#line 12451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12445 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command = SQLCOM_SHOW_CREATE; @@ -34220,140 +34214,140 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->only_view= 1; } -#line 34224 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34218 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1893: -#line 12459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_MASTER_STAT; } -#line 34232 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34226 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1894: -#line 12463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; Lex->verbose= 1; } -#line 34241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1895: -#line 12468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; lex->mi.connection_name= null_lex_str; lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; lex->verbose= 0; } -#line 34252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1896: -#line 12475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; Lex->verbose= 0; } -#line 34261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1897: -#line 12480 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command = SQLCOM_SHOW_CREATE_PROC; lex->spname= (yyvsp[0].spname); } -#line 34272 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1898: -#line 12487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command = SQLCOM_SHOW_CREATE_FUNC; lex->spname= (yyvsp[0].spname); } -#line 34283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1899: -#line 12494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12488 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_CREATE_TRIGGER; lex->spname= (yyvsp[0].spname); } -#line 34293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1900: -#line 12500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_STATUS_PROC; if (prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)) MYSQL_YYABORT; } -#line 34304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34298 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1901: -#line 12507 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_STATUS_FUNC; if (prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)) MYSQL_YYABORT; } -#line 34315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1902: -#line 12514 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12508 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_PROC_CODE; Lex->spname= (yyvsp[0].spname); } -#line 34324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34318 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1903: -#line 12519 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_FUNC_CODE; Lex->spname= (yyvsp[0].spname); } -#line 34333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1904: -#line 12524 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12518 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->spname= (yyvsp[0].spname); Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT; } -#line 34342 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34336 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1905: -#line 12529 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12523 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_EXPLAIN; if (prepare_schema_table(thd, Lex, 0, SCH_EXPLAIN)) MYSQL_YYABORT; add_value_to_list(thd, (yyvsp[0].item)); } -#line 34353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1906: -#line 12536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12530 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; bool in_plugin; @@ -34372,83 +34366,83 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (make_schema_select(thd, Lex->current_select, table)) MYSQL_YYABORT; } -#line 34376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1907: -#line 12558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12552 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; } -#line 34382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1908: -#line 12560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; } -#line 34388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1909: -#line 12562 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; } -#line 34394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1914: -#line 12576 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12570 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.simple_string)= 0; } -#line 34400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1915: -#line 12577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.simple_string)= (yyvsp[0].lex_str).str; } -#line 34406 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1916: -#line 12581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12575 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->verbose=0; } -#line 34412 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34406 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1917: -#line 12582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12576 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->verbose=1; } -#line 34418 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34412 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1920: -#line 12591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12585 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->mi.log_file_name = 0; } -#line 34424 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34418 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1921: -#line 12592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12586 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->mi.log_file_name = (yyvsp[0].lex_str).str; } -#line 34430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34424 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1922: -#line 12596 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12590 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->mi.pos = 4; /* skip magic number */ } -#line 34436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1923: -#line 12597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->mi.pos = (yyvsp[0].ulonglong_number); } -#line 34442 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1924: -#line 12601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12595 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.simple_string)= 0; } -#line 34448 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34442 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1925: -#line 12603 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->wild= new (thd->mem_root) String((yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, system_charset_info); @@ -34456,22 +34450,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; (yyval.simple_string)= (yyvsp[-1].simple_string); } -#line 34460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1926: -#line 12611 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->where= normalize_cond(thd, (yyvsp[0].item)); if ((yyvsp[0].item)) (yyvsp[0].item)->top_level_item(); (yyval.simple_string)= (yyvsp[-1].simple_string); } -#line 34471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1927: -#line 12622 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; mysql_init_select(lex); @@ -34482,66 +34476,66 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, (yyvsp[0].table), SCH_COLUMNS)) MYSQL_YYABORT; } -#line 34486 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34480 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1928: -#line 12633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12627 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= NO_MATTER; } -#line 34494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1929: -#line 12637 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12631 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->describe|= DESCRIBE_NORMAL; } -#line 34500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1930: -#line 12639 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->select_lex.options|= SELECT_DESCRIBE; } -#line 34509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1938: -#line 12660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12654 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->analyze_stmt= true; } -#line 34517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1939: -#line 12666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->describe|= DESCRIBE_EXTENDED; } -#line 34523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1940: -#line 12667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->describe|= DESCRIBE_PARTITIONS; } -#line 34529 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1941: -#line 12668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34529 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1942: -#line 12672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1943: -#line 12674 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!my_strcasecmp(system_charset_info, (yyvsp[0].lex_str).str, "JSON")) Lex->explain_json= true; @@ -34550,23 +34544,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0), (yyvsp[0].lex_str).str)); } -#line 34554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1944: -#line 12685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1945: -#line 12686 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12680 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->wild= (yyvsp[0].string); } -#line 34566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1946: -#line 12688 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12682 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->wild= new (thd->mem_root) String((const char*) (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, @@ -34574,28 +34568,28 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (Lex->wild == NULL) MYSQL_YYABORT; } -#line 34578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1947: -#line 12702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_FLUSH; lex->type= 0; lex->no_write_to_binlog= (yyvsp[0].num); } -#line 34589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1948: -#line 12709 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12703 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1949: -#line 12714 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12708 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_TABLES; /* @@ -34605,23 +34599,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_lock_type= TL_READ_NO_INSERT; YYPS->m_mdl_type= MDL_SHARED_HIGH_PRIO; } -#line 34609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1950: -#line 12724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1952: -#line 12729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12723 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1953: -#line 12731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12725 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { TABLE_LIST *tables= Lex->query_tables; for (; tables; tables= tables->next_global) @@ -34631,17 +34625,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); tables->open_type= OT_BASE_ONLY; /* Ignore temporary tables. */ } } -#line 34635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1954: -#line 12744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12738 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_READ_LOCK | (yyvsp[0].num); } -#line 34641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1955: -#line 12746 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12740 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->query_tables == NULL) // Table list can't be empty { @@ -34650,53 +34644,53 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } Lex->type|= REFRESH_FOR_EXPORT; } -#line 34654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1956: -#line 12753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1958: -#line 12759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1959: -#line 12764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_ERROR_LOG; } -#line 34672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1960: -#line 12766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_ENGINE_LOG; } -#line 34678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1961: -#line 12768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_GENERAL_LOG; } -#line 34684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1962: -#line 12770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_SLOW_LOG; } -#line 34690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1963: -#line 12772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_BINARY_LOG; } -#line 34696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1964: -#line 12774 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->type & REFRESH_RELAY_LOG) @@ -34704,44 +34698,44 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->type|= REFRESH_RELAY_LOG; lex->relay_log_connection_name= lex->mi.connection_name; } -#line 34708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1965: -#line 12782 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_QUERY_CACHE_FREE; } -#line 34714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1966: -#line 12784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12778 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_HOSTS; } -#line 34720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1967: -#line 12786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12780 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_GRANT; } -#line 34726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1968: -#line 12788 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12782 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_LOG; Lex->relay_log_connection_name= empty_lex_str; } -#line 34735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1969: -#line 12793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12787 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_STATUS; } -#line 34741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1970: -#line 12795 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12789 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->type & REFRESH_SLAVE) @@ -34749,29 +34743,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->type|= REFRESH_SLAVE; lex->reset_slave_info.all= false; } -#line 34753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1971: -#line 12803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_MASTER; } -#line 34759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1972: -#line 12805 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12799 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_DES_KEY_FILE; } -#line 34765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1973: -#line 12807 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_USER_RESOURCES; } -#line 34771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1974: -#line 12809 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_GENERIC; ST_SCHEMA_TABLE *table= find_schema_table(thd, (yyvsp[-1].lex_str).str); @@ -34784,138 +34778,138 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); thd->memdup(&(yyvsp[-1].lex_str), sizeof(LEX_STRING)), thd->mem_root); } -#line 34788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1975: -#line 12824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12818 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1976: -#line 12825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34800 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1977: -#line 12829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12823 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.num)= 0;} -#line 34806 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34800 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1978: -#line 12830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.num)= REFRESH_CHECKPOINT; } -#line 34812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34806 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1979: -#line 12834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_RESET; lex->type=0; } -#line 34821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1980: -#line 12839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1983: -#line 12848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_SLAVE; } -#line 34833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1984: -#line 12850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 34839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1985: -#line 12852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_MASTER; Lex->next_binlog_file_number= 0; } -#line 34848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34842 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1987: -#line 12857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12851 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_QUERY_CACHE;} -#line 34854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1988: -#line 12861 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12855 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->reset_slave_info.all= false; } -#line 34860 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1989: -#line 12862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->reset_slave_info.all= true; } -#line 34866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34860 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1990: -#line 12866 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34872 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1991: -#line 12868 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->next_binlog_file_number = (yyvsp[0].ulong_num); } -#line 34880 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34874 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1992: -#line 12875 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->type=0; lex->sql_command = SQLCOM_PURGE; } -#line 34890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1993: -#line 12881 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12875 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1995: -#line 12890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->to_log = (yyvsp[0].lex_str).str; } -#line 34904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1996: -#line 12894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12888 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->value_list.empty(); lex->value_list.push_front((yyvsp[0].item), thd->mem_root); lex->sql_command= SQLCOM_PURGE_BEFORE; } -#line 34915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1997: -#line 12906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->value_list.empty(); @@ -34923,97 +34917,97 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_KILL; lex->kill_type= KILL_TYPE_ID; } -#line 34927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1998: -#line 12914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->kill_signal= (killed_state) ((yyvsp[-2].num) | (yyvsp[-1].num)); } -#line 34935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1999: -#line 12920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (int) KILL_HARD_BIT; } -#line 34941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2000: -#line 12921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (int) KILL_HARD_BIT; } -#line 34947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2001: -#line 12922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 34953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2002: -#line 12925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (int) KILL_CONNECTION; } -#line 34959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2003: -#line 12926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (int) KILL_CONNECTION; } -#line 34965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2004: -#line 12927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (int) KILL_QUERY; } -#line 34971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2005: -#line 12929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (int) KILL_QUERY; Lex->kill_type= KILL_TYPE_QUERY; } -#line 34980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34974 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2006: -#line 12937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->value_list.push_front((yyval.item), thd->mem_root); } -#line 34988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34982 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2007: -#line 12941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root); Lex->kill_type= KILL_TYPE_USER; } -#line 34997 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34991 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2008: -#line 12949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHUTDOWN; } -#line 35003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34997 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2009: -#line 12956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command=SQLCOM_CHANGE_DB; lex->select_lex.db= (yyvsp[0].lex_str).str; } -#line 35013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2010: -#line 12967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; @@ -35024,11 +35018,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 35028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2011: -#line 12978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_LOAD; @@ -35038,11 +35032,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!(lex->exchange= new (thd->mem_root) sql_exchange((yyvsp[0].lex_str).str, 0, (yyvsp[-5].filetype)))) MYSQL_YYABORT; } -#line 35042 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2012: -#line 12988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING, @@ -35052,53 +35046,53 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->update_list.empty(); lex->value_list.empty(); } -#line 35056 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35050 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2013: -#line 12998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->exchange->cs= (yyvsp[0].charset); } -#line 35062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35056 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2014: -#line 13002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 35068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2015: -#line 13006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.filetype)= FILETYPE_CSV; } -#line 35074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2016: -#line 13007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.filetype)= FILETYPE_XML; } -#line 35080 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2017: -#line 13011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)=0;} -#line 35086 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35080 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2018: -#line 13012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)=1;} -#line 35092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35086 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2019: -#line 13016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= TL_WRITE_DEFAULT; } -#line 35098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2020: -#line 13018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Ignore this option in SP to avoid problem with query cache and @@ -35106,182 +35100,182 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ (yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT); } -#line 35110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35104 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2021: -#line 13025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; } -#line 35116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2022: -#line 13029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->duplicates=DUP_ERROR; } -#line 35122 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2023: -#line 13030 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->duplicates=DUP_REPLACE; } -#line 35128 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35122 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2024: -#line 13031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ignore= 1; } -#line 35134 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35128 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2029: -#line 13046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->field_term= (yyvsp[0].string); } -#line 35143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2030: -#line 13051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; DBUG_ASSERT(lex->exchange != 0); lex->exchange->enclosed= (yyvsp[0].string); lex->exchange->opt_enclosed= 1; } -#line 35154 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35148 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2031: -#line 13058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->enclosed= (yyvsp[0].string); } -#line 35163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2032: -#line 13063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->escaped= (yyvsp[0].string); } -#line 35172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35166 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2037: -#line 13081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->line_term= (yyvsp[0].string); } -#line 35181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2038: -#line 13086 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->line_start= (yyvsp[0].string); } -#line 35190 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35184 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2039: -#line 13093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 35196 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35190 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2040: -#line 13095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->exchange->line_term = (yyvsp[0].string); } -#line 35202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35196 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2042: -#line 13100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->skip_lines= atol((yyvsp[-1].lex_str).str); } -#line 35211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2043: -#line 13107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 35217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2044: -#line 13108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 35223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2045: -#line 13112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 35229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2046: -#line 13113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 35235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2047: -#line 13114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 35241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2048: -#line 13119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); } -#line 35247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2049: -#line 13121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); } -#line 35253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2050: -#line 13125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.item)= (yyvsp[0].item);} -#line 35259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2051: -#line 13127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_user_var_as_out_param(thd, (yyvsp[0].lex_str)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2052: -#line 13135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 35275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2053: -#line 13136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 35281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2056: -#line 13146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->update_list.push_back((yyvsp[-4].item), thd->mem_root) || @@ -35289,11 +35283,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; (yyvsp[-1].item)->set_name_no_truncate((yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset()); } -#line 35293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2057: -#line 13159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX_STRING tmp; CHARSET_INFO *cs_con= thd->variables.collation_connection; @@ -35317,11 +35311,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2058: -#line 13183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { uint repertoire= Lex->text_string_is_7bit ? MY_REPERTOIRE_ASCII : MY_REPERTOIRE_UNICODE30; @@ -35333,22 +35327,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2059: -#line 13195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_string_with_introducer(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, (yyvsp[-1].charset)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35348 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35342 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2060: -#line 13202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_string* item= (Item_string*) (yyvsp[-1].item); item->append((yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); @@ -35364,11 +35358,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[0].lex_str).length); } } -#line 35368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2061: -#line 13221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.string)= new (thd->mem_root) String((yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, @@ -35376,17 +35370,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.string) == NULL) MYSQL_YYABORT; } -#line 35380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2062: -#line 13228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13222 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.string)= (yyvsp[0].string); } -#line 35386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2063: -#line 13234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *tmp= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); @@ -35399,11 +35393,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); tmp->quick_fix_field(); (yyval.string)= tmp->val_str((String*) 0); } -#line 35403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2064: -#line 13247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *tmp= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); @@ -35412,11 +35406,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); tmp->quick_fix_field(); (yyval.string)= tmp->val_str((String*) 0); } -#line 35416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2065: -#line 13256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *tmp= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); @@ -35429,11 +35423,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); tmp->quick_fix_field(); (yyval.string)= tmp->val_str((String*) 0); } -#line 35433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2066: -#line 13272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -35447,50 +35441,50 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!((yyval.item_param)= item) || lex->param_list.push_back(item, thd->mem_root)) my_yyabort_error((ER_OUT_OF_RESOURCES, MYF(0))); } -#line 35451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2067: -#line 13288 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item) = (yyvsp[0].item); } -#line 35457 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2068: -#line 13289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13283 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item) = (yyvsp[0].item_num); } -#line 35463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35457 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2069: -#line 13291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[0].item_num)->max_length++; (yyval.item)= (yyvsp[0].item_num)->neg(thd); } -#line 35472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35466 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2070: -#line 13298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item) = (yyvsp[0].item); } -#line 35478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2071: -#line 13299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item) = (yyvsp[0].item_num); } -#line 35484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2072: -#line 13300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 35490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2073: -#line 13302 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13296 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* For the digest computation, in this context only, @@ -35504,61 +35498,61 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; YYLIP->next_state= MY_LEX_OPERATOR_OR_IDENT; } -#line 35508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2074: -#line 13316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_int(thd, (char*) "FALSE",0,1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2075: -#line 13322 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_int(thd, (char*) "TRUE",1,1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35522 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2076: -#line 13328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13322 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2077: -#line 13334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2078: -#line 13340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35558 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2079: -#line 13346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_string_with_introducer *item_str; /* @@ -35573,11 +35567,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.item)= item_str; } -#line 35577 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35571 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2080: -#line 13364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13358 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.item_num)= new (thd->mem_root) @@ -35587,11 +35581,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item_num) == NULL) MYSQL_YYABORT; } -#line 35591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2081: -#line 13374 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13368 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.item_num)= new (thd->mem_root) @@ -35601,21 +35595,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item_num) == NULL) MYSQL_YYABORT; } -#line 35605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2082: -#line 13384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_num)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item_num) == NULL) MYSQL_YYABORT; } -#line 35615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2083: -#line 13390 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_num)= new (thd->mem_root) Item_decimal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, thd->charset()); @@ -35624,11 +35618,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 35628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2084: -#line 13399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_num)= new (thd->mem_root) Item_float(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if (((yyval.item_num) == NULL) || (thd->is_error())) @@ -35636,53 +35630,53 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 35640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2085: -#line 13411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, YYCSCL, MYSQL_TYPE_DATE, true))) MYSQL_YYABORT; } -#line 35650 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2086: -#line 13417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, YYCSCL, MYSQL_TYPE_TIME, true))) MYSQL_YYABORT; } -#line 35660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2087: -#line 13423 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, YYCSCL, MYSQL_TYPE_DATETIME, true))) MYSQL_YYABORT; } -#line 35670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2088: -#line 13438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=(yyvsp[0].item); } -#line 35676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2089: -#line 13439 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=(yyvsp[0].item); } -#line 35682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2090: -#line 13444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; (yyval.item)= new (thd->mem_root) Item_field(thd, Lex->current_context(), @@ -35691,11 +35685,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; sel->with_wild++; } -#line 35695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2091: -#line 13453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13447 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; const char* schema= thd->client_capabilities & CLIENT_NO_SCHEMA ? @@ -35707,17 +35701,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; sel->with_wild++; } -#line 35711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2092: -#line 13467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13461 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=(yyvsp[0].item); } -#line 35717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2093: -#line 13472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13466 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -35760,17 +35754,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 35764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35758 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2094: -#line 13514 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13508 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 35770 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2095: -#line 13519 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel=Select; if ((sel->parsing_place != IN_HAVING) || @@ -35787,17 +35781,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2096: -#line 13535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13529 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 35797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2097: -#line 13540 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13534 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; @@ -35869,11 +35863,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 35873 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35867 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2098: -#line 13612 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13606 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; SELECT_LEX *sel= lex->current_select; @@ -35897,11 +35891,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35895 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2099: -#line 13636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; SELECT_LEX *sel= lex->current_select; @@ -35928,17 +35922,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35932 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35926 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2100: -#line 13665 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13659 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str);} -#line 35938 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35932 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2101: -#line 13667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { TABLE_LIST *table= Select->table_list.first; if (my_strcasecmp(table_alias_charset, (yyvsp[-4].lex_str).str, table->db)) @@ -35948,96 +35942,96 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].lex_str).str)); (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 35952 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2102: -#line 13677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { TABLE_LIST *table= Select->table_list.first; if (my_strcasecmp(table_alias_charset, (yyvsp[-2].lex_str).str, table->alias)) my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].lex_str).str)); (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 35963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2103: -#line 13683 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str);} -#line 35969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2104: -#line 13688 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13682 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)= new (thd->mem_root) Table_ident((yyvsp[0].lex_str)); if ((yyval.table) == NULL) MYSQL_YYABORT; } -#line 35979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2105: -#line 13694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13688 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)= new (thd->mem_root) Table_ident(thd, (yyvsp[-2].lex_str), (yyvsp[0].lex_str), 0); if ((yyval.table) == NULL) MYSQL_YYABORT; } -#line 35989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2106: -#line 13700 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* For Delphi */ (yyval.table)= new (thd->mem_root) Table_ident((yyvsp[0].lex_str)); if ((yyval.table) == NULL) MYSQL_YYABORT; } -#line 36000 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35994 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2107: -#line 13710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13704 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)= new (thd->mem_root) Table_ident((yyvsp[-1].lex_str)); if ((yyval.table) == NULL) MYSQL_YYABORT; } -#line 36010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2108: -#line 13716 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)= new (thd->mem_root) Table_ident(thd, (yyvsp[-3].lex_str), (yyvsp[-1].lex_str), 0); if ((yyval.table) == NULL) MYSQL_YYABORT; } -#line 36020 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36014 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2109: -#line 13725 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX_STRING db={(char*) any_db,3}; (yyval.table)= new (thd->mem_root) Table_ident(thd, db, (yyvsp[0].lex_str), 0); if ((yyval.table) == NULL) MYSQL_YYABORT; } -#line 36031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2110: -#line 13734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13728 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= (yyvsp[0].lex_str); } -#line 36037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2111: -#line 13736 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13730 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (thd->charset_is_system_charset) { @@ -36062,11 +36056,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 36066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36060 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2112: -#line 13764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (thd->charset_is_system_charset) (yyval.lex_str)= (yyvsp[0].lex_str); @@ -36077,11 +36071,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 36081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36075 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2113: -#line 13778 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (thd->charset_is_collation_connection) (yyval.lex_str)= (yyvsp[0].lex_str); @@ -36092,11 +36086,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 36096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2114: -#line 13792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (thd->charset_is_character_set_filesystem) (yyval.lex_str)= (yyvsp[0].lex_str); @@ -36108,63 +36102,63 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 36112 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36106 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2115: -#line 13806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13800 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 36118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36112 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2116: -#line 13808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str).str= thd->strmake((yyvsp[0].symbol).str, (yyvsp[0].symbol).length); if ((yyval.lex_str).str == NULL) MYSQL_YYABORT; (yyval.lex_str).length= (yyvsp[0].symbol).length; } -#line 36129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2117: -#line 13817 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13811 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 36135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2118: -#line 13819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13813 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str).str= thd->strmake((yyvsp[0].symbol).str, (yyvsp[0].symbol).length); if ((yyval.lex_str).str == NULL) MYSQL_YYABORT; (yyval.lex_str).length= (yyvsp[0].symbol).length; } -#line 36146 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36140 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2119: -#line 13828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13822 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str);} -#line 36152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36146 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2120: -#line 13829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13823 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str);} -#line 36158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2121: -#line 13830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str);} -#line 36164 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2122: -#line 13835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) MYSQL_YYABORT; @@ -36177,11 +36171,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); system_charset_info, 0)) MYSQL_YYABORT; } -#line 36181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2123: -#line 13848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) MYSQL_YYABORT; @@ -36211,11 +36205,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.lex_user)->host= host_not_specified; } } -#line 36215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2124: -#line 13878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.lex_user)=(LEX_USER*)thd->calloc(sizeof(LEX_USER)))) MYSQL_YYABORT; @@ -36223,2241 +36217,2241 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.lex_user)->plugin= empty_lex_str; (yyval.lex_user)->auth= empty_lex_str; } -#line 36227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2127: -#line 13890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_user)->user.str != current_user.str && (yyvsp[0].lex_user)->host.str == 0) (yyvsp[0].lex_user)->host= host_not_specified; (yyval.lex_user)= (yyvsp[0].lex_user); } -#line 36237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2128: -#line 13899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13893 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2129: -#line 13900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2130: -#line 13901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2131: -#line 13902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2132: -#line 13903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13897 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2133: -#line 13904 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2134: -#line 13905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2135: -#line 13906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2136: -#line 13907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36291 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2137: -#line 13908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36297 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36291 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2138: -#line 13909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36303 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36297 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2139: -#line 13910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13904 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36303 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2140: -#line 13911 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2141: -#line 13912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2142: -#line 13913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2143: -#line 13914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2144: -#line 13915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2145: -#line 13916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2146: -#line 13917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13911 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2147: -#line 13918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36357 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2148: -#line 13919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36363 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36357 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2149: -#line 13920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36363 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2150: -#line 13921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2151: -#line 13922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36381 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2152: -#line 13923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36387 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36381 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2153: -#line 13924 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36393 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36387 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2154: -#line 13925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36399 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36393 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2155: -#line 13926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36399 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2156: -#line 13927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2157: -#line 13928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2158: -#line 13929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2159: -#line 13930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13924 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2160: -#line 13931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2161: -#line 13932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2162: -#line 13933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2163: -#line 13934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2164: -#line 13935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2165: -#line 13936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2166: -#line 13937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2167: -#line 13938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2168: -#line 13939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2169: -#line 13940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2170: -#line 13941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36495 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2171: -#line 13942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36495 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2172: -#line 13943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2173: -#line 13944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2174: -#line 13945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36519 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2175: -#line 13946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36525 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36519 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2176: -#line 13947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36531 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36525 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2177: -#line 13948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36537 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36531 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2178: -#line 13949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36537 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2179: -#line 13950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2180: -#line 13951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36555 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2181: -#line 13952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36561 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36555 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2182: -#line 13953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36567 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36561 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2183: -#line 13954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36567 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2184: -#line 13955 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2185: -#line 13956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2186: -#line 13957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2187: -#line 13958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2188: -#line 13959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2189: -#line 13969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2190: -#line 13970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2191: -#line 13971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2192: -#line 13972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2193: -#line 13973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2194: -#line 13974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2195: -#line 13975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2196: -#line 13976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2197: -#line 13977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2198: -#line 13978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2199: -#line 13979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2200: -#line 13980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2201: -#line 13981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2202: -#line 13982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2203: -#line 13983 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2204: -#line 13984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2205: -#line 13985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2206: -#line 13986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2207: -#line 13987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2208: -#line 13988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2209: -#line 13989 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13983 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2210: -#line 13990 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2211: -#line 13991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2212: -#line 13992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2213: -#line 13993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2214: -#line 13994 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2215: -#line 13995 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13989 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2216: -#line 13996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13990 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2217: -#line 13997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2218: -#line 13998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2219: -#line 13999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2220: -#line 14000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13994 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2221: -#line 14001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13995 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2222: -#line 14002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2223: -#line 14003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2224: -#line 14004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2225: -#line 14005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36825 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2226: -#line 14006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36825 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2227: -#line 14007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2228: -#line 14008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2229: -#line 14009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36849 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2230: -#line 14010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36849 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2231: -#line 14011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36861 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2232: -#line 14012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36867 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36861 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2233: -#line 14013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36873 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36867 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2234: -#line 14014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36879 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36873 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2235: -#line 14015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36879 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2236: -#line 14016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2237: -#line 14017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2238: -#line 14018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2239: -#line 14023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2240: -#line 14024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2241: -#line 14025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2242: -#line 14026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2243: -#line 14027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14021 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2244: -#line 14028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2245: -#line 14029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2246: -#line 14030 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2247: -#line 14031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2248: -#line 14032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2249: -#line 14033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2250: -#line 14034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2251: -#line 14035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36981 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2252: -#line 14036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14030 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36981 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2253: -#line 14037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2254: -#line 14038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2255: -#line 14039 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2256: -#line 14040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37011 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2257: -#line 14041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37011 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2258: -#line 14042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2259: -#line 14043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2260: -#line 14044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2261: -#line 14045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14039 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2262: -#line 14046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2263: -#line 14047 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2264: -#line 14048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2265: -#line 14049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2266: -#line 14050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2267: -#line 14051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2268: -#line 14052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2269: -#line 14053 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14047 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2270: -#line 14054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2271: -#line 14055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2272: -#line 14056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2273: -#line 14057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2274: -#line 14058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2275: -#line 14059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14053 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2276: -#line 14060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2277: -#line 14061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2278: -#line 14062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2279: -#line 14063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2280: -#line 14064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2281: -#line 14065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2282: -#line 14066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2283: -#line 14067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2284: -#line 14068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2285: -#line 14069 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2286: -#line 14070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2287: -#line 14071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2288: -#line 14072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2289: -#line 14073 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2290: -#line 14074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2291: -#line 14075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14069 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2292: -#line 14076 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2293: -#line 14077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2294: -#line 14078 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2295: -#line 14079 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14073 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2296: -#line 14080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2297: -#line 14081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2298: -#line 14082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14076 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2299: -#line 14083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2300: -#line 14084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14078 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2301: -#line 14085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14079 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2302: -#line 14086 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2303: -#line 14087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2304: -#line 14088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2305: -#line 14089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2306: -#line 14090 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2307: -#line 14091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37317 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2308: -#line 14092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14086 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37317 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2309: -#line 14093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2310: -#line 14094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2311: -#line 14095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2312: -#line 14096 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14090 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2313: -#line 14097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2314: -#line 14098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37359 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2315: -#line 14099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37359 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2316: -#line 14100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37371 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2317: -#line 14101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37371 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2318: -#line 14102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14096 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2319: -#line 14103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2320: -#line 14104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2321: -#line 14105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37401 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2322: -#line 14106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37401 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2323: -#line 14107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2324: -#line 14108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2325: -#line 14109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2326: -#line 14110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37431 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2327: -#line 14111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37431 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2328: -#line 14112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2329: -#line 14113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2330: -#line 14114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2331: -#line 14115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2332: -#line 14116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2333: -#line 14117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2334: -#line 14118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2335: -#line 14119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2336: -#line 14120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2337: -#line 14121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2338: -#line 14122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2339: -#line 14123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2340: -#line 14124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2341: -#line 14125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2342: -#line 14126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2343: -#line 14127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2344: -#line 14128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2345: -#line 14129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2346: -#line 14130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2347: -#line 14131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2348: -#line 14132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2349: -#line 14133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2350: -#line 14134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2351: -#line 14135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2352: -#line 14136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2353: -#line 14137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2354: -#line 14138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2355: -#line 14139 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2356: -#line 14140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37611 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2357: -#line 14141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37617 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37611 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2358: -#line 14142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37623 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37617 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2359: -#line 14143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37623 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2360: -#line 14144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2361: -#line 14145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14139 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2362: -#line 14146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2363: -#line 14147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2364: -#line 14148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2365: -#line 14149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2366: -#line 14150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2367: -#line 14151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2368: -#line 14152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2369: -#line 14153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2370: -#line 14154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2371: -#line 14155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2372: -#line 14156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2373: -#line 14157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2374: -#line 14158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2375: -#line 14159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2376: -#line 14160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2377: -#line 14161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2378: -#line 14162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2379: -#line 14163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2380: -#line 14164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37755 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2381: -#line 14165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37755 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2382: -#line 14166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2383: -#line 14167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2384: -#line 14168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2385: -#line 14169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2386: -#line 14170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2387: -#line 14171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2388: -#line 14172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2389: -#line 14173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2390: -#line 14174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2391: -#line 14175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2392: -#line 14176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2393: -#line 14177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2394: -#line 14178 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2395: -#line 14179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2396: -#line 14180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2397: -#line 14181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2398: -#line 14182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2399: -#line 14183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2400: -#line 14184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14178 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2401: -#line 14185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37881 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2402: -#line 14186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37881 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2403: -#line 14187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2404: -#line 14188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2405: -#line 14189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37905 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2406: -#line 14190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37905 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2407: -#line 14191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2408: -#line 14192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2409: -#line 14193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2410: -#line 14194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2411: -#line 14195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2412: -#line 14196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2413: -#line 14197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2414: -#line 14198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2415: -#line 14199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2416: -#line 14200 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2417: -#line 14201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2418: -#line 14202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2419: -#line 14203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2420: -#line 14204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2421: -#line 14205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2422: -#line 14206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14200 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2423: -#line 14207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2424: -#line 14208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2425: -#line 14209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2426: -#line 14210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2427: -#line 14211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2428: -#line 14212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38043 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2429: -#line 14213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38043 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2430: -#line 14214 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2431: -#line 14215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2432: -#line 14216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2433: -#line 14217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2434: -#line 14218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38079 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2435: -#line 14219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38079 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2436: -#line 14220 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14214 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38091 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2437: -#line 14221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38097 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38091 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2438: -#line 14222 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38097 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2439: -#line 14223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2440: -#line 14224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2441: -#line 14225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2442: -#line 14226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14220 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38127 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2443: -#line 14227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38133 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38127 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2444: -#line 14228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14222 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38139 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38133 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2445: -#line 14229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38139 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2446: -#line 14230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2447: -#line 14231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2448: -#line 14232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2449: -#line 14233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2450: -#line 14234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2451: -#line 14235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2452: -#line 14236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2453: -#line 14237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38193 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2454: -#line 14238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38199 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38193 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2455: -#line 14239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38199 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2456: -#line 14240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2457: -#line 14241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2458: -#line 14242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2459: -#line 14243 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2460: -#line 14244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2461: -#line 14245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2462: -#line 14246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2463: -#line 14247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2464: -#line 14248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2465: -#line 14249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14243 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38265 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2466: -#line 14250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38271 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38265 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2467: -#line 14251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38271 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2468: -#line 14252 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2469: -#line 14253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2470: -#line 14254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2471: -#line 14255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2472: -#line 14256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38307 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2473: -#line 14257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38313 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38307 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2474: -#line 14258 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14252 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38319 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38313 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2475: -#line 14259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38319 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2476: -#line 14260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2477: -#line 14261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2478: -#line 14262 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2479: -#line 14263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2480: -#line 14264 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14258 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2481: -#line 14265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2482: -#line 14266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2483: -#line 14267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2484: -#line 14268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14262 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2485: -#line 14269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2486: -#line 14270 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14264 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38391 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2487: -#line 14271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38391 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2488: -#line 14272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2489: -#line 14273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38409 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2490: -#line 14274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38409 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2491: -#line 14275 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2492: -#line 14276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14270 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2493: -#line 14277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2494: -#line 14278 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2495: -#line 14279 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2496: -#line 14280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2497: -#line 14281 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14275 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38457 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2498: -#line 14293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SET_OPTION; @@ -38467,17 +38461,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->autocommit= 0; sp_create_assignment_lex(thd, yychar == YYEMPTY); } -#line 38471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2499: -#line 14303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2500: -#line 14305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; mysql_init_select(lex); @@ -38485,11 +38479,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_SET_OPTION; lex->autocommit= 0; } -#line 38489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2501: -#line 14313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->table_or_sp_used()) @@ -38497,177 +38491,177 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->stmt_var_list= lex->var_list; lex->var_list.empty(); } -#line 38501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38495 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2502: -#line 14321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2505: -#line 14336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14330 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (sp_create_assignment_instr(thd, yychar == YYEMPTY)) MYSQL_YYABORT; } -#line 38516 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38510 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2507: -#line 14342 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_type= OPT_DEFAULT; } -#line 38524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2508: -#line 14346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (sp_create_assignment_instr(thd, yychar == YYEMPTY)) MYSQL_YYABORT; } -#line 38533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2509: -#line 14351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_type= (yyvsp[0].var_type); } -#line 38541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2511: -#line 14361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (sp_create_assignment_instr(thd, yychar == YYEMPTY)) MYSQL_YYABORT; } -#line 38550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2513: -#line 14367 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (sp_create_assignment_instr(thd, yychar == YYEMPTY)) MYSQL_YYABORT; } -#line 38559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2516: -#line 14381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { sp_create_assignment_lex(thd, yychar == YYEMPTY); } -#line 38567 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38561 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2517: -#line 14385 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (sp_create_assignment_instr(thd, yychar == YYEMPTY)) MYSQL_YYABORT; } -#line 38576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38570 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2518: -#line 14390 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { sp_create_assignment_lex(thd, yychar == YYEMPTY); } -#line 38584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2519: -#line 14394 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (sp_create_assignment_instr(thd, yychar == YYEMPTY)) MYSQL_YYABORT; } -#line 38593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2520: -#line 14403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_type= (yyvsp[0].var_type); } -#line 38601 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2523: -#line 14411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_GLOBAL; } -#line 38607 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38601 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2524: -#line 14412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14406 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38607 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2525: -#line 14413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14407 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38619 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2526: -#line 14417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38625 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38619 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2527: -#line 14418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_GLOBAL; } -#line 38631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38625 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2528: -#line 14419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2529: -#line 14420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14414 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2530: -#line 14424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_DEFAULT; } -#line 38649 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2531: -#line 14425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_GLOBAL; } -#line 38655 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38649 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2532: -#line 14426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38661 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38655 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2533: -#line 14427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14421 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38667 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38661 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2534: -#line 14433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -38687,11 +38681,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 38691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38685 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2535: -#line 14457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -38717,11 +38711,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 38721 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38715 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2536: -#line 14483 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_func_set_user_var *item; item= new (thd->mem_root) Item_func_set_user_var(thd, (yyvsp[-2].lex_str), (yyvsp[0].item)); @@ -38732,11 +38726,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Lex->var_list.push_back(var, thd->mem_root); } -#line 38736 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38730 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2537: -#line 14494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14488 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { struct sys_var_with_base tmp= (yyvsp[-2].variable); /* Lookup if necessary: must be a system variable. */ @@ -38748,11 +38742,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (set_system_variable(thd, &tmp, (yyvsp[-3].var_type), (yyvsp[0].item))) MYSQL_YYABORT; } -#line 38752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2538: -#line 14506 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; CHARSET_INFO *cs2; @@ -38766,11 +38760,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->var_list.push_back(var, thd->mem_root); } -#line 38770 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2539: -#line 14520 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14514 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; sp_pcontext *spc= lex->spcont; @@ -38785,11 +38779,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } -#line 38789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2540: -#line 14535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14529 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; CHARSET_INFO *cs2; @@ -38808,11 +38802,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->var_list.push_back(var, thd->mem_root); } -#line 38812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38806 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2541: -#line 14554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex = Lex; LEX_USER *user; @@ -38829,11 +38823,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->sphead) lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT; } -#line 38833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2542: -#line 14571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex = Lex; set_var_default_role *var= (new (thd->mem_root) @@ -38845,11 +38839,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->sphead) lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT; } -#line 38849 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2543: -#line 14583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex = Lex; set_var_role *var= new (thd->mem_root) set_var_role((yyvsp[0].lex_str)); @@ -38857,11 +38851,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->var_list.push_back(var, thd->mem_root); } -#line 38861 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2544: -#line 14591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14585 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex = Lex; set_var_password *var= (new (thd->mem_root) @@ -38873,11 +38867,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->sphead) lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT; } -#line 38877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2545: -#line 14607 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { sp_pcontext *spc= thd->lex->spcont; sp_variable *spv; @@ -38903,11 +38897,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.variable).base_name= (yyvsp[0].lex_str); } } -#line 38907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2546: -#line 14633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14627 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (check_reserved_words(&(yyvsp[-2].lex_str))) @@ -38944,11 +38938,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.variable).base_name= (yyvsp[-2].lex_str); } } -#line 38948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2547: -#line 14670 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14664 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { sys_var *tmp=find_sys_var(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if (!tmp) @@ -38959,11 +38953,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.variable).base_name.str= (char*) "default"; (yyval.variable).base_name.length= 7; } -#line 38963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2552: -#line 14691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].num)); @@ -38978,11 +38972,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->var_list.push_back(var, thd->mem_root); } -#line 38982 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38976 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2553: -#line 14709 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14703 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].tx_isolation)); @@ -38997,47 +38991,47 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->var_list.push_back(var, thd->mem_root); } -#line 39001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2554: -#line 14726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14720 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= true; } -#line 39007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2555: -#line 14727 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14721 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= false; } -#line 39013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2556: -#line 14731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14725 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.tx_isolation)= ISO_READ_UNCOMMITTED; } -#line 39019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2557: -#line 14732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.tx_isolation)= ISO_READ_COMMITTED; } -#line 39025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2558: -#line 14733 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14727 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.tx_isolation)= ISO_REPEATABLE_READ; } -#line 39031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2559: -#line 14734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14728 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.tx_isolation)= ISO_SERIALIZABLE; } -#line 39037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2560: -#line 14739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14733 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; sp_pcontext *spc= lex->spcont; @@ -39051,82 +39045,82 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->definer->plugin= empty_lex_str; lex->definer->auth= empty_lex_str; } -#line 39055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2561: -#line 14752 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14746 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer= (yyvsp[-1].lex_user); } -#line 39061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2562: -#line 14756 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer->pwhash= (yyvsp[0].lex_str);} -#line 39067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2563: -#line 14757 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14751 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer->pwtext= (yyvsp[-1].lex_str); } -#line 39073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2564: -#line 14759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer->pwtext= (yyvsp[-1].lex_str); Lex->definer->pwhash.str= Item_func_password::alloc(thd, (yyvsp[-1].lex_str).str, (yyvsp[-1].lex_str).length, Item_func_password::OLD); Lex->definer->pwhash.length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323; } -#line 39084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2565: -#line 14768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=(yyvsp[0].item); } -#line 39090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2566: -#line 14769 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14763 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=0; } -#line 39096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2567: -#line 14771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ON", 2); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 39106 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39100 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2568: -#line 14777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ALL", 3); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 39116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2569: -#line 14783 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "binary", 6); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 39126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2570: -#line 14794 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14788 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -39134,29 +39128,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "LOCK")); lex->sql_command= SQLCOM_LOCK_TABLES; } -#line 39138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2571: -#line 14802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2572: -#line 14806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14800 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 39150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2573: -#line 14807 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 39156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2576: -#line 14817 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14811 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { thr_lock_type lock_type= (thr_lock_type) (yyvsp[0].num); bool lock_for_write= (lock_type >= TL_WRITE_ALLOW_WRITE); @@ -39168,43 +39162,43 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MDL_SHARED_READ))) MYSQL_YYABORT; } -#line 39172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39166 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2577: -#line 14831 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= TL_READ_NO_INSERT; } -#line 39178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2578: -#line 14832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= TL_WRITE_DEFAULT; } -#line 39184 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2579: -#line 14834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT); } -#line 39192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39186 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2580: -#line 14838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= TL_WRITE_LOW_PRIORITY; } -#line 39198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2581: -#line 14839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= TL_READ; } -#line 39204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2582: -#line 14844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -39212,17 +39206,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "UNLOCK")); lex->sql_command= SQLCOM_UNLOCK_TABLES; } -#line 39216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2583: -#line 14852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2584: -#line 14861 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14855 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->sphead) @@ -39231,11 +39225,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!lex->current_select->add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[0].lex_str_ptr), 0)) MYSQL_YYABORT; } -#line 39235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2585: -#line 14870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14864 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->sphead) @@ -39244,11 +39238,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!lex->current_select->add_table_to_list(thd, (yyvsp[-1].table), 0, 0)) MYSQL_YYABORT; } -#line 39248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39242 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2586: -#line 14879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->sphead) @@ -39265,11 +39259,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!lex->current_select->add_table_to_list(thd, (yyvsp[-1].table), 0, 0)) MYSQL_YYABORT; } -#line 39269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2587: -#line 14896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->expr_allows_subselect= TRUE; /* Stored functions are not supported for HANDLER READ. */ @@ -39280,59 +39274,59 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 39284 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39278 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2588: -#line 14909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ident= null_lex_str; } -#line 39290 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39284 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2589: -#line 14910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14904 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ident= (yyvsp[-1].lex_str); } -#line 39296 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39290 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2590: -#line 14914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ha_read_mode = RFIRST; } -#line 39302 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39296 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2591: -#line 14915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ha_read_mode = RNEXT; } -#line 39308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39302 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2592: -#line 14919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ha_read_mode = RFIRST; } -#line 39314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2593: -#line 14920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ha_read_mode = RNEXT; } -#line 39320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2594: -#line 14921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ha_read_mode = RPREV; } -#line 39326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2595: -#line 14922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ha_read_mode = RLAST; } -#line 39332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2596: -#line 14924 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->ha_read_mode = RKEY; @@ -39340,63 +39334,63 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!(lex->insert_list= new (thd->mem_root) List_item)) MYSQL_YYABORT; } -#line 39344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2597: -#line 14932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2598: -#line 14936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ha_rkey_mode)=HA_READ_KEY_EXACT; } -#line 39356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2599: -#line 14937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_NEXT; } -#line 39362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2600: -#line 14938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_PREV; } -#line 39368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2601: -#line 14939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ha_rkey_mode)=HA_READ_AFTER_KEY; } -#line 39374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2602: -#line 14940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ha_rkey_mode)=HA_READ_BEFORE_KEY; } -#line 39380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2603: -#line 14947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2604: -#line 14952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_REVOKE; lex->type= 0; } -#line 39396 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2605: -#line 14958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->columns.elements) @@ -39407,11 +39401,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_REVOKE; lex->type= TYPE_ENUM_FUNCTION; } -#line 39411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2606: -#line 14969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->columns.elements) @@ -39422,68 +39416,68 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_REVOKE; lex->type= TYPE_ENUM_PROCEDURE; } -#line 39426 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2607: -#line 14980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_REVOKE_ALL; } -#line 39434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2608: -#line 14984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->users_list.push_front ((yyvsp[-2].lex_user)); lex->sql_command= SQLCOM_REVOKE; lex->type= TYPE_ENUM_PROXY; } -#line 39445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2609: -#line 14991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_REVOKE_ROLE; if (Lex->users_list.push_front((yyvsp[-2].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2610: -#line 15000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14994 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->with_admin_option= true; (yyval.lex_user)= (yyvsp[0].lex_user); } -#line 39461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2611: -#line 15002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->with_admin_option= false; (yyval.lex_user)= (yyvsp[0].lex_user); } -#line 39467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2612: -#line 15007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2613: -#line 15013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_GRANT; lex->type= 0; } -#line 39483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2614: -#line 15020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->columns.elements) @@ -39494,11 +39488,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_GRANT; lex->type= TYPE_ENUM_FUNCTION; } -#line 39498 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2615: -#line 15032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->columns.elements) @@ -39509,22 +39503,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_GRANT; lex->type= TYPE_ENUM_PROCEDURE; } -#line 39513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2616: -#line 15043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->users_list.push_front ((yyvsp[-3].lex_user)); lex->sql_command= SQLCOM_GRANT; lex->type= TYPE_ENUM_PROXY; } -#line 39524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2617: -#line 15050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_GRANT_ROLE; @@ -39532,64 +39526,64 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (Lex->users_list.push_front((yyvsp[-3].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2618: -#line 15061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer = 0; } -#line 39542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2619: -#line 15062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer = (yyvsp[0].lex_user); } -#line 39548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2620: -#line 15065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->with_admin_option= false; } -#line 39554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2621: -#line 15066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->with_admin_option= true; } -#line 39560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2622: -#line 15070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2623: -#line 15075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15069 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2624: -#line 15083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))) MYSQL_YYABORT; (yyval.lex_user)->user= current_role; (yyval.lex_user)->reset_auth(); } -#line 39589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2625: -#line 15093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { CHARSET_INFO *cs= system_charset_info; /* trim end spaces (as they'll be lost in mysql.user anyway) */ @@ -39608,275 +39602,275 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); cs, 0)) MYSQL_YYABORT; } -#line 39612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2629: -#line 15120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2630: -#line 15122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->all_privileges= 1; Lex->grant= GLOBAL_ACLS; } -#line 39627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2635: -#line 15140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->which_columns = SELECT_ACL;} -#line 39633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2636: -#line 15141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2637: -#line 15143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->which_columns = INSERT_ACL;} -#line 39645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2638: -#line 15144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2639: -#line 15146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->which_columns = UPDATE_ACL; } -#line 39657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2640: -#line 15147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2641: -#line 15149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->which_columns = REFERENCES_ACL;} -#line 39669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2642: -#line 15150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2643: -#line 15151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= DELETE_ACL;} -#line 39681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2644: -#line 15152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2645: -#line 15153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= INDEX_ACL;} -#line 39693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2646: -#line 15154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= ALTER_ACL;} -#line 39699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2647: -#line 15155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= CREATE_ACL;} -#line 39705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2648: -#line 15156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= DROP_ACL;} -#line 39711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2649: -#line 15157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= EXECUTE_ACL;} -#line 39717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2650: -#line 15158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= RELOAD_ACL;} -#line 39723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2651: -#line 15159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= SHUTDOWN_ACL;} -#line 39729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2652: -#line 15160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= PROCESS_ACL;} -#line 39735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2653: -#line 15161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= FILE_ACL;} -#line 39741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2654: -#line 15162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= GRANT_ACL;} -#line 39747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2655: -#line 15163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= SHOW_DB_ACL;} -#line 39753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2656: -#line 15164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= SUPER_ACL;} -#line 39759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2657: -#line 15165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= CREATE_TMP_ACL;} -#line 39765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2658: -#line 15166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= LOCK_TABLES_ACL; } -#line 39771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2659: -#line 15167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= REPL_SLAVE_ACL; } -#line 39777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2660: -#line 15168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= REPL_CLIENT_ACL; } -#line 39783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2661: -#line 15169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= CREATE_VIEW_ACL; } -#line 39789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2662: -#line 15170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= SHOW_VIEW_ACL; } -#line 39795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2663: -#line 15171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= CREATE_PROC_ACL; } -#line 39801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2664: -#line 15172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= ALTER_PROC_ACL; } -#line 39807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2665: -#line 15173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= CREATE_USER_ACL; } -#line 39813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2666: -#line 15174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= EVENT_ACL;} -#line 39819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2667: -#line 15175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= TRIGGER_ACL; } -#line 39825 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2668: -#line 15176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= CREATE_TABLESPACE_ACL; } -#line 39831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39825 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2669: -#line 15180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2670: -#line 15181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2673: -#line 15191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->x509_subject) my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SUBJECT")); lex->x509_subject=(yyvsp[0].lex_str).str; } -#line 39854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2674: -#line 15198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->x509_issuer) my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "ISSUER")); lex->x509_issuer=(yyvsp[0].lex_str).str; } -#line 39865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2675: -#line 15205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->ssl_cipher) my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CIPHER")); lex->ssl_cipher=(yyvsp[0].lex_str).str; } -#line 39876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39870 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2676: -#line 15215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; size_t dummy; @@ -39887,11 +39881,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else if (lex->columns.elements) my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0))); } -#line 39891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2677: -#line 15226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15220 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->current_select->db = (yyvsp[-2].lex_str).str; @@ -39900,11 +39894,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else if (lex->columns.elements) my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0))); } -#line 39904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2678: -#line 15235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->current_select->db = NULL; @@ -39913,11 +39907,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else if (lex->columns.elements) my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0))); } -#line 39917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2679: -#line 15244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (!lex->current_select->add_table_to_list(thd, (yyvsp[0].table),NULL, @@ -39926,120 +39920,120 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->grant == GLOBAL_ACLS) lex->grant = TABLE_ACLS & ~GRANT_ACL; } -#line 39930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2680: -#line 15256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2681: -#line 15261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2682: -#line 15269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2683: -#line 15274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2684: -#line 15282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2685: -#line 15287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15281 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2690: -#line 15298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_user)= (yyvsp[-3].lex_user); (yyvsp[-3].lex_user)->pwtext= (yyvsp[0].lex_str); if (Lex->sql_command == SQLCOM_REVOKE) MYSQL_YYABORT; } -#line 39995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2691: -#line 15305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_user)= (yyvsp[-4].lex_user); (yyvsp[-4].lex_user)->pwhash= (yyvsp[0].lex_str); } -#line 40004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2692: -#line 15310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_user)= (yyvsp[-3].lex_user); (yyvsp[-3].lex_user)->plugin= (yyvsp[0].lex_str); (yyvsp[-3].lex_user)->auth= empty_lex_str; } -#line 40014 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40008 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2693: -#line 15316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_user)= (yyvsp[-5].lex_user); (yyvsp[-5].lex_user)->plugin= (yyvsp[-2].lex_str); (yyvsp[-5].lex_user)->auth= (yyvsp[0].lex_str); } -#line 40024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2694: -#line 15322 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_user)= (yyvsp[0].lex_user); } -#line 40030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2695: -#line 15327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->grant |= lex->which_columns; } -#line 40039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2699: -#line 15341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15335 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { String *new_str= new (thd->mem_root) String((const char*) (yyvsp[0].lex_str).str,(yyvsp[0].lex_str).length,system_charset_info); if (new_str == NULL) @@ -40065,227 +40059,227 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->columns.push_back(col, thd->mem_root); } } -#line 40069 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2701: -#line 15371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ssl_type=SSL_TYPE_SPECIFIED; } -#line 40077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2702: -#line 15375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ssl_type=SSL_TYPE_ANY; } -#line 40085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40079 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2703: -#line 15379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15373 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ssl_type=SSL_TYPE_X509; } -#line 40093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2704: -#line 15383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ssl_type=SSL_TYPE_NONE; } -#line 40101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2705: -#line 15389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2707: -#line 15394 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2708: -#line 15395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= GRANT_ACL;} -#line 40119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2709: -#line 15399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2710: -#line 15400 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15394 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2711: -#line 15404 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15398 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= GRANT_ACL;} -#line 40137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2712: -#line 15406 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15400 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->mqh.questions=(yyvsp[0].ulong_num); lex->mqh.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR; } -#line 40147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2713: -#line 15412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15406 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->mqh.updates=(yyvsp[0].ulong_num); lex->mqh.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR; } -#line 40157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2714: -#line 15418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->mqh.conn_per_hour= (yyvsp[0].ulong_num); lex->mqh.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR; } -#line 40167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2715: -#line 15424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->mqh.user_conn= (yyvsp[0].num); lex->mqh.specified_limits|= USER_RESOURCES::USER_CONNECTIONS; } -#line 40177 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40171 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2716: -#line 15430 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->mqh.max_statement_time= (yyvsp[0].item_num)->val_real(); lex->mqh.specified_limits|= USER_RESOURCES::MAX_STATEMENT_TIME; } -#line 40187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2717: -#line 15439 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_BEGIN; lex->start_transaction_opt= 0; } -#line 40197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2718: -#line 15444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2719: -#line 15449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_COMPOUND; Lex->sphead->set_stmt_end(thd); Lex->sphead->restore_thd_mem_root(thd); } -#line 40213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2720: -#line 15457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 40219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2721: -#line 15458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 40225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2722: -#line 15462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15456 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2723: -#line 15463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2724: -#line 15468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_yes_no_unk)= TVL_UNKNOWN; } -#line 40243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2725: -#line 15469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_yes_no_unk)= TVL_NO; } -#line 40249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2726: -#line 15470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_yes_no_unk)= TVL_YES; } -#line 40255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2727: -#line 15475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_yes_no_unk)= TVL_UNKNOWN; } -#line 40261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2728: -#line 15476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_yes_no_unk)= TVL_YES; } -#line 40267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2729: -#line 15477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_yes_no_unk)= TVL_NO; } -#line 40273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2730: -#line 15481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2731: -#line 15482 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2732: -#line 15487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_COMMIT; @@ -40294,11 +40288,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->tx_chain= (yyvsp[-1].m_yes_no_unk); lex->tx_release= (yyvsp[0].m_yes_no_unk); } -#line 40298 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40292 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2733: -#line 15499 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15493 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_ROLLBACK; @@ -40307,56 +40301,56 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->tx_chain= (yyvsp[-1].m_yes_no_unk); lex->tx_release= (yyvsp[0].m_yes_no_unk); } -#line 40311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2734: -#line 15509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT; lex->ident= (yyvsp[0].lex_str); } -#line 40321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2735: -#line 15518 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15512 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SAVEPOINT; lex->ident= (yyvsp[0].lex_str); } -#line 40331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2736: -#line 15527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_RELEASE_SAVEPOINT; lex->ident= (yyvsp[0].lex_str); } -#line 40341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2737: -#line 15540 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15534 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2739: -#line 15546 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15540 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_select_to_union_list(Lex, (bool)(yyvsp[0].num), TRUE)) MYSQL_YYABORT; } -#line 40356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2740: -#line 15551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15545 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Remove from the name resolution context stack the context of the @@ -40364,29 +40358,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ Lex->pop_context(); } -#line 40368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2742: -#line 15562 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 40374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2743: -#line 15566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 40380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2744: -#line 15567 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15561 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 40386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2745: -#line 15571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE); @@ -40400,80 +40394,80 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } thd->where= "global ORDER clause"; } -#line 40404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40398 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2746: -#line 15585 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15579 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { thd->lex->current_select->no_table_names_allowed= 0; thd->where= ""; } -#line 40413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2749: -#line 15597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)=1; } -#line 40419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2750: -#line 15598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)=1; } -#line 40425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2751: -#line 15599 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)=0; } -#line 40431 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2752: -#line 15605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15599 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.select_lex)= Lex->current_select->master_unit()->first_select(); } -#line 40439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2753: -#line 15610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.select_lex)= Lex->current_select->master_unit()->first_select(); } -#line 40447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2755: -#line 15619 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15613 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_select_to_union_list(Lex, (bool)(yyvsp[0].num), FALSE)) MYSQL_YYABORT; } -#line 40456 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40450 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2756: -#line 15624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15618 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->pop_context(); (yyval.select_lex)= (yyvsp[-4].select_lex); } -#line 40465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2757: -#line 15633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15627 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.select_lex)= (yyvsp[-1].select_lex); } -#line 40473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2758: -#line 15639 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (!lex->expr_allows_subselect || @@ -40492,11 +40486,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (mysql_new_select(Lex, 1)) MYSQL_YYABORT; } -#line 40496 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2759: -#line 15660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15654 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; @@ -40519,17 +40513,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->current_select->select_n_having_items+= child->select_n_having_items; } -#line 40523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2764: -#line 15695 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15689 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->options|= SELECT_STRAIGHT_JOIN; } -#line 40529 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2765: -#line 15697 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (check_simple_select()) MYSQL_YYABORT; @@ -40537,73 +40531,73 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_mdl_type= MDL_SHARED_READ; Select->options|= SELECT_HIGH_PRIORITY; } -#line 40541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2766: -#line 15704 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15698 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->options|= SELECT_DISTINCT; } -#line 40547 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2767: -#line 15705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->options|= SELECT_SMALL_RESULT; } -#line 40553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40547 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2768: -#line 15706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15700 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->options|= SELECT_BIG_RESULT; } -#line 40559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2769: -#line 15708 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (check_simple_select()) MYSQL_YYABORT; Select->options|= OPTION_BUFFER_RESULT; } -#line 40569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2770: -#line 15714 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15708 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (check_simple_select()) MYSQL_YYABORT; Select->options|= OPTION_FOUND_ROWS; } -#line 40579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2771: -#line 15719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->options|= SELECT_ALL; } -#line 40585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2772: -#line 15730 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2773: -#line 15732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2774: -#line 15734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15728 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2788: -#line 15767 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* We have to distinguish missing DEFINER-clause from case when @@ -40614,58 +40608,58 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ thd->lex->definer= 0; } -#line 40618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2789: -#line 15781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15775 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer= (yyvsp[0].lex_user); Lex->ssl_type= SSL_TYPE_NOT_SPECIFIED; Lex->ssl_cipher= Lex->x509_subject= Lex->x509_issuer= 0; bzero(&(Lex->mqh), sizeof(Lex->mqh)); } -#line 40629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40623 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2790: -#line 15797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15791 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_algorithm= DTYPE_ALGORITHM_UNDEFINED; } -#line 40635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2791: -#line 15799 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_algorithm= VIEW_ALGORITHM_MERGE; } -#line 40641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2792: -#line 15801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15795 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_algorithm= VIEW_ALGORITHM_TMPTABLE; } -#line 40647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2793: -#line 15806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15800 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_suid= VIEW_SUID_DEFAULT; } -#line 40653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2794: -#line 15808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_suid= VIEW_SUID_DEFINER; } -#line 40659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2795: -#line 15810 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15804 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_suid= VIEW_SUID_INVOKER; } -#line 40665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2796: -#line 15815 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15809 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; if (lex->add_create_options_with_check((yyvsp[-1].object_ddl_options))) @@ -40679,37 +40673,37 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->query_tables->open_strategy= TABLE_LIST::OPEN_STUB; } -#line 40683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2798: -#line 15833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2800: -#line 15839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->view_list.push_back((LEX_STRING*) thd->memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)), thd->mem_root); } -#line 40699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2801: -#line 15845 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->view_list.push_back((LEX_STRING*) thd->memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)), thd->mem_root); } -#line 40709 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40703 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2802: -#line 15853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->parsing_options.allows_variable= FALSE; @@ -40718,11 +40712,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->parsing_options.allows_derived= FALSE; lex->create_view_select.str= (char *) YYLIP->get_cpp_ptr(); } -#line 40722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40716 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2803: -#line 15862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; uint len= YYLIP->get_cpp_ptr() - lex->create_view_select.str; @@ -40735,60 +40729,60 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->parsing_options.allows_select_procedure= TRUE; lex->parsing_options.allows_derived= TRUE; } -#line 40739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2806: -#line 15883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_check= VIEW_CHECK_NONE; } -#line 40745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2807: -#line 15885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_check= VIEW_CHECK_CASCADED; } -#line 40751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2808: -#line 15887 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15881 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_check= VIEW_CHECK_CASCADED; } -#line 40757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2809: -#line 15889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_check= VIEW_CHECK_LOCAL; } -#line 40763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2810: -#line 15902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->add_create_options_with_check((yyvsp[0].object_ddl_options))) MYSQL_YYABORT; } -#line 40772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40766 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2811: -#line 15911 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $10 */ Lex->raw_trg_on_table_name_begin= YYLIP->get_tok_start(); } -#line 40780 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40774 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2812: -#line 15917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15911 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $14 */ Lex->raw_trg_on_table_name_end= YYLIP->get_tok_start(); } -#line 40788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2813: -#line 15922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $17 */ LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -40806,11 +40800,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sphead->set_body_start(thd, lip->get_cpp_ptr()); } -#line 40810 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2814: -#line 15940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $19 */ LEX *lex= Lex; sp_head *sp= lex->sphead; @@ -40834,23 +40828,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MDL_SHARED_NO_WRITE)) MYSQL_YYABORT; } -#line 40838 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2815: -#line 15972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { thd->lex->udf.type= UDFTYPE_AGGREGATE; } -#line 40844 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40838 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2816: -#line 15973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { thd->lex->udf.type= UDFTYPE_FUNCTION; } -#line 40850 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40844 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2817: -#line 15979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; if (lex->add_create_options_with_check((yyvsp[-5].object_ddl_options))) @@ -40862,11 +40856,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->udf.returns= (Item_result) (yyvsp[-2].num); lex->udf.dl= (yyvsp[0].lex_str).str; } -#line 40866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40860 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2818: -#line 15997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $5 */ LEX *lex= Lex; Lex_input_stream *lip= YYLIP; @@ -40886,50 +40880,50 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); tmp_param_begin++; lex->sphead->m_param_begin= tmp_param_begin; } -#line 40890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2819: -#line 16018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $8 */ Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start(); } -#line 40898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2820: -#line 16022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $10 */ LEX *lex= Lex; lex->init_last_field(&lex->sphead->m_return_field_def, NULL, thd->variables.collation_database); } -#line 40908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2821: -#line 16028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $12 */ if (Lex->sphead->fill_field_definition(thd, Lex, (yyvsp[0].field_type), Lex->last_field)) MYSQL_YYABORT; } -#line 40918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2822: -#line 16034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $14 */ LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; lex->sphead->set_body_start(thd, lip->get_cpp_tok_start()); } -#line 40929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2823: -#line 16041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; sp_head *sp= lex->sphead; @@ -40978,11 +40972,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } sp->restore_thd_mem_root(thd); } -#line 40982 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40976 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2824: -#line 16093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->add_create_options_with_check((yyvsp[-1].object_ddl_options))) MYSQL_YYABORT; @@ -40994,11 +40988,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Lex->spname= (yyvsp[0].spname); } -#line 40998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2825: -#line 16105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { const char* tmp_param_begin; @@ -41006,27 +41000,27 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); tmp_param_begin++; Lex->sphead->m_param_begin= tmp_param_begin; } -#line 41010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2826: -#line 16114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start(); } -#line 41018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2827: -#line 16118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start()); } -#line 41026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41020 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2828: -#line 16122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; sp_head *sp= lex->sphead; @@ -41035,209 +41029,209 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_CREATE_PROCEDURE; sp->restore_thd_mem_root(thd); } -#line 41039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2829: -#line 16136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_XA_START; } -#line 41047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2830: -#line 16140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_XA_END; } -#line 41055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2831: -#line 16144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_XA_PREPARE; } -#line 41063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2832: -#line 16148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_XA_COMMIT; } -#line 41071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2833: -#line 16152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_XA_ROLLBACK; } -#line 41079 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2834: -#line 16156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_XA_RECOVER; } -#line 41087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2835: -#line 16163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[0].string)->length() <= MAXGTRIDSIZE); if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) MYSQL_YYABORT; Lex->xid->set(1L, (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length(), 0, 0); } -#line 41098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2836: -#line 16170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-2].string)->length() <= MAXGTRIDSIZE && (yyvsp[0].string)->length() <= MAXBQUALSIZE); if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) MYSQL_YYABORT; Lex->xid->set(1L, (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length(), (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length()); } -#line 41109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2837: -#line 16177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-4].string)->length() <= MAXGTRIDSIZE && (yyvsp[-2].string)->length() <= MAXBQUALSIZE); if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) MYSQL_YYABORT; Lex->xid->set((yyvsp[0].ulong_num), (yyvsp[-4].string)->ptr(), (yyvsp[-4].string)->length(), (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length()); } -#line 41120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41114 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2838: -#line 16186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 41126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2839: -#line 16187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 41132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2840: -#line 16191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_NONE; } -#line 41138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2841: -#line 16192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_JOIN; } -#line 41144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2842: -#line 16193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_RESUME; } -#line 41150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2843: -#line 16197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_NONE; } -#line 41156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2844: -#line 16198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_ONE_PHASE; } -#line 41162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2845: -#line 16203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_NONE; } -#line 41168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2846: -#line 16205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_SUSPEND; } -#line 41174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2848: -#line 16210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 41180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2849: -#line 16211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_FOR_MIGRATE; } -#line 41186 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2850: -#line 16216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_INSTALL_PLUGIN; lex->comment= (yyvsp[-2].lex_str); lex->ident= (yyvsp[0].lex_str); } -#line 41197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2851: -#line 16223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_INSTALL_PLUGIN; lex->comment= null_lex_str; lex->ident= (yyvsp[0].lex_str); } -#line 41208 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2852: -#line 16233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_UNINSTALL_PLUGIN; lex->comment= (yyvsp[0].lex_str); } -#line 41218 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41212 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2853: -#line 16239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_UNINSTALL_PLUGIN; lex->comment= null_lex_str; lex->ident= (yyvsp[0].lex_str); } -#line 41229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2854: -#line 16250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { YYERROR; } -#line 41237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; -#line 41241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index b4c0c4d45..3fda8832f 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -4678,17 +4678,11 @@ size_number: switch (end_ptr[0]) { case 'g': - case 'G': - text_shift_number+=10; - /* fall through */ + case 'G': text_shift_number+=30; break; case 'm': - case 'M': - text_shift_number+=10; - /* fall through */ + case 'M': text_shift_number+=20; break; case 'k': - case 'K': - text_shift_number+=10; - break; + case 'K': text_shift_number+=10; break; default: my_yyabort_error((ER_WRONG_SIZE_NUMBER, MYF(0))); } diff --git a/sql/table.cc b/sql/table.cc index 94b3bc9d5..53d88bc02 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -5348,7 +5348,8 @@ Item *Field_iterator_table::create_item(THD *thd) Item_field *item= new (thd->mem_root) Item_field(thd, &select->context, *ptr); if (item && thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY && - !thd->lex->in_sum_func && select->cur_pos_in_select_list != UNDEF_POS) + !thd->lex->in_sum_func && select->cur_pos_in_select_list != UNDEF_POS && + select->join) { select->join->non_agg_fields.push_back(item); item->marker= select->cur_pos_in_select_list; diff --git a/sql/table.h b/sql/table.h index 876f496a3..7d9b5292a 100644 --- a/sql/table.h +++ b/sql/table.h @@ -35,6 +35,7 @@ /* Structs that defines the TABLE */ class Item; /* Needed by ORDER */ +typedef Item (*Item_ptr); class Item_subselect; class Item_field; class GRANT_TABLE; @@ -2528,7 +2529,7 @@ typedef struct st_nested_join table_map sj_depends_on; /* Outer non-trivially correlated tables */ table_map sj_corr_tables; - List sj_outer_expr_list; + List sj_outer_expr_list; /** True if this join nest node is completely covered by the query execution plan. This means two things. diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index 2733a91a3..75c1526cb 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -505,6 +505,9 @@ wsrep_run_wsrep_commit(THD *thd, bool all) } mysql_mutex_lock(&thd->LOCK_wsrep_thd); + + DEBUG_SYNC(thd, "wsrep_after_replication"); + switch(rcode) { case 0: /* diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index 1d117766d..b21041eb0 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -301,8 +301,9 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type) if (wsrep_inited == 1) wsrep_deinit(false); - char* tmp= strdup(wsrep_provider); // wsrep_init() rewrites provider + char* tmp= strdup(wsrep_provider); // wsrep_init() rewrites provider //when fails + if (wsrep_init()) { my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp); diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index 1f687c3c8..69b2ef783 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -38,41 +38,24 @@ user_connect.h valblk.h value.h xindex.h xobject.h xtable.h) # Definitions that are shared for all OSes # add_definitions( -DMARIADB -DFORCE_INIT_OF_VARS -Dconnect_EXPORTS) -add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT -DPIVOT_SUPPORT -DUSE_TRY ) +add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT ) # # OS specific C flags, definitions and source files. # IF(UNIX) - if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") - # Bar: -Wfatal-errors removed (does not present in gcc on solaris10) - if(WITH_WARNINGS) - add_definitions(-Wall -Wextra -Wmissing-declarations) - #message(STATUS "CONNECT: GCC: All warnings enabled") - else() - add_definitions(-Wall -Wmissing-declarations) - add_definitions(-Wno-write-strings) - add_definitions(-Wno-unused-variable) - # Bar: -Wno-unused-but-set-variables commented (does not present on sol10) - # add_definitions(-Wno-unused-but-set-variable) - add_definitions(-Wno-unused-value) - add_definitions(-Wno-unused-function) - add_definitions(-Wno-parentheses) - #add_definitions(-Wno-missing-declarations) - # Bar: -Wno-int-to-pointer-cast commended (does not present in gcc on sol10) - # add_definitions(-Wno-int-to-pointer-cast) - # Bar: -Wno-narrowing commented (does not present in gcc on solaris10) - # add_definitions(-Wno-narrowing) - -# This switch is for pure C only: -# add_definitions(-Wno-implicit-function-declaration) -# These switches are for C++ only -# add_definitions(-Wno-reorder) - - #message(STATUS "CONNECT: GCC: Some warnings disabled") - endif(WITH_WARNINGS) - endif() + MY_CHECK_AND_SET_COMPILER_FLAG("-Wall -Wmissing-declarations") + if(NOT WITH_WARNINGS) + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-function") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-variable") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-value") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-parentheses") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-strict-aliasing") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-misleading-indentation") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-format-truncation") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough") + endif(NOT WITH_WARNINGS) add_definitions( -DUNIX -DLINUX -DUBUNTU ) @@ -247,7 +230,7 @@ ENDIF(CONNECT_WITH_ODBC) # # JDBC with MongoDB Java Driver included but disabled # -#OPTION(CONNECT_WITH_MONGO "Compile CONNECT storage engine with MONGO support" ON) +# OPTION(CONNECT_WITH_MONGO "Compile CONNECT storage engine with MONGO support" ON) OPTION(CONNECT_WITH_JDBC "Compile CONNECT storage engine with JDBC support" ON) IF(CONNECT_WITH_JDBC) @@ -260,17 +243,16 @@ IF(CONNECT_WITH_JDBC) # SET(JDBC_LIBRARY ${JAVA_JVM_LIBRARY}) will be dynamically linked SET(CONNECT_SOURCES ${CONNECT_SOURCES} javaconn.cpp jdbconn.cpp tabjdbc.cpp + jmgfam.cpp jmgoconn.cpp mongo.cpp tabjmg.cpp jdbccat.h javaconn.h jdbconn.h tabjdbc.h + jmgfam.h jmgoconn.h mongo.h tabjmg.h JdbcInterface.java ApacheInterface.java MariadbInterface.java MysqlInterface.java OracleInterface.java PostgresqlInterface.java + Mongo2Interface.java Mongo3Interface.java JavaWrappers.jar) - add_definitions(-DJDBC_SUPPORT) + add_definitions(-DJAVA_SUPPORT) IF(CONNECT_WITH_MONGO) - SET(CONNECT_SOURCES ${CONNECT_SOURCES} - jmgfam.cpp jmgoconn.cpp mongo.cpp tabjmg.cpp - jmgfam.h jmgoconn.h mongo.h tabjmg.h - Mongo2Interface.java Mongo3Interface.java) - add_definitions(-DMONGO_SUPPORT -DMONGO_ENABLED=0) + add_definitions(-DMONGO_SUPPORT) ENDIF() ELSE() SET(JDBC_LIBRARY "") @@ -313,10 +295,7 @@ IF(CONNECT_WITH_MONGO) add_definitions(-DCMGO_SUPPORT) IF (NOT JAVA_FOUND AND JNI_FOUND) SET(CONNECT_SOURCES ${CONNECT_SOURCES} mongo.cpp mongo.h) - add_definitions(-DMONGO_SUPPORT -DMONGO_ENABLED=1) - ELSE () - remove_definitions(-DMONGO_ENABLED=0) - add_definitions(-DMONGO_ENABLED=1) + add_definitions(-DMONGO_SUPPORT) ENDIF (NOT JAVA_FOUND AND JNI_FOUND) ENDIF(libmongoc-1.0_FOUND) ENDIF(CONNECT_WITH_MONGO) diff --git a/storage/connect/array.cpp b/storage/connect/array.cpp index 59a53487a..639edf63a 100644 --- a/storage/connect/array.cpp +++ b/storage/connect/array.cpp @@ -520,7 +520,7 @@ bool ARRAY::FilTest(PGLOBAL g, PVAL valp, OPVAL opc, int opm) } else if (opc != OP_EXIST) { sprintf(g->Message, MSG(MISSING_ARG), opc); - throw (int)TYPE_ARRAY; + throw (int)TYPE_ARRAY; } else // OP_EXIST return Nval > 0; diff --git a/storage/connect/cmgoconn.cpp b/storage/connect/cmgoconn.cpp index fdd590402..44fac5613 100644 --- a/storage/connect/cmgoconn.cpp +++ b/storage/connect/cmgoconn.cpp @@ -22,17 +22,10 @@ #include "filter.h" #include "cmgoconn.h" -bool IsNum(PSZ s); - -// Required to initialize libmongoc's internals -void mongo_init(bool init) -{ - if (init) - mongoc_init(); - else - mongoc_cleanup(); +bool CMgoConn::IsInit = false; -} // end of mongo_init +bool IsNum(PSZ s); +bool MakeSelector(PGLOBAL g, PFIL fp, PSTRG s); /* --------------------------- Class INCOL --------------------------- */ @@ -139,11 +132,36 @@ CMgoConn::CMgoConn(PGLOBAL g, PCPARM pcg) m_Connected = false; } // end of CMgoConn standard constructor +/***********************************************************************/ +/* Required to initialize libmongoc's internals. */ +/***********************************************************************/ +void CMgoConn::mongo_init(bool init) +{ + if (init) + mongoc_init(); + else if (IsInit) + mongoc_cleanup(); + + IsInit = init; +} // end of mongo_init + /***********************************************************************/ /* Connect to the MongoDB server and get the collection. */ /***********************************************************************/ bool CMgoConn::Connect(PGLOBAL g) { + if (!IsInit) +#if defined(__WIN__) + __try { + mongo_init(true); + } __except (EXCEPTION_EXECUTE_HANDLER) { + strcpy(g->Message, "Cannot load MongoDB C driver"); + return true; + } // end try/except +#else // !__WIN__ + mongo_init(true); +#endif // !__WIN__ + Uri = mongoc_uri_new(Pcg->Uristr); if (!Uri) { @@ -240,12 +258,13 @@ int CMgoConn::CollSize(PGLOBAL g) /***********************************************************************/ bool CMgoConn::MakeCursor(PGLOBAL g) { - const char *p; - bool id, b = false, all = false; - PCSZ options = Pcg->Options; - PTDB tp = Pcg->Tdbp; - PCOL cp; - PSTRG s = NULL; + const char *p; + bool id, b = false, all = false; + PCSZ options = Pcg->Options; + PTDB tp = Pcg->Tdbp; + PCOL cp; + PSTRG s = NULL; + PFIL filp = tp->GetFilter(); id = (tp->GetMode() != MODE_READ); @@ -274,10 +293,10 @@ bool CMgoConn::MakeCursor(PGLOBAL g) s = new(g) STRING(g, 1023, (PSZ)options); - if (tp->GetFilter()) { + if (filp) { s->Append(",{\"$match\":"); - if (tp->GetFilter()->MakeSelector(g, s)) { + if (MakeSelector(g, filp, s)) { strcpy(g->Message, "Failed making selector"); return true; } else @@ -330,15 +349,15 @@ bool CMgoConn::MakeCursor(PGLOBAL g) } // endif error } else { - if (Pcg->Filter || tp->GetFilter()) { + if (Pcg->Filter || filp) { if (trace) { if (Pcg->Filter) htrc("Filter: %s\n", Pcg->Filter); - if (tp->GetFilter()) { + if (filp) { char buf[512]; - tp->GetFilter()->Prints(g, buf, 511); + filp->Prints(g, buf, 511); htrc("To_Filter: %s\n", buf); } // endif To_Filter @@ -346,11 +365,11 @@ bool CMgoConn::MakeCursor(PGLOBAL g) s = new(g) STRING(g, 1023, (PSZ)Pcg->Filter); - if (tp->GetFilter()) { + if (filp) { if (Pcg->Filter) s->Append(','); - if (tp->GetFilter()->MakeSelector(g, s)) { + if (MakeSelector(g, filp, s)) { strcpy(g->Message, "Failed making selector"); return NULL; } // endif Selector diff --git a/storage/connect/cmgoconn.h b/storage/connect/cmgoconn.h index f5cefea34..b1216ac57 100644 --- a/storage/connect/cmgoconn.h +++ b/storage/connect/cmgoconn.h @@ -93,6 +93,7 @@ class CMgoConn : public BLOCK { PSZ Mini(PGLOBAL g, PCOL colp, const bson_t *bson, bool b); void GetColumnValue(PGLOBAL g, PCOL colp); bool AddValue(PGLOBAL g, PCOL colp, bson_t *doc, char *key, bool upd); + static void mongo_init(bool init); protected: // Members @@ -112,4 +113,5 @@ class CMgoConn : public BLOCK { PINCOL Fpc; // To insert INCOL classes PFBLOCK fp; bool m_Connected; + static bool IsInit; }; // end of class CMgoConn diff --git a/storage/connect/filter.cpp b/storage/connect/filter.cpp index 6a96240c4..079128f9a 100644 --- a/storage/connect/filter.cpp +++ b/storage/connect/filter.cpp @@ -10,7 +10,7 @@ /* Include relevant MariaDB header file. */ /***********************************************************************/ #include "my_global.h" -#include "sql_class.h" +//#include "sql_class.h" //#include "sql_time.h" #if defined(__WIN__) diff --git a/storage/connect/filter.h b/storage/connect/filter.h index 11b77aec1..c6ab8fddd 100644 --- a/storage/connect/filter.h +++ b/storage/connect/filter.h @@ -61,9 +61,6 @@ class DllExport FILTER : public XOBJECT { /* Filter description block */ //virtual PXOB CheckSubQuery(PGLOBAL, PSQL); //virtual bool CheckLocal(PTDB); //virtual int CheckSpcCol(PTDB tdbp, int n); -#if defined(MONGO_SUPPORT) - bool MakeSelector(PGLOBAL g, PSTRG s); -#endif // MONGO_SUPPORT virtual void Printf(PGLOBAL g, FILE *f, uint n); virtual void Prints(PGLOBAL g, char *ps, uint z); // PFIL Linearize(bool nosep); diff --git a/storage/connect/fmdlex.c b/storage/connect/fmdlex.c index 548a7ae5b..64429d9b9 100644 --- a/storage/connect/fmdlex.c +++ b/storage/connect/fmdlex.c @@ -417,10 +417,10 @@ static PDTP pp; static void MakeParm(int n); static void MakeMMDD(int n); static void MakeAMPM(int n); -static void MakeIn(char *); -static void MakeOut(char *); -static void Quotin(char *); -static void Quotout(char *); +static void MakeIn(const char *); +static void MakeOut(const char *); +static void Quotin(const char *); +static void Quotout(const char *); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1492,7 +1492,7 @@ void MakeAMPM(int n) } /* end of MakeAMPM */ -void MakeIn(char *text) +void MakeIn(const char *text) { if (!pp->InFmt) return; @@ -1500,14 +1500,14 @@ void MakeIn(char *text) strncat(pp->InFmt, text, (pp->Outsize - 1) - strlen(pp->InFmt)); } /* end of MakeIn */ -void MakeOut(char *text) +void MakeOut(const char *text) { if (!pp->OutFmt) return; strncat(pp->OutFmt, text, (pp->Outsize - 1) - strlen(pp->OutFmt)); } /* end of MakeOut */ -void Quotin(char *text) +void Quotin(const char *text) { if (!pp->InFmt) return; @@ -1516,7 +1516,7 @@ void Quotin(char *text) pp->InFmt[strlen(pp->InFmt)-1] = '\0'; } /* end of Quotin */ -void Quotout(char *text) +void Quotout(const char *text) { if (!pp->OutFmt) return; diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 692c7674e..787ec2aff 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -129,10 +129,13 @@ #if defined(ODBC_SUPPORT) #include "odbccat.h" #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) #include "tabjdbc.h" #include "jdbconn.h" -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT +#if defined(CMGO_SUPPORT) +#include "cmgoconn.h" +#endif // CMGO_SUPPORT #include "tabmysql.h" #include "filamdbf.h" #include "tabxcl.h" @@ -171,18 +174,18 @@ #define JSONMAX 10 // JSON Default max grp size extern "C" { - char version[]= "Version 1.06.0004 September 03, 2017"; + char version[]= "Version 1.06.0005 October 14, 2017"; #if defined(__WIN__) - char compver[]= "Version 1.06.0004 " __DATE__ " " __TIME__; + char compver[]= "Version 1.06.0005 " __DATE__ " " __TIME__; char slash= '\\'; #else // !__WIN__ char slash= '/'; #endif // !__WIN__ } // extern "C" -#if defined(NEW_MAR) +#if MYSQL_VERSION_ID > 100200 #define stored_in_db stored_in_db() -#endif // NEW_MAR) +#endif // MYSQL_VERSION_ID #if defined(XMAP) my_bool xmap= false; @@ -196,10 +199,10 @@ extern "C" { } // extern "C" #endif // XMSG -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) char *JvmPath; char *ClassPath; -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT pthread_mutex_t parmut; pthread_mutex_t usrmut; @@ -222,7 +225,7 @@ bool CheckSelf(PGLOBAL g, TABLE_SHARE *s, PCSZ host, PCSZ db, bool ZipLoadFile(PGLOBAL, PCSZ, PCSZ, PCSZ, bool, bool); bool ExactInfo(void); #if defined(CMGO_SUPPORT) -void mongo_init(bool); +//void mongo_init(bool); #endif // CMGO_SUPPORT USETEMP UseTemp(void); int GetConvSize(void); @@ -234,6 +237,8 @@ uint GetWorkSize(void); void SetWorkSize(uint); extern "C" const char *msglang(void); +static char *strz(PGLOBAL g, LEX_STRING &ls); + static void PopUser(PCONNECT xp); static PCONNECT GetUser(THD *thd, PCONNECT xp); static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp); @@ -350,14 +355,21 @@ static MYSQL_THDVAR_UINT(json_grp_size, "max number of rows for JSON aggregate functions.", NULL, NULL, JSONMAX, 1, INT_MAX, 1); -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) // Default java wrapper to use with JDBC tables static MYSQL_THDVAR_STR(java_wrapper, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC, "Java wrapper class name", // check_java_wrapper, update_java_wrapper, NULL, NULL, "wrappers/JdbcInterface"); -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT + +#if 0 // This is apparently not acceptable for a plugin +// Enabling MONGO table type +static MYSQL_THDVAR_BOOL(enable_mongo, PLUGIN_VAR_RQCMDARG, + "Enabling the MongoDB access", + NULL, NULL, MONGO_ENABLED); +#endif // 0 #if defined(MONGO_SUPPORT) // Enabling MONGO table type @@ -421,10 +433,14 @@ extern "C" const char *msglang(void) } // end of msglang #else // !XMSG && !NEWMSG -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) char *GetJavaWrapper(void) {return connect_hton ? THDVAR(current_thd, java_wrapper) : (char*)"wrappers/JdbcInterface";} -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT + +#if defined(JAVA_SUPPORT) +//bool MongoEnabled(void) { return THDVAR(current_thd, enable_mongo); } +#endif // JAVA_SUPPORT #if defined(MONGO_SUPPORT) bool MongoEnabled(void) { return THDVAR(current_thd, enable_mongo); } @@ -705,7 +721,7 @@ static int connect_init_func(void *p) XmlInitParserLib(); #endif // LIBXML2_SUPPORT -#if defined(CMGO_SUPPORT) +#if 0 //defined(CMGO_SUPPORT) mongo_init(true); #endif // CMGO_SUPPORT @@ -726,9 +742,9 @@ static int connect_init_func(void *p) DTVAL::SetTimeShift(); // Initialize time zone shift once for all BINCOL::SetEndian(); // Initialize host endian setting -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) JAVAConn::SetJVM(); -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT DBUG_RETURN(0); } // end of connect_init_func @@ -748,12 +764,12 @@ static int connect_done_func(void *) #endif // LIBXML2_SUPPORT #if defined(CMGO_SUPPORT) - mongo_init(false); + CMgoConn::mongo_init(false); #endif // CMGO_SUPPORT -#ifdef JDBC_SUPPORT +#ifdef JAVA_SUPPORT JAVAConn::ResetJVM(); -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #if !defined(__WIN__) PROFILE_End(); @@ -1758,7 +1774,7 @@ bool ha_connect::IsPartitioned(void) } // end of IsPartitioned -const char *ha_connect::GetDBName(const char* name) +PCSZ ha_connect::GetDBName(PCSZ name) { return (name) ? name : table->s->db.str; } // end of GetDBName @@ -1821,7 +1837,7 @@ void ha_connect::AddColName(char *cp, Field *fp) /***********************************************************************/ /* This function sets the current database path. */ /***********************************************************************/ -bool ha_connect::SetDataPath(PGLOBAL g, const char *path) +bool ha_connect::SetDataPath(PGLOBAL g, PCSZ path) { return (!(datapath= SetPath(g, path))); } // end of SetDataPath @@ -2181,7 +2197,7 @@ int ha_connect::MakeRecord(char *buf) /***********************************************************************/ /* Set row values from a MySQL pseudo record. Specific to MySQL. */ /***********************************************************************/ -int ha_connect::ScanRecord(PGLOBAL g, uchar *) +int ha_connect::ScanRecord(PGLOBAL g, const uchar *) { char attr_buffer[1024]; char data_buffer[1024]; @@ -2324,7 +2340,7 @@ int ha_connect::ScanRecord(PGLOBAL g, uchar *) /* Check change in index column. Specific to MySQL. */ /* Should be elaborated to check for real changes. */ /***********************************************************************/ -int ha_connect::CheckRecord(PGLOBAL g, const uchar *, uchar *newbuf) +int ha_connect::CheckRecord(PGLOBAL g, const uchar *, const uchar *newbuf) { return ScanRecord(g, newbuf); } // end of dummy CheckRecord @@ -2517,7 +2533,7 @@ const char *ha_connect::GetValStr(OPVAL vop, bool neg) val= (neg) ? " IS NOT NULL" : " IS NULL"; break; case OP_LIKE: - val= " LIKE "; + val= (neg) ? " NOT LIKE " : " LIKE "; break; case OP_XX: val= (neg) ? " NOT BETWEEN " : " BETWEEN "; @@ -2886,7 +2902,10 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) case Item_func::LE_FUNC: vop= OP_LE; break; case Item_func::GE_FUNC: vop= OP_GE; break; case Item_func::GT_FUNC: vop= OP_GT; break; - case Item_func::LIKE_FUNC: vop= OP_LIKE; break; + case Item_func::LIKE_FUNC: + vop= OP_LIKE; + neg = ((Item_func_opt_neg *)condf)->negated; + break; case Item_func::ISNOTNULL_FUNC: neg = true; // fall through @@ -4417,8 +4436,8 @@ bool ha_connect::IsSameIndex(PIXDEF xp1, PIXDEF xp2) return b; } // end of IsSameIndex -MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, - MODE newmode, bool *chk, bool *cras) +MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, + MODE newmode, bool *chk, bool *cras) { #if defined(DEVELOPMENT) if (true) { @@ -5386,13 +5405,11 @@ static int connect_assisted_discovery(handlerton *, THD* thd, bool cnc= false; int cto= -1, qto= -1; #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) || defined(MONGO_SUPPORT) -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) PJPARM sjp= NULL; -#endif // JDBC_SUPPORT PCSZ driver= NULL; char *url= NULL; -#endif // JDBC_SUPPORT || MONGO_SUPPORT +#endif // JAVA_SUPPORT uint tm, fnc= FNC_NO, supfnc= (FNC_NO | FNC_COL); bool bif, ok= false, dbf= false; TABTYPE ttp= TAB_UNDEF; @@ -5453,9 +5470,9 @@ static int connect_assisted_discovery(handlerton *, THD* thd, if ((ucnc= GetListOption(g, "UseDSN", topt->oplist))) cnc= (!*ucnc || *ucnc == 'y' || *ucnc == 'Y' || atoi(ucnc) != 0); #endif -#if defined(JDBC_SUPPORT) || defined(MONGO_SUPPORT) +#if defined(JAVA_SUPPORT) driver= GetListOption(g, "Driver", topt->oplist, NULL); -#endif // JDBC_SUPPORT || MONGO_SUPPORT +#endif // JAVA_SUPPORT #if defined(PROMPT_OK) cop= atoi(GetListOption(g, "checkdsn", topt->oplist, "0")); #endif // PROMPT_OK @@ -5542,7 +5559,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, supfnc |= (FNC_TABLE | FNC_DSN | FNC_DRIVER); break; #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) case TAB_JDBC: if (fnc & FNC_DRIVER) { ok = true; @@ -5576,10 +5593,10 @@ static int connect_assisted_discovery(handlerton *, THD* thd, supfnc |= (FNC_DRIVER | FNC_TABLE); break; -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT case TAB_DBF: dbf = true; - // fall through + // Passthru case TAB_CSV: if (!fn && fnc != FNC_NO) sprintf(g->Message, "Missing %s file name", topt->type); @@ -5633,10 +5650,8 @@ static int connect_assisted_discovery(handlerton *, THD* thd, ok = true; break; #endif // __WIN__ -#if defined(PIVOT_SUPPORT) case TAB_PIVOT: supfnc = FNC_NO; -#endif // PIVOT_SUPPORT case TAB_PRX: case TAB_TBL: case TAB_XCL: @@ -5667,14 +5682,14 @@ static int connect_assisted_discovery(handlerton *, THD* thd, ok = true; break; -#if defined(MONGO_SUPPORT) +#if defined(JAVA_SUPPORT) case TAB_MONGO: if (!topt->tabname) topt->tabname = tab; ok = true; break; -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT case TAB_VIR: ok = true; break; @@ -5747,7 +5762,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, break; #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) case TAB_JDBC: switch (fnc) { case FNC_NO: @@ -5776,7 +5791,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, } // endswitch info break; -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT case TAB_MYSQL: qrp = MyColumns(g, thd, host, db, user, pwd, tab, NULL, port, fnc == FNC_COL); @@ -5806,11 +5821,9 @@ static int connect_assisted_discovery(handlerton *, THD* thd, } // endif OcrColumns break; -#if defined(PIVOT_SUPPORT) case TAB_PIVOT: qrp = PivotColumns(g, tab, src, pic, fcl, skc, host, db, user, pwd, port); break; -#endif // PIVOT_SUPPORT case TAB_VIR: qrp = VirColumns(g, fnc == FNC_COL); break; @@ -5819,9 +5832,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, break; #if defined(MONGO_SUPPORT) case TAB_MONGO: - if (!(url = strz(g, create_info->connect_string)) || !*url) - url = "mongodb://localhost:27017"; - + url = strz(g, create_info->connect_string); qrp = MGOColumns(g, db, url, topt, fnc == FNC_COL); break; #endif // MONGO_SUPPORT @@ -5949,7 +5960,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, break; case FLD_SCHEM: -#if defined(ODBC_SUPPORT) || defined(JDBC_SUPPORT) +#if defined(ODBC_SUPPORT) || defined(JAVA_SUPPORT) if ((ttp == TAB_ODBC || ttp == TAB_JDBC) && crp->Kdata) { if (schem && stricmp(schem, crp->Kdata->GetCharValue(i))) { sprintf(g->Message, @@ -5960,7 +5971,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, schem = crp->Kdata->GetCharValue(i); } // endif ttp -#endif // ODBC_SUPPORT || JDBC_SUPPORT +#endif // ODBC_SUPPORT || JAVA_SUPPORT default: break; // Ignore } // endswitch Fld @@ -6008,7 +6019,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, } else #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) if (ttp == TAB_JDBC) { int plgtyp; @@ -7151,7 +7162,7 @@ static MYSQL_SYSVAR_STR(errmsg_dir_path, msg_path, "../../../../storage/connect/"); // for testing #endif // XMSG -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) static MYSQL_SYSVAR_STR(jvm_path, JvmPath, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC, "Path to the directory where is the JVM lib", @@ -7163,7 +7174,7 @@ static MYSQL_SYSVAR_STR(class_path, ClassPath, "Java class path", // check_class_path, update_class_path, NULL, NULL, NULL); -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT static struct st_mysql_sys_var* connect_system_variables[]= { @@ -7184,14 +7195,14 @@ static struct st_mysql_sys_var* connect_system_variables[]= { #endif // XMSG MYSQL_SYSVAR(json_null), MYSQL_SYSVAR(json_grp_size), -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) MYSQL_SYSVAR(jvm_path), MYSQL_SYSVAR(class_path), MYSQL_SYSVAR(java_wrapper), -#endif // JDBC_SUPPORT -#if defined(MONGO_SUPPORT) - MYSQL_SYSVAR(enable_mongo), -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT +#if defined(JAVA_SUPPORT) +//MYSQL_SYSVAR(enable_mongo), +#endif // JAVA_SUPPORT NULL }; @@ -7208,7 +7219,7 @@ maria_declare_plugin(connect) 0x0106, /* version number (1.05) */ NULL, /* status variables */ connect_system_variables, /* system variables */ - "1.06.0004", /* string version */ + "1.06.0005", /* string version */ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */ } maria_declare_plugin_end; diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h index e839590db..4c5bf5856 100644 --- a/storage/connect/ha_connect.h +++ b/storage/connect/ha_connect.h @@ -32,8 +32,6 @@ /****************************************************************************/ #include "mycat.h" -static char *strz(PGLOBAL g, LEX_STRING &ls); - /****************************************************************************/ /* Structures used to pass info between CONNECT and ha_connect. */ /****************************************************************************/ @@ -207,13 +205,13 @@ class ha_connect: public handler bool IsOpened(void); int CloseTable(PGLOBAL g); int MakeRecord(char *buf); - int ScanRecord(PGLOBAL g, uchar *buf); - int CheckRecord(PGLOBAL g, const uchar *oldbuf, uchar *newbuf); + int ScanRecord(PGLOBAL g, const uchar *buf); + int CheckRecord(PGLOBAL g, const uchar *oldbuf, const uchar *newbuf); int ReadIndexed(uchar *buf, OPVAL op, const key_range *kr= NULL); bool IsIndexed(Field *fp); bool MakeKeyWhere(PGLOBAL g, PSTRG qry, OPVAL op, char q, const key_range *kr); - inline char *Strz(LEX_STRING &ls); +//inline char *Strz(LEX_STRING &ls); key_range start_key; @@ -231,7 +229,7 @@ class ha_connect: public handler /** @brief The file extensions. */ - const char **bas_ext() const; +//const char **bas_ext() const; /** Check if a storage engine supports a particular alter table in-place diff --git a/storage/connect/javaconn.cpp b/storage/connect/javaconn.cpp index 3ba99ed89..90f834ef9 100644 --- a/storage/connect/javaconn.cpp +++ b/storage/connect/javaconn.cpp @@ -17,7 +17,7 @@ /* Include relevant MariaDB header file. */ /***********************************************************************/ #include -#include +//#include #if defined(__WIN__) #include // for getcwd #if defined(__BORLANDC__) @@ -57,6 +57,7 @@ extern "C" HINSTANCE s_hModule; // Saved module handle extern char *JvmPath; // The connect_jvm_path global variable value extern char *ClassPath; // The connect_class_path global variable value +char *GetPluginDir(void); char *GetJavaWrapper(void); // The connect_java_wrapper variable value /***********************************************************************/ @@ -453,7 +454,7 @@ bool JAVAConn::Open(PGLOBAL g) vm_args.options = options; vm_args.ignoreUnrecognized = false; // invalid options make the JVM init fail - //=============== load and initialize Java VM and JNI interface ============= + //=============== load and initialize Java VM and JNI interface ============= rc = CreateJavaVM(&jvm, (void**)&env, &vm_args); // YES !! delete options; // we then no longer need the initialisation options. diff --git a/storage/connect/javaconn.h b/storage/connect/javaconn.h index 5d8257036..54b7c4e92 100644 --- a/storage/connect/javaconn.h +++ b/storage/connect/javaconn.h @@ -54,12 +54,12 @@ typedef jint(JNICALL *GETJVM) (JavaVM **, jsize, jsize *); typedef jint(JNICALL *GETDEF) (void *); #endif // _DEBUG -class JAVAConn; +//class JAVAConn; /***********************************************************************/ /* JAVAConn class. */ /***********************************************************************/ -class JAVAConn : public BLOCK { +class DllExport JAVAConn : public BLOCK { friend class TDBJMG; friend class JMGDISC; private: diff --git a/storage/connect/jdbccat.h b/storage/connect/jdbccat.h index 1210aff77..d137164b5 100644 --- a/storage/connect/jdbccat.h +++ b/storage/connect/jdbccat.h @@ -6,7 +6,7 @@ #define DEFAULT_QUERY_TIMEOUT -1 // means do not set typedef struct jdbc_parms { - int CheckSize(int rows); + int CheckSize(int rows); PCSZ Driver; // JDBC driver PCSZ Url; // Driver URL PCSZ User; // User connect info diff --git a/storage/connect/jdbconn.cpp b/storage/connect/jdbconn.cpp index cfe74caba..4c21c2c96 100644 --- a/storage/connect/jdbconn.cpp +++ b/storage/connect/jdbconn.cpp @@ -654,7 +654,7 @@ bool JDBConn::Connect(PJPARM sop) if (gmID(g, typid, "ColumnType", "(ILjava/lang/String;)I")) return true; else - m_Opened = true; + m_Connected = true; return false; } // end of Connect diff --git a/storage/connect/jmgoconn.cpp b/storage/connect/jmgoconn.cpp index 7535431c8..4736641ef 100644 --- a/storage/connect/jmgoconn.cpp +++ b/storage/connect/jmgoconn.cpp @@ -25,6 +25,7 @@ #define nullptr 0 bool IsNum(PSZ s); +bool MakeSelector(PGLOBAL g, PFIL fp, PSTRG s); /* --------------------------- Class JNCOL --------------------------- */ @@ -123,12 +124,13 @@ void JMgoConn::AddJars(PSTRG jpop, char sep) #if defined(DEVELOPMENT) if (m_Version == 2) { jpop->Append(sep); - jpop->Append("C:/Eclipse/workspace/MongoWrap2/bin"); +// jpop->Append("C:/Eclipse/workspace/MongoWrap2/bin"); jpop->Append(sep); jpop->Append("C:/mongo-java-driver/mongo-java-driver-2.13.3.jar"); } else { jpop->Append(sep); - jpop->Append("C:/Eclipse/workspace/MongoWrap3/bin"); +// jpop->Append("C:/Eclipse/workspace/MongoWrap3/bin"); +// jpop->Append("C:/Program Files/MariaDB 10.1/lib/plugin/JavaWrappers.jar"); jpop->Append(sep); jpop->Append("C:/mongo-java-driver/mongo-java-driver-3.4.2.jar"); } // endif m_Version @@ -238,6 +240,7 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options, PSZ jp; PCSZ op = NULL, sf = NULL, Options = options; PSTRG s = NULL; + PFIL filp = tdbp->GetFilter(); if (Options && !stricmp(Options, "all")) { Options = NULL; @@ -264,10 +267,10 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options, s = new(g) STRING(g, 1023, (PSZ)Options); - if (tdbp->GetFilter()) { + if (filp) { s->Append(",{\"$match\":"); - if (tdbp->GetFilter()->MakeSelector(g, s)) { + if (MakeSelector(g, filp, s)) { strcpy(g->Message, "Failed making selector"); return NULL; } else @@ -314,15 +317,15 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options, return AggregateCollection(p); } else { - if (filter || tdbp->GetFilter()) { + if (filter || filp) { if (trace) { if (filter) htrc("Filter: %s\n", filter); - if (tdbp->GetFilter()) { + if (filp) { char buf[512]; - tdbp->GetFilter()->Prints(g, buf, 511); + filp->Prints(g, buf, 511); htrc("To_Filter: %s\n", buf); } // endif To_Filter @@ -331,11 +334,11 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options, s = new(g) STRING(g, 1023, (PSZ)filter); len = s->GetLength(); - if (tdbp->GetFilter()) { + if (filp) { if (filter) s->Append(','); - if (tdbp->GetFilter()->MakeSelector(g, s)) { + if (MakeSelector(g, filp, s)) { strcpy(g->Message, "Failed making selector"); return NULL; } // endif Selector diff --git a/storage/connect/json.h b/storage/connect/json.h index cf7b2b187..375532212 100644 --- a/storage/connect/json.h +++ b/storage/connect/json.h @@ -53,8 +53,8 @@ PSZ Serialize(PGLOBAL g, PJSON jsp, char *fn, int pretty); bool SerializeArray(JOUT *js, PJAR jarp, bool b); bool SerializeObject(JOUT *js, PJOB jobp); bool SerializeValue(JOUT *js, PJVAL jvp); -bool IsNum(PSZ s); char *NextChr(PSZ s, char sep); +DllExport bool IsNum(PSZ s); /***********************************************************************/ /* Class JOUT. Used by Serialize. */ diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp index 4f0978cb5..504ea837f 100644 --- a/storage/connect/jsonudf.cpp +++ b/storage/connect/jsonudf.cpp @@ -497,28 +497,23 @@ PVAL JSNX::ExpandArray(PGLOBAL g, PJAR arp, int n) /*********************************************************************************/ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n) { -//int i, ars, nv = 0, nextsame = Tjp->NextSame; - int i, nv = 0, nextsame = 0; - my_bool err; + int i, ars = arp->size(), nv = 0; + bool err; OPVAL op = Nodes[n].Op; PVAL val[2], vp = Nodes[n].Valp; PJVAL jvrp, jvp; JVALUE jval; vp->Reset(); -//ars = arp->size(); if (trace) - htrc("CalculateArray size=%d\n", arp->size()); -// htrc("CalculateArray size=%d\n", ars); + htrc("CalculateArray size=%d op=%d\n", ars, op); for (i = 0; i < arp->size(); i++) { -//for (i = 0; i < ars; i++) { because compiler bug jvrp = arp->GetValue(i); if (trace) - htrc("Value %s null=%d nv=%d\n", - jvrp->GetString(g), jvrp->IsNull() ? 1 : 0, nv); + htrc("i=%d nv=%d\n", i, nv); if (!jvrp->IsNull() || (op == OP_CNC && GetJsonNull())) { if (jvrp->IsNull()) { @@ -530,6 +525,10 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n) } else jvp = jvrp; + if (trace) + htrc("jvp=%s null=%d\n", + jvp->GetString(g), jvp->IsNull() ? 1 : 0); + if (!nv++) { SetJsonValue(g, vp, jvp, n); continue; @@ -562,6 +561,13 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n) if (err) vp->Reset(); + if (trace) { + char buf(32); + + htrc("vp='%s' err=%d\n", + vp->GetCharString(&buf), err ? 1 : 0); + } // endif trace + } // endif Zero } // endif jvrp @@ -579,7 +585,6 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n) } // endif Op -//Tjp->NextSame = nextsame; return vp; } // end of CalculateArray @@ -1510,7 +1515,7 @@ static my_bool CheckMemory(PGLOBAL g, UDF_INIT *initid, UDF_ARGS *args, uint n, if (!(g->Sarea = PlugAllocMem(g, ml))) { char errmsg[MAX_STR]; - sprintf(errmsg, MSG(WORK_AREA), g->Message); + snprintf(errmsg, sizeof(errmsg)-1, MSG(WORK_AREA), g->Message); strcpy(g->Message, errmsg); g->Sarea_Size = 0; return true; diff --git a/storage/connect/mongo.cpp b/storage/connect/mongo.cpp index 12f2f4281..088dc2d29 100644 --- a/storage/connect/mongo.cpp +++ b/storage/connect/mongo.cpp @@ -18,12 +18,13 @@ #include "plgdbsem.h" #include "xtable.h" #include "tabext.h" +#include "filter.h" #if defined(CMGO_SUPPORT) #include "tabcmg.h" -#endif // MONGO_SUPPORT -#if defined(JDBC_SUPPORT) +#endif // CMGO_SUPPORT +#if defined(JAVA_SUPPORT) #include "tabjmg.h" -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #include "resource.h" /***********************************************************************/ @@ -32,8 +33,89 @@ #define MAXCOL 200 /* Default max column nb in result */ #define TYPE_UNKNOWN 12 /* Must be greater than other types */ +bool MakeSelector(PGLOBAL g, PFIL fp, PSTRG s); bool IsNum(PSZ s); +/***********************************************************************/ +/* Make selector json representation for Mongo tables. */ +/***********************************************************************/ +bool MakeSelector(PGLOBAL g, PFIL fp, PSTRG s) +{ + OPVAL opc = fp->GetOpc(); + + s->Append('{'); + + if (opc == OP_AND || opc == OP_OR) { + if (fp->GetArgType(0) != TYPE_FILTER || fp->GetArgType(1) != TYPE_FILTER) + return true; + + s->Append("\"$"); + s->Append(opc == OP_AND ? "and" : "or"); + s->Append("\":["); + + if (MakeSelector(g, (PFIL)fp->Arg(0), s)) + return true; + + s->Append(','); + + if (MakeSelector(g, (PFIL)fp->Arg(1), s)) + return true; + + s->Append(']'); + } else { + if (fp->GetArgType(0) != TYPE_COLBLK) + return true; + + s->Append('"'); + s->Append(((PCOL)fp->Arg(0))->GetJpath(g, false)); + s->Append("\":{\"$"); + + switch (opc) { + case OP_EQ: + s->Append("eq"); + break; + case OP_NE: + s->Append("ne"); + break; + case OP_GT: + s->Append("gt"); + break; + case OP_GE: + s->Append("gte"); + break; + case OP_LT: + s->Append("lt"); + break; + case OP_LE: + s->Append("lte"); + break; + case OP_NULL: + case OP_LIKE: + case OP_EXIST: + default: + return true; + } // endswitch Opc + + s->Append("\":"); + + if (fp->GetArgType(1) == TYPE_COLBLK) { + s->Append("\"$"); + s->Append(((PEXTCOL)fp->Arg(1))->GetJpath(g, false)); + s->Append('"'); + } else { + char buf[501]; + + fp->Arg(1)->Prints(g, buf, 500); + s->Append(buf); + } // endif Type + + s->Append('}'); + } // endif opc + + s->Append('}'); + return false; +} // end of MakeSelector + /***********************************************************************/ /* MGOColumns: construct the result blocks containing the description */ /* of all the columns of a document contained inside MongoDB. */ @@ -49,7 +131,7 @@ PQRYRES MGOColumns(PGLOBAL g, PCSZ db, PCSZ uri, PTOS topt, bool info) int i, n = 0; PCSZ drv; PBCOL bcp; - MGODISC *cmgd; + MGODISC *cmgd = NULL; PQRYRES qrp; PCOLRES crp; @@ -72,7 +154,7 @@ PQRYRES MGOColumns(PGLOBAL g, PCSZ db, PCSZ uri, PTOS topt, bool info) goto err; #endif } else if (drv && toupper(*drv) == 'J') { -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) cmgd = new(g) JMGDISC(g, (int*)length); #else sprintf(g->Message, "Mongo %s Driver not available", "Java"); @@ -142,7 +224,7 @@ PQRYRES MGOColumns(PGLOBAL g, PCSZ db, PCSZ uri, PTOS topt, bool info) return qrp; err: - if (cmgd->tmgp) + if (cmgd && cmgd->tmgp) cmgd->tmgp->CloseDB(g); return NULL; @@ -181,7 +263,7 @@ int MGODISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ uri, PTOS topt) /* Open the MongoDB collection. */ /*********************************************************************/ tdp = new(g) MGODEF; - tdp->Uri = uri; + tdp->Uri = (uri && *uri) ? uri : "mongodb://localhost:27017"; tdp->Driver = drv; tdp->Tabname = GetStringTableOption(g, topt, "Name", NULL); tdp->Tabname = GetStringTableOption(g, topt, "Tabname", tdp->Tabname); @@ -346,7 +428,7 @@ PTDB MGODEF::GetTable(PGLOBAL g, MODE m) return NULL; #endif } else if (Driver && toupper(*Driver) == 'J') { -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) if (Catfunc == FNC_COL) return new(g) TDBJGL(this); else diff --git a/storage/connect/mongo.h b/storage/connect/mongo.h index af69226ea..97c391a21 100644 --- a/storage/connect/mongo.h +++ b/storage/connect/mongo.h @@ -63,7 +63,7 @@ class DllExport MGODEF : public EXTDEF { /* Table description */ friend class TDBJGL; friend class CMGFAM; friend class MGODISC; - friend PQRYRES MGOColumns(PGLOBAL, PCSZ, PCSZ, PTOS, bool); + friend DllExport PQRYRES MGOColumns(PGLOBAL, PCSZ, PCSZ, PTOS, bool); public: // Constructor MGODEF(void); diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc index 0f8d7b76b..bb77512be 100644 --- a/storage/connect/mycat.cc +++ b/storage/connect/mycat.cc @@ -83,22 +83,20 @@ #define NODBC #include "tabodbc.h" #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) #define NJDBC #include "tabjdbc.h" -#endif // JDBC_SUPPORT -#if defined(PIVOT_SUPPORT) +#endif // JAVA_SUPPORT #include "tabpivot.h" -#endif // PIVOT_SUPPORT #include "tabvir.h" #include "tabjson.h" #include "ha_connect.h" #if defined(XML_SUPPORT) #include "tabxml.h" #endif // XML_SUPPORT -#if defined(MONGO_SUPPORT) +#if defined(JAVA_SUPPORT) #include "mongo.h" -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT #if defined(ZIP_SUPPORT) #include "tabzip.h" #endif // ZIP_SUPPORT @@ -111,9 +109,9 @@ extern "C" HINSTANCE s_hModule; // Saved module handle #endif // !__WIN__ -#if defined(MONGO_SUPPORT) -bool MongoEnabled(void); -#endif // MONGO_SUPPORT +#if defined(JAVA_SUPPORT) +//bool MongoEnabled(void); +#endif // JAVA_SUPPORT PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info); /***********************************************************************/ @@ -144,8 +142,9 @@ TABTYPE GetTypeID(const char *type) #if defined(ODBC_SUPPORT) : (!stricmp(type, "ODBC")) ? TAB_ODBC #endif -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) : (!stricmp(type, "JDBC")) ? TAB_JDBC + : (!stricmp(type, "MONGO")) ? TAB_MONGO #endif : (!stricmp(type, "MYSQL")) ? TAB_MYSQL : (!stricmp(type, "MYPRX")) ? TAB_MYSQL @@ -159,16 +158,11 @@ TABTYPE GetTypeID(const char *type) : (!stricmp(type, "OCCUR")) ? TAB_OCCUR : (!stricmp(type, "CATLG")) ? TAB_PRX // Legacy : (!stricmp(type, "PROXY")) ? TAB_PRX -#if defined(PIVOT_SUPPORT) : (!stricmp(type, "PIVOT")) ? TAB_PIVOT -#endif : (!stricmp(type, "VIR")) ? TAB_VIR : (!stricmp(type, "JSON")) ? TAB_JSON #if defined(ZIP_SUPPORT) : (!stricmp(type, "ZIP")) ? TAB_ZIP -#endif -#if defined(MONGO_SUPPORT) - : (!stricmp(type, "MONGO")) ? TAB_MONGO #endif : (!stricmp(type, "OEM")) ? TAB_OEM : TAB_NIY; } // end of GetTypeID @@ -542,9 +536,9 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) #if defined(ODBC_SUPPORT) case TAB_ODBC: tdp= new(g) ODBCDEF; break; #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) case TAB_JDBC: tdp= new(g) JDBCDEF; break; -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #if defined(__WIN__) case TAB_MAC: tdp= new(g) MACDEF; break; case TAB_WMI: tdp= new(g) WMIDEF; break; @@ -555,17 +549,15 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) case TAB_PRX: tdp= new(g) PRXDEF; break; case TAB_OCCUR: tdp= new(g) OCCURDEF; break; case TAB_MYSQL: tdp= new(g) MYSQLDEF; break; -#if defined(PIVOT_SUPPORT) case TAB_PIVOT: tdp= new(g) PIVOTDEF; break; -#endif // PIVOT_SUPPORT case TAB_VIR: tdp= new(g) VIRDEF; break; case TAB_JSON: tdp= new(g) JSONDEF; break; #if defined(MONGO_SUPPORT) case TAB_MONGO: - if (MongoEnabled()) +// if (MongoEnabled()) tdp = new(g) MGODEF; - else - strcpy(g->Message, "MONGO type not enabled"); +// else +// strcpy(g->Message, "MONGO type not enabled"); break; #endif // MONGO_SUPPORT diff --git a/storage/connect/mysql-test/connect/r/json_java_2.result b/storage/connect/mysql-test/connect/r/json_java_2.result index ad1ca0fe8..783d86e65 100644 --- a/storage/connect/mysql-test/connect/r/json_java_2.result +++ b/storage/connect/mysql-test/connect/r/json_java_2.result @@ -1,5 +1,4 @@ -SET GLOBAL connect_class_path='C:/MariaDB-10.0/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar'; -set connect_enable_mongo=1; +SET GLOBAL connect_class_path='C:/MariaDB-10.1/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar'; # # Test the MONGO table type # @@ -310,7 +309,7 @@ loc_0 double(12,6) NOT NULL `FIELD_FORMAT`='loc.0', loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=JSON TABNAME='cities' OPTION_LIST='Driver=Java,Version=2' CONNECTION='mongodb://localhost:27017' LRECL=4096 DATA_CHARSET='utf8'; # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -382,4 +381,3 @@ planner 167 41.75 postcard 23 5.75 DROP TABLE t1; true -set connect_enable_mongo=0; diff --git a/storage/connect/mysql-test/connect/r/json_java_3.result b/storage/connect/mysql-test/connect/r/json_java_3.result index d7d185956..a301e0273 100644 --- a/storage/connect/mysql-test/connect/r/json_java_3.result +++ b/storage/connect/mysql-test/connect/r/json_java_3.result @@ -1,5 +1,4 @@ -SET GLOBAL connect_class_path='C:/MariaDB-10.0/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar'; -set connect_enable_mongo=1; +SET GLOBAL connect_class_path='C:/MariaDB-10.1/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar'; # # Test the MONGO table type # @@ -310,7 +309,7 @@ loc_0 double(12,6) NOT NULL `FIELD_FORMAT`='loc.0', loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=JSON TABNAME='cities' OPTION_LIST='Driver=Java,Version=3' CONNECTION='mongodb://localhost:27017' LRECL=4096 DATA_CHARSET='utf8'; # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -382,4 +381,3 @@ planner 167 41.75 postcard 23 5.75 DROP TABLE t1; true -set connect_enable_mongo=0; diff --git a/storage/connect/mysql-test/connect/r/json_mongo_c.result b/storage/connect/mysql-test/connect/r/json_mongo_c.result index afcad8d2e..8adc006a5 100644 --- a/storage/connect/mysql-test/connect/r/json_mongo_c.result +++ b/storage/connect/mysql-test/connect/r/json_mongo_c.result @@ -1,4 +1,3 @@ -set connect_enable_mongo=1; # # Test the MONGO table type # @@ -309,7 +308,7 @@ loc_0 double(12,6) NOT NULL `FIELD_FORMAT`='loc.0', loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=JSON TABNAME='cities' OPTION_LIST='Driver=C,Version=0' CONNECTION='mongodb://localhost:27017' LRECL=1024 DATA_CHARSET='utf8'; # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -381,4 +380,3 @@ planner 167 41.75 postcard 23 5.75 DROP TABLE t1; true -set connect_enable_mongo=0; diff --git a/storage/connect/mysql-test/connect/r/mongo_c.result b/storage/connect/mysql-test/connect/r/mongo_c.result index f90f3a94b..c7aadcf11 100644 --- a/storage/connect/mysql-test/connect/r/mongo_c.result +++ b/storage/connect/mysql-test/connect/r/mongo_c.result @@ -1,4 +1,3 @@ -set connect_enable_mongo=1; # # Test the MONGO table type # @@ -305,7 +304,7 @@ loc_0 double(12,6) NOT NULL `FIELD_FORMAT`='loc.0', loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=MONGO TABNAME='cities' OPTION_LIST='Driver=C,Version=0' DATA_CHARSET='utf8'; # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -377,4 +376,3 @@ planner 167 41.750000 postcard 23 5.750000 DROP TABLE t1; true -set connect_enable_mongo=0; diff --git a/storage/connect/mysql-test/connect/r/mongo_java_2.result b/storage/connect/mysql-test/connect/r/mongo_java_2.result index a77ccd2d4..708b6f1cc 100644 --- a/storage/connect/mysql-test/connect/r/mongo_java_2.result +++ b/storage/connect/mysql-test/connect/r/mongo_java_2.result @@ -1,5 +1,4 @@ -SET GLOBAL connect_class_path='C:/MariaDB-10.0/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar'; -set connect_enable_mongo=1; +SET GLOBAL connect_class_path='C:/MariaDB-10.1/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar'; # # Test the MONGO table type # @@ -306,7 +305,7 @@ loc_0 double(12,6) NOT NULL `FIELD_FORMAT`='loc.0', loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=MONGO TABNAME='cities' OPTION_LIST='Driver=Java,Version=2' DATA_CHARSET='utf8'; # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -378,4 +377,3 @@ planner 167 41.75 postcard 23 5.75 DROP TABLE t1; true -set connect_enable_mongo=0; diff --git a/storage/connect/mysql-test/connect/r/mongo_java_3.result b/storage/connect/mysql-test/connect/r/mongo_java_3.result index ceb1be9dd..672d9f15b 100644 --- a/storage/connect/mysql-test/connect/r/mongo_java_3.result +++ b/storage/connect/mysql-test/connect/r/mongo_java_3.result @@ -1,5 +1,4 @@ -SET GLOBAL connect_class_path='C:/MariaDB-10.0/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar'; -set connect_enable_mongo=1; +SET GLOBAL connect_class_path='C:/MariaDB-10.1/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar'; # # Test the MONGO table type # @@ -306,7 +305,7 @@ loc_0 double(12,6) NOT NULL `FIELD_FORMAT`='loc.0', loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=MONGO TABNAME='cities' OPTION_LIST='Driver=Java,Version=3' DATA_CHARSET='utf8'; # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -378,4 +377,3 @@ planner 167 41.75 postcard 23 5.75 DROP TABLE t1; true -set connect_enable_mongo=0; diff --git a/storage/connect/mysql-test/connect/r/odbc_firebird.result b/storage/connect/mysql-test/connect/r/odbc_firebird.result index b0c2582ab..3c4cd84ff 100644 --- a/storage/connect/mysql-test/connect/r/odbc_firebird.result +++ b/storage/connect/mysql-test/connect/r/odbc_firebird.result @@ -9,29 +9,13 @@ t1 CREATE TABLE `t1` ( ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Sources' SELECT * FROM t1; Name Description -dBASE Files Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx) -PLUGDB_DEBUG PLUGODBC_Driver -PLUGDB_ODBC PLUGODBC_Driver -SafeDB_ODBC SDB_ODBC_Driver -Firebird Firebird/InterBase(r) driver -ConnectEngineXLS Microsoft Excel Driver (*.xls) Excel Files Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb) -MariaODBC MySQL ODBC 5.2a Driver -MariaODBCbeta MariaDB ODBC 1.0 Driver -MyODBC MySQL ODBC 5.2a Driver MS Access Database Microsoft Access Driver (*.mdb, *.accdb) -MS Access Db1 Microsoft Access Driver (*.mdb) -MySQL-ANSI MySQL ODBC 5.3 ANSI Driver -MySQL-Unicode MySQL ODBC 5.3 Unicode Driver -Xtreme Sample Database 2008 Microsoft Access Driver (*.mdb) -PlugDB test PLUGODBC_Driver -SQLite3 Datasource SQLite3 ODBC Driver -SQLite Datasource SQLite ODBC Driver -SQLite UTF-8 Datasource SQLite ODBC (UTF-8) Driver ORACLE_TEST Oracle in XE -ConnectEnginePostgresql PostgreSQL ODBC Driver(ANSI) +SQLServer_Test SQL Server Native Client 11.0 +Firebird Firebird/InterBase(r) driver ConnectEngineOracle Oracle in XE -ConnectEngineSQLServer SQL Server +ConnectEngineSQLServer SQL Server Native Client 11.0 DROP TABLE t1; CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=Drivers; SHOW CREATE TABLE t1; @@ -42,51 +26,12 @@ t1 CREATE TABLE `t1` ( ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Drivers' SELECT * FROM t1; Description Attributes -SQL Server UsageCount=1;SQLLevel=1;FileUsage=0;DriverODBCVer=03.50;ConnectFunctions=YYY;APILevel=2;CPTimeout=60; -Microsoft ODBC for Oracle UsageCount=1;SQLLevel=1;FileUsage=0;DriverODBCVer=02.50;ConnectFunctions=YYY;APILevel=1;CPTimeout=120; -Microsoft Access Driver (*.mdb) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=2;FileExtns=*.mdb;SQLLevel=0; -Microsoft Access-Treiber (*.mdb) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=2;FileExtns=*.mdb;SQLLevel=0; -Driver do Microsoft Access (*.mdb) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=2;FileExtns=*.mdb;SQLLevel=0; -Microsoft dBase Driver (*.dbf) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.ndx,*.mdx;SQLLevel=0; -Microsoft dBase-Treiber (*.dbf) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.ndx,*.mdx;SQLLevel=0; -Driver do Microsoft dBase (*.dbf) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.ndx,*.mdx;SQLLevel=0; -Microsoft Excel Driver (*.xls) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.xls;SQLLevel=0; -Microsoft Excel-Treiber (*.xls) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.xls;SQLLevel=0; -Driver do Microsoft Excel(*.xls) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.xls;SQLLevel=0; -Microsoft Paradox Driver (*.db ) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.db;SQLLevel=0; -Microsoft Paradox-Treiber (*.db ) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.db;SQLLevel=0; -Driver do Microsoft Paradox (*.db ) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.db;SQLLevel=0; -Microsoft Text Driver (*.txt; *.csv) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.,*.asc,*.csv,*.tab,*.txt,*.csv;SQLLevel=0; -Microsoft Text-Treiber (*.txt; *.csv) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.,*.asc,*.csv,*.tab,*.txt,*.csv;SQLLevel=0; -Driver da Microsoft para arquivos texto (*.txt; *.csv) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.,*.asc,*.csv,*.tab,*.txt,*.csv;SQLLevel=0; -Microsoft Visual FoxPro Driver UsageCount=1;APILevel=0;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.cdx,*.idx,*.fpt;SQLLevel=0; -Microsoft FoxPro VFP Driver (*.dbf) UsageCount=1;APILevel=0;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.cdx,*.idx,*.fpt;SQLLevel=0; -Microsoft dBase VFP Driver (*.dbf) UsageCount=1;APILevel=0;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.cdx,*.idx,*.fpt;SQLLevel=0; -Microsoft Visual FoxPro-Treiber UsageCount=1;APILevel=0;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.cdx,*.idx,*.fpt;SQLLevel=0; -Driver para o Microsoft Visual FoxPro UsageCount=1;APILevel=0;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.cdx,*.idx,*.fpt;SQLLevel=0; -SQL Native Client UsageCount=1;APILevel=2;ConnectFunctions=YYY;CPTimeout=60;DriverODBCVer=09.00;FileUsage=0;SQLLevel=1; -CR Sybase Wire Protocol ODBC Driver 6.0 UsageCount=1;APILevel=1;ConnectFunctions=YYY;DriverODBCVer=3.52;FileUsage=0;SQLLevel=0;CPTimeout=60;HelpRootDirectory=C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\odbc\help; -CR SQL Server Native Wire Protocol ODBC Driver 6.0 UsageCount=1;APILevel=1;ConnectFunctions=YYY;DriverODBCVer=3.52;FileUsage=0;SQLLevel=1;CPTimeout=60;HelpRootDirectory=C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\odbc\help; -CR SQL Server Classic Wire Protocol ODBC Driver 6.0 UsageCount=1;APILevel=1;ConnectFunctions=YYY;DriverODBCVer=3.52;FileUsage=0;SQLLevel=1;CPTimeout=60;HelpRootDirectory=C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\odbc\help; -CR TextFile ODBC Driver 6.0 UsageCount=1;APILevel=1;ConnectFunctions=YYY;DriverODBCVer=3.52;FileUsage=1;FileExtns=*.*;SQLLevel=0;CPTimeout=60;HelpRootDirectory=C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\odbc\help; -PLUGODBC_Driver UsageCount=1; -SDB_ODBC_Driver UsageCount=2; -Microsoft Access Text Driver (*.txt, *.csv) SQLLevel=0;FileExtns=*.txt, *.csv;FileUsage=2;DriverODBCVer=02.50;ConnectFunctions=YYN;APILevel=1;UsageCount=3; -Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx) SQLLevel=0;FileExtns=*.dbf, *.ndx, *.mdx;FileUsage=2;DriverODBCVer=02.50;ConnectFunctions=YYN;APILevel=1;UsageCount=3; -Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb) SQLLevel=0;FileExtns=*.xls,*.xlsx, *.xlsb;FileUsage=2;DriverODBCVer=02.50;ConnectFunctions=YYN;APILevel=1;UsageCount=3; -Microsoft Access Driver (*.mdb, *.accdb) SQLLevel=0;FileExtns=*.mdb,*.accdb;FileUsage=2;DriverODBCVer=02.50;ConnectFunctions=YYN;APILevel=1;UsageCount=3; -SQLite3 ODBC Driver UsageCount=1; -SQLite ODBC Driver UsageCount=1; -SQLite ODBC (UTF-8) Driver UsageCount=1; +SQL Server APILevel=2;ConnectFunctions=YYY;CPTimeout=60;DriverODBCVer=03.50;FileUsage=0;SQLLevel=1;UsageCount=1; Oracle in XE ConnectionFunctions=YYY;DriverODBCVer=03.51;CPTimeout=60;FileUsage=0;APILevel=1;SQLLevel=1; -Oracle in instantclient_12_1 APILevel=1;ConnectionFunctions=YYY;CPTimeout=60;DriverODBCVer=03.51;FileUsage=0;SQLLevel=1; -PostgreSQL ODBC Driver(ANSI) APILevel=1;ConnectFunctions=YYN;DriverODBCVer=09.02.0100;FileUsage=0;SQLLevel=1; -PostgreSQL ODBC Driver(UNICODE) APILevel=1;ConnectFunctions=YYN;DriverODBCVer=09.02.0100;FileUsage=0;SQLLevel=1; SQL Server Native Client 11.0 UsageCount=1;APILevel=2;ConnectFunctions=YYY;CPTimeout=60;DriverODBCVer=03.80;FileUsage=0;SQLLevel=1; -MariaDB ODBC 1.0 Driver UsageCount=1; +ODBC Driver 13 for SQL Server UsageCount=1;APILevel=2;ConnectFunctions=YYY;CPTimeout=60;DriverODBCVer=03.80;FileUsage=0;SQLLevel=1; +SQL Server Native Client RDA 11.0 UsageCount=1;APILevel=2;ConnectFunctions=YYY;CPTimeout=60;DriverODBCVer=03.80;FileUsage=0;SQLLevel=1; Firebird/InterBase(r) driver UsageCount=1;FileExtns=*.fdb,*.gdb;APILevel=1;ConnectFunctions=YYY;FileUsage=0;DriverODBCVer=03.51;SQLLevel=1; -MySQL ODBC 5.3 ANSI Driver UsageCount=1; -MySQL ODBC 5.3 Unicode Driver UsageCount=1; DROP TABLE t1; CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=Tables CONNECTION='Not important'; SHOW CREATE TABLE t1; @@ -154,9 +99,9 @@ EMP_NO FIRST_NAME LAST_NAME PHONE_EXT HIRE_DATE DEPT_NO JOB_CODE JOB_GRADE JOB_C 113 Mary Page 845 1993-04-12 00:00:00 671 Eng 4 USA 48000.00 Page, Mary 114 Bill Parker 247 1993-06-01 00:00:00 623 Eng 5 USA 35000.00 Parker, Bill 118 Takashi Yamamoto 23 1993-07-01 00:00:00 115 SRep 4 Japan 7480000.00 Yamamoto, Takashi -121 Roberto Ferrari 1 1993-07-12 00:00:00 125 SRep 4 Italy 99000000.00 Ferrari, Roberto +121 Roberto Ferrari 1 1993-07-12 00:00:00 125 SRep 4 Italy 33000.00 Ferrari, Roberto 127 Michael Yanowski 492 1993-08-09 00:00:00 100 SRep 4 USA 44000.00 Yanowski, Michael -134 Jacques Glon NULL 1993-08-23 00:00:00 123 SRep 4 France 390500.00 Glon, Jacques +134 Jacques Glon NULL 1993-08-23 00:00:00 123 SRep 4 France 38500.00 Glon, Jacques 136 Scott Johnson 265 1993-09-13 00:00:00 623 Doc 3 USA 60000.00 Johnson, Scott 138 T.J. Green 218 1993-11-01 00:00:00 621 Eng 4 USA 36000.00 Green, T.J. 141 Pierre Osborne NULL 1994-01-03 00:00:00 121 SRep 4 Switzerland 110000.00 Osborne, Pierre diff --git a/storage/connect/mysql-test/connect/t/mongo_test.inc b/storage/connect/mysql-test/connect/t/mongo_test.inc index c728b85fd..dfc223e90 100644 --- a/storage/connect/mysql-test/connect/t/mongo_test.inc +++ b/storage/connect/mysql-test/connect/t/mongo_test.inc @@ -1,4 +1,4 @@ -set connect_enable_mongo=1; +#set connect_enable_mongo=1; --echo # --echo # Test the MONGO table type @@ -156,7 +156,7 @@ eval CREATE TABLE t1 ( loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=$TYPE TABNAME='cities' OPTION_LIST='Driver=$DRV,Version=$VERS' $CONN DATA_CHARSET='utf8'; --echo # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -204,4 +204,4 @@ SELECT * FROM t1; DROP TABLE t1; --exec $MONGO --eval "db.testcoll.drop()" --quiet -set connect_enable_mongo=0; +#set connect_enable_mongo=0; diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp index 25da31625..0a6507315 100644 --- a/storage/connect/plgdbutl.cpp +++ b/storage/connect/plgdbutl.cpp @@ -38,6 +38,7 @@ /* Include relevant MariaDB header file. */ /***********************************************************************/ #include "my_global.h" +#include "my_pthread.h" #if defined(__WIN__) #include #include @@ -71,12 +72,12 @@ #ifdef ZIP_SUPPORT #include "filamzip.h" #endif // ZIP_SUPPORT -#ifdef JDBC_SUPPORT +#ifdef JAVA_SUPPORT #include "javaconn.h" -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #ifdef CMGO_SUPPORT #include "cmgoconn.h" -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT /***********************************************************************/ /* DB static variables. */ @@ -952,20 +953,20 @@ int PlugCloseFile(PGLOBAL g, PFBLOCK fp, bool all) fp->File = NULL; break; #endif // ZIP_SUPPORT -#ifdef JDBC_SUPPORT +#ifdef JAVA_SUPPORT case TYPE_FB_JAVA: ((JAVAConn*)fp->File)->Close(); fp->Count = 0; fp->File = NULL; break; -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #ifdef CMGO_SUPPORT case TYPE_FB_MONGO: ((CMgoConn*)fp->File)->Close(); fp->Count = 0; fp->File = NULL; break; -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT default: rc = RC_FX; } // endswitch Type diff --git a/storage/connect/plugutil.cpp b/storage/connect/plugutil.cpp index d63674e2e..0855e2657 100644 --- a/storage/connect/plugutil.cpp +++ b/storage/connect/plugutil.cpp @@ -162,7 +162,7 @@ PGLOBAL PlugInit(LPCSTR Language, uint worksize) /*******************************************************************/ if (worksize && !(g->Sarea = PlugAllocMem(g, worksize))) { char errmsg[MAX_STR]; - sprintf(errmsg, MSG(WORK_AREA), g->Message); + snprintf(errmsg, sizeof(errmsg) - 1, MSG(WORK_AREA), g->Message); strcpy(g->Message, errmsg); g->Sarea_Size = 0; } else diff --git a/storage/connect/preparse.h b/storage/connect/preparse.h index 3db7a2af1..f16624548 100644 --- a/storage/connect/preparse.h +++ b/storage/connect/preparse.h @@ -8,7 +8,7 @@ /***********************************************************************/ typedef struct _datpar { const char *Format; // Points to format to decode - const char *Curp; // Points to current parsing position + char *Curp; // Points to current parsing position char *InFmt; // Start of input format char *OutFmt; // Start of output format int Index[8]; // Indexes of date values diff --git a/storage/connect/rcmsg.c b/storage/connect/rcmsg.c index 75759e033..895f8f586 100644 --- a/storage/connect/rcmsg.c +++ b/storage/connect/rcmsg.c @@ -27,9 +27,9 @@ char *msglang(void); -char *GetMsgid(int id) +const char *GetMsgid(int id) { - char *p = NULL; + const char *p = NULL; // This conditional until a real fix is found for MDEV-7304 #if defined(FRENCH) @@ -55,7 +55,8 @@ char *GetMsgid(int id) int GetRcString(int id, char *buf, int bufsize) { - char *p = NULL, msg[32]; + const char *p = NULL; + char msg[32]; if (!(p = GetMsgid(id))) { sprintf(msg, "ID=%d unknown", id); diff --git a/storage/connect/rcmsg.h b/storage/connect/rcmsg.h index b22e77f51..499ca3b2d 100644 --- a/storage/connect/rcmsg.h +++ b/storage/connect/rcmsg.h @@ -5,7 +5,7 @@ extern "C" { #endif -char *GetMsgid(int id); +const char *GetMsgid(int id); int GetRcString(int id, char *buf, int bufsize); #ifdef __cplusplus diff --git a/storage/connect/reldef.h b/storage/connect/reldef.h index 84ae2a491..f8256a59b 100644 --- a/storage/connect/reldef.h +++ b/storage/connect/reldef.h @@ -11,7 +11,7 @@ #include "block.h" #include "catalog.h" -#include "my_sys.h" +//#include "my_sys.h" #include "mycat.h" typedef class INDEXDEF *PIXDEF; @@ -114,7 +114,7 @@ class DllExport TABDEF : public RELDEF { /* Logical table descriptor */ int Sort; /* Table already sorted ??? */ int Multiple; /* 0: No 1: DIR 2: Section 3: filelist */ int Degree; /* Number of columns in the table */ - int Pseudo; /* Bit: 1 ROWID }Ok, 2 FILEID Ok */ + int Pseudo; /* Bit: 1 ROWID }Ok, 2 FILEID Ok */ bool Read_Only; /* true for read only tables */ const CHARSET_INFO *m_data_charset; const char *csname; /* Table charset name */ diff --git a/storage/connect/tabjmg.cpp b/storage/connect/tabjmg.cpp index 50efd7276..ba3e1c3e7 100644 --- a/storage/connect/tabjmg.cpp +++ b/storage/connect/tabjmg.cpp @@ -73,9 +73,10 @@ bool JMGDISC::ColDesc(PGLOBAL g, jobject obj, char *pcn, char *pfmt, int ncol, int k) { const char *key; - char colname[65]; - char fmt[129]; - bool rc = true; + char colname[65]; + char fmt[129]; + bool rc = true; + size_t z; jint *n = nullptr; jstring jkey; jobject jres; @@ -105,14 +106,16 @@ bool JMGDISC::ColDesc(PGLOBAL g, jobject obj, char *pcn, char *pfmt, if (pcn) { strncpy(colname, pcn, 64); colname[64] = 0; - strncat(strncat(colname, "_", 65), key, 65); + z = 65 - strlen(colname); + strncat(strncat(colname, "_", z), key, z - 1); } else strcpy(colname, key); if (pfmt) { strncpy(fmt, pfmt, 128); fmt[128] = 0; - strncat(strncat(fmt, ".", 129), key, 129); + z = 129 - strlen(fmt); + strncat(strncat(fmt, ".", z), key, z - 1); } else strcpy(fmt, key); @@ -178,7 +181,7 @@ TDBJMG::TDBJMG(PMGODEF tdp) : TDBEXT(tdp) Ops.User = NULL; Ops.Pwd = NULL; Ops.Scrollable = false; - Ops.Fsize = Ops.CheckSize(Rows); + Ops.Fsize = 0; Fpos = -1; N = 0; Done = false; diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 401441520..8778b7d4b 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -31,14 +31,12 @@ #if defined(ZIP_SUPPORT) #include "filamzip.h" #endif // ZIP_SUPPORT -#if defined(MONGO_SUPPORT) -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) #include "jmgfam.h" -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #if defined(CMGO_SUPPORT) #include "cmgfam.h" #endif // CMGO_SUPPORT -#endif // MONGO_SUPPORT #include "tabmul.h" #include "checklvl.h" #include "resource.h" @@ -149,7 +147,7 @@ PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info) tdp->Fn, tdp->Objname, tdp->Pretty, lvl); if (tdp->Uri) { -#if defined(MONGO_SUPPORT) +#if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT) tdp->Collname = GetStringTableOption(g, topt, "Name", NULL); tdp->Collname = GetStringTableOption(g, topt, "Tabname", tdp->Collname); tdp->Schema = GetStringTableOption(g, topt, "Dbname", "test"); @@ -157,10 +155,8 @@ PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info) tdp->Pipe = GetBooleanTableOption(g, topt, "Pipeline", false); tdp->Driver = (PSZ)GetStringTableOption(g, topt, "Driver", NULL); tdp->Version = GetIntegerTableOption(g, topt, "Version", 3); -#if defined(JDBC_SUPPORT) tdp->Wrapname = (PSZ)GetStringTableOption(g, topt, "Wrapper", (tdp->Version == 2) ? "Mongo2Interface" : "Mongo3Interface"); -#endif // JDBC_SUPPORT tdp->Pretty = 0; #else // !MONGO_SUPPORT sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); @@ -201,7 +197,6 @@ PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info) return NULL; #endif // !ZIP_SUPPORT } else if (tdp->Uri) { -#if defined(MONGO_SUPPORT) if (tdp->Driver && toupper(*tdp->Driver) == 'C') { #if defined(CMGO_SUPPORT) tjnp = new(g) TDBJSN(tdp, new(g) CMGFAM(tdp)); @@ -210,7 +205,7 @@ PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info) return NULL; #endif } else if (tdp->Driver && toupper(*tdp->Driver) == 'J') { -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) tjnp = new(g) TDBJSN(tdp, new(g) JMGFAM(tdp)); #else sprintf(g->Message, "Mongo %s Driver not available", "Java"); @@ -219,14 +214,14 @@ PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info) } else { // Driver not specified #if defined(CMGO_SUPPORT) tjnp = new(g) TDBJSN(tdp, new(g) CMGFAM(tdp)); -#else +#elif defined(JAVA_SUPPORT) tjnp = new(g) TDBJSN(tdp, new(g) JMGFAM(tdp)); +#else + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); + return NULL; #endif } // endif Driver -#else - sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); - return NULL; -#endif // MONGO_SUPPORT + } else tjnp = new(g) TDBJSN(tdp, new(g) DOSFAM(tdp)); @@ -497,16 +492,12 @@ JSONDEF::JSONDEF(void) Base = 0; Strict = false; Sep = '.'; -#if defined(MONGO_SUPPORT) Uri = NULL; Collname = Options = Filter = NULL; Pipe = false; Driver = NULL; Version = 0; -#if defined(JDBC_SUPPORT) Wrapname = NULL; -#endif // JDBC_SUPPORT -#endif // MONGO_SUPPORT } // end of JSONDEF constructor /***********************************************************************/ @@ -524,7 +515,7 @@ bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR, int poff) Sep = *GetStringCatInfo(g, "Separator", "."); if (Uri = GetStringCatInfo(g, "Connect", NULL)) { -#if defined(MONGO_SUPPORT) +#if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT) Collname = GetStringCatInfo(g, "Name", (Catfunc & (FNC_TABLE | FNC_COL)) ? NULL : Name); Collname = GetStringCatInfo(g, "Tabname", Collname); @@ -534,12 +525,12 @@ bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR, int poff) Driver = GetStringCatInfo(g, "Driver", NULL); Version = GetIntCatInfo("Version", 3); Pretty = 0; -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) if (Version == 2) Wrapname = GetStringCatInfo(g, "Wrapper", "Mongo2Interface"); else Wrapname = GetStringCatInfo(g, "Wrapper", "Mongo3Interface"); -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #else // !MONGO_SUPPORT sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); return true; @@ -569,7 +560,6 @@ PTDB JSONDEF::GetTable(PGLOBAL g, MODE m) (m == MODE_UPDATE || m == MODE_DELETE)); if (Uri) { -#if defined(MONGO_SUPPORT) if (Driver && toupper(*Driver) == 'C') { #if defined(CMGO_SUPPORT) txfp = new(g) CMGFAM(this); @@ -578,7 +568,7 @@ PTDB JSONDEF::GetTable(PGLOBAL g, MODE m) return NULL; #endif } else if (Driver && toupper(*Driver) == 'J') { -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) txfp = new(g) JMGFAM(this); #else sprintf(g->Message, "Mongo %s Driver not available", "Java"); @@ -587,14 +577,14 @@ PTDB JSONDEF::GetTable(PGLOBAL g, MODE m) } else { // Driver not specified #if defined(CMGO_SUPPORT) txfp = new(g) CMGFAM(this); -#else +#elif defined(JAVA_SUPPORT) txfp = new(g) JMGFAM(this); -#endif +#else // !MONGO_SUPPORT + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); + return NULL; +#endif // !MONGO_SUPPORT } // endif Driver -#else - sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); - return NULL; -#endif // MONGO_SUPPORT + } else if (Zipped) { #if defined(ZIP_SUPPORT) if (m == MODE_READ || m == MODE_ANY || m == MODE_ALTER) { @@ -1591,8 +1581,7 @@ PVAL JSONCOL::ExpandArray(PGLOBAL g, PJAR arp, int n) /***********************************************************************/ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n) { -//int i, ars, nv = 0, nextsame = Tjp->NextSame; - int i, nv = 0, nextsame = Tjp->NextSame; + int i, ars, nv = 0, nextsame = Tjp->NextSame; bool err; OPVAL op = Nodes[n].Op; PVAL val[2], vp = Nodes[n].Valp; @@ -1600,12 +1589,18 @@ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n) JVALUE jval; vp->Reset(); -//ars = MY_MIN(Tjp->Limit, arp->size()); + ars = MY_MIN(Tjp->Limit, arp->size()); + + if (trace) + htrc("CalculateArray: size=%d op=%d nextsame=%d\n", + ars, op, nextsame); -//for (i = 0; i < ars; i++) { - for (i = 0; i < arp->size(); i++) { + for (i = 0; i < ars; i++) { jvrp = arp->GetValue(i); + if (trace) + htrc("i=%d nv=%d\n", i, nv); + if (!jvrp->IsNull() || (op == OP_CNC && GetJsonNull())) do { if (jvrp->IsNull()) { jvrp->Value = AllocateValue(g, GetJsonNull(), TYPE_STRING); @@ -1617,13 +1612,16 @@ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n) } else jvp = jvrp; - if (!nv++) { + if (trace) + htrc("jvp=%s null=%d\n", + jvp->GetString(g), jvp->IsNull() ? 1 : 0); + + if (!nv++) { SetJsonValue(g, vp, jvp, n); continue; } else SetJsonValue(g, MulVal, jvp, n); - -// if (!MulVal->IsZero()) { + if (!MulVal->IsNull()) { switch (op) { case OP_CNC: @@ -1634,7 +1632,7 @@ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n) val[0] = MulVal; err = vp->Compute(g, val, 1, op); - break; + break; // case OP_NUM: case OP_SEP: val[0] = Nodes[n].Valp; @@ -1650,7 +1648,15 @@ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n) if (err) vp->Reset(); - } // endif Null + if (trace) { + char buf(32); + + htrc("vp='%s' err=%d\n", + vp->GetCharString(&buf), err ? 1 : 0); + + } // endif trace + + } // endif Null } while (Tjp->NextSame > nextsame); diff --git a/storage/connect/tabjson.h b/storage/connect/tabjson.h index 00e2f4614..17583cba3 100644 --- a/storage/connect/tabjson.h +++ b/storage/connect/tabjson.h @@ -36,14 +36,12 @@ class DllExport JSONDEF : public DOSDEF { /* Table description */ friend class TDBJSON; friend class TDBJSN; friend class TDBJCL; -#if defined(MONGO_SUPPORT) #if defined(CMGO_SUPPORT) friend class CMGFAM; #endif // CMGO_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) friend class JMGFAM; -#endif // JDBC_SUPPORT -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT friend PQRYRES JSONColumns(PGLOBAL, PCSZ, PCSZ, PTOS, bool); public: // Constructor @@ -68,17 +66,13 @@ class DllExport JSONDEF : public DOSDEF { /* Table description */ bool Strict; /* Strict syntax checking */ char Sep; /* The Jpath separator */ const char *Uri; /* MongoDB connection URI */ -#if defined(MONGO_SUPPORT) PCSZ Collname; /* External collection name */ PSZ Options; /* Colist ; Pipe */ PSZ Filter; /* Filter */ PSZ Driver; /* MongoDB Driver (C or JAVA) */ bool Pipe; /* True if Colist is a pipeline */ int Version; /* Driver version */ -#if defined(JDBC_SUPPORT) PSZ Wrapname; /* MongoDB java wrapper name */ -#endif // JDBC_SUPPORT -#endif // MONGO_SUPPORT }; // end of JSONDEF /* -------------------------- TDBJSN class --------------------------- */ @@ -90,14 +84,12 @@ class DllExport JSONDEF : public DOSDEF { /* Table description */ class DllExport TDBJSN : public TDBDOS { friend class JSONCOL; friend class JSONDEF; -#if defined(MONGO_SUPPORT) #if defined(CMGO_SUPPORT) friend class CMGFAM; #endif // CMGO_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) friend class JMGFAM; -#endif // JDBC_SUPPORT -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT public: // Constructor TDBJSN(PJDEF tdp, PTXF txfp); @@ -162,14 +154,12 @@ class DllExport TDBJSN : public TDBDOS { class DllExport JSONCOL : public DOSCOL { friend class TDBJSN; friend class TDBJSON; -#if defined(MONGO_SUPPORT) #if defined(CMGO_SUPPORT) friend class CMGFAM; #endif // CMGO_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) friend class JMGFAM; -#endif // JDBC_SUPPORT -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT public: // Constructors JSONCOL(PGLOBAL g, PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i); diff --git a/storage/connect/tabmul.cpp b/storage/connect/tabmul.cpp index 5c41f9094..0967afca6 100644 --- a/storage/connect/tabmul.cpp +++ b/storage/connect/tabmul.cpp @@ -203,12 +203,12 @@ bool TDBMUL::InitFileNames(PGLOBAL g) // Data files can be imported from Windows (having CRLF) if (*p == '\n' || *p == '\r') { // is this enough for Unix ??? - *p--; // Eliminate ending CR or LF character + p--; // Eliminate ending CR or LF character if (p >= filename) // is this enough for Unix ??? if (*p == '\n' || *p == '\r') - *p--; // Eliminate ending CR or LF character + p--; // Eliminate ending CR or LF character } // endif p diff --git a/storage/connect/tabtbl.cpp b/storage/connect/tabtbl.cpp index bb7eae9c2..d3fb31fb5 100644 --- a/storage/connect/tabtbl.cpp +++ b/storage/connect/tabtbl.cpp @@ -650,7 +650,7 @@ bool TDBTBM::IsLocal(PTABLE tbp) return ((!stricmp(tdbp->Host, "localhost") || !strcmp(tdbp->Host, "127.0.0.1")) && - tdbp->Port == GetDefaultPort()); + tdbp->Port == (int)GetDefaultPort()); } // end of IsLocal /***********************************************************************/ diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp index af77c87ef..5d8d7c1b9 100644 --- a/storage/connect/tabutil.cpp +++ b/storage/connect/tabutil.cpp @@ -120,7 +120,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, FLD_REM, FLD_NO, FLD_CHARSET}; unsigned int length[] = {0, 4, 16, 4, 4, 4, 4, 4, 0, 32, 32}; PCSZ fmt; - char *pn, *tn, *fld, *colname, v; //, *chset; + char *pn, *tn, *fld, *colname, v; // *chset int i, n, ncol = sizeof(buftyp) / sizeof(int); int prec, len, type, scale; int zconv = GetConvSize(); @@ -185,7 +185,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, colname = (char *)fp->field_name; crp->Kdata->SetValue(colname, i); -// chset = (char *)fp->charset()->name; +// chset = (char *)fp->charset()->name; // v = (!strcmp(chset, "binary")) ? 'B' : 0; v = 0; diff --git a/storage/connect/tabxml.h b/storage/connect/tabxml.h index 813f62dde..f55b7d98d 100644 --- a/storage/connect/tabxml.h +++ b/storage/connect/tabxml.h @@ -53,6 +53,8 @@ class DllExport XMLDEF : public TABDEF { /* Logical table description */ }; // end of XMLDEF #if defined(INCLUDE_TDBXML) +#include "m_ctype.h" + /***********************************************************************/ /* This is the class declaration for the simple XML tables. */ /***********************************************************************/ diff --git a/storage/connect/valblk.h b/storage/connect/valblk.h index a3d7bf30f..ad9701058 100644 --- a/storage/connect/valblk.h +++ b/storage/connect/valblk.h @@ -40,7 +40,7 @@ class MBVALS : public BLOCK { // Methods void *GetMemp(void) {return Mblk.Memp;} PVBLK Allocate(PGLOBAL g, int type, int len, int prec, - int n, bool sub = FALSE); + int n, bool sub = false); bool ReAllocate(PGLOBAL g, int n); void Free(void); diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp index f08d18b54..74a3a1f80 100644 --- a/storage/connect/value.cpp +++ b/storage/connect/value.cpp @@ -1374,7 +1374,7 @@ bool TYPVAL::SetValue_char(const char *cp, int n) } else if (cp != Strp) { const char *p = cp + n - 1; - for (p; p >= cp; p--, n--) + for (; p >= cp; p--, n--) if (*p && *p != ' ') break; @@ -1656,38 +1656,48 @@ bool TYPVAL::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op) char *p[2], val[2][32]; int i; - for (i = 0; i < np; i++) - p[i] = vp[i]->IsNull() ? NULL : vp[i]->GetCharString(val[i]); + if (trace) + htrc("Compute: np=%d op=%d\n", np, op); - if (p[i]) { - switch (op) { - case OP_CNC: - assert(np == 1 || np == 2); + for (i = 0; i < np; i++) + if (!vp[i]->IsNull()) { + p[i] = vp[i]->GetCharString(val[i]); - if (np == 2) - SetValue_psz(p[0]); + if (trace) + htrc("p[%d]=%s\n", i, p[i]); - if ((i = Len - (signed)strlen(Strp)) > 0) - strncat(Strp, p[np - 1], i); + } else + return false; - break; - case OP_MIN: - assert(np == 2); - SetValue_psz((strcmp(p[0], p[1]) < 0) ? p[0] : p[1]); - break; - case OP_MAX: - assert(np == 2); - SetValue_psz((strcmp(p[0], p[1]) > 0) ? p[0] : p[1]); - break; - default: - // sprintf(g->Message, MSG(BAD_EXP_OPER), op); - strcpy(g->Message, "Function not supported"); - return true; - } // endswitch op + switch (op) { + case OP_CNC: + assert(np == 1 || np == 2); - Null = false; - } // endif p[i] + if (np == 2) + SetValue_psz(p[0]); + if ((i = Len - (signed)strlen(Strp)) > 0) + strncat(Strp, p[np - 1], i); + + if (trace) + htrc("Strp=%s\n", Strp); + + break; + case OP_MIN: + assert(np == 2); + SetValue_psz((strcmp(p[0], p[1]) < 0) ? p[0] : p[1]); + break; + case OP_MAX: + assert(np == 2); + SetValue_psz((strcmp(p[0], p[1]) > 0) ? p[0] : p[1]); + break; + default: + // sprintf(g->Message, MSG(BAD_EXP_OPER), op); + strcpy(g->Message, "Function not supported"); + return true; + } // endswitch op + + Null = false; return false; } // end of Compute diff --git a/storage/connect/value.h b/storage/connect/value.h index f771d33dc..6613e2510 100644 --- a/storage/connect/value.h +++ b/storage/connect/value.h @@ -102,7 +102,7 @@ class DllExport VALUE : public BLOCK { virtual bool SetValue_pval(PVAL valp, bool chktype = false) = 0; virtual bool SetValue_char(const char *p, int n) = 0; virtual void SetValue_psz(PCSZ s) = 0; - virtual void SetValue_bool(bool) {assert(FALSE);} + virtual void SetValue_bool(bool) {assert(false);} virtual int CompareValue(PVAL vp) = 0; virtual BYTE TestValue(PVAL vp); virtual void SetValue(char) {assert(false);} diff --git a/storage/connect/xtable.h b/storage/connect/xtable.h index ebef7a254..bc9265e02 100644 --- a/storage/connect/xtable.h +++ b/storage/connect/xtable.h @@ -16,7 +16,7 @@ #include "assert.h" #include "block.h" #include "colblk.h" -#include "m_ctype.h" +//#include "m_ctype.h" #include "reldef.h" typedef class CMD *PCMD; diff --git a/storage/federatedx/federatedx_io_mysql.cc b/storage/federatedx/federatedx_io_mysql.cc index 54059c0ec..2068716ee 100644 --- a/storage/federatedx/federatedx_io_mysql.cc +++ b/storage/federatedx/federatedx_io_mysql.cc @@ -265,9 +265,8 @@ ulong federatedx_io_mysql::savepoint_release(ulong sp) savept= dynamic_element(&savepoints, savepoints.elements - 1, SAVEPT *); if (savept->level < sp) break; - if ((savept->flags & (SAVEPOINT_REALIZED | - SAVEPOINT_RESTRICT)) == SAVEPOINT_REALIZED) - last= savept; + if ((savept->flags & (SAVEPOINT_REALIZED | SAVEPOINT_RESTRICT)) == SAVEPOINT_REALIZED) + last= savept; savepoints.elements--; } @@ -293,8 +292,8 @@ ulong federatedx_io_mysql::savepoint_rollback(ulong sp) while (savepoints.elements) { savept= dynamic_element(&savepoints, savepoints.elements - 1, SAVEPT *); - if (savept->level <= sp) - break; + if (savept->level <= sp) + break; savepoints.elements--; } diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc index e348e6b30..841b14e76 100644 --- a/storage/innobase/btr/btr0btr.cc +++ b/storage/innobase/btr/btr0btr.cc @@ -2052,7 +2052,7 @@ btr_page_reorganize_low( "InnoDB: Error: page old max ins size %lu" " new max ins size %lu\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org/\n", (unsigned long) data_size1, (unsigned long) data_size2, (unsigned long) max_ins_size1, (unsigned long) max_ins_size2); diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index 5597a0855..bb010190a 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -3433,7 +3433,6 @@ btr_cur_pessimistic_delete( ulint n_reserved = 0; ibool success; ibool ret = FALSE; - ulint level; mem_heap_t* heap; ulint* offsets; @@ -3484,6 +3483,10 @@ btr_cur_pessimistic_delete( #endif /* UNIV_ZIP_DEBUG */ } + if (flags == 0) { + lock_update_delete(block, rec); + } + if (UNIV_UNLIKELY(page_get_n_recs(page) < 2) && UNIV_UNLIKELY(dict_index_get_page(index) != buf_block_get_page_no(block))) { @@ -3498,13 +3501,7 @@ btr_cur_pessimistic_delete( goto return_after_reservations; } - if (flags == 0) { - lock_update_delete(block, rec); - } - - level = btr_page_get_level(page, mtr); - - if (level > 0 + if (!page_is_leaf(page) && UNIV_UNLIKELY(rec == page_rec_get_next( page_get_infimum_rec(page)))) { @@ -3527,6 +3524,7 @@ btr_cur_pessimistic_delete( on a page, we have to change the father node pointer so that it is equal to the new leftmost node pointer on the page */ + ulint level = btr_page_get_level(page, mtr); btr_node_ptr_delete(index, block, mtr); diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 46df26922..726702833 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -731,6 +731,7 @@ buf_page_is_corrupted( const void* space) #endif { + DBUG_EXECUTE_IF("buf_page_import_corrupt_failure", return(TRUE); ); ulint checksum_field1 = 0; ulint checksum_field2 = 0; #ifndef UNIV_INNOCHECKSUM @@ -844,8 +845,6 @@ buf_page_is_corrupted( return(false); } - DBUG_EXECUTE_IF("buf_page_is_corrupt_failure", return(true); ); - #ifndef UNIV_INNOCHECKSUM ulint page_no = mach_read_from_4(read_buf + FIL_PAGE_OFFSET); #endif @@ -3060,8 +3059,8 @@ buf_page_get_gen( ib_mutex_t* fix_mutex = NULL; buf_pool_t* buf_pool = buf_pool_get(space, offset); - ut_ad(mtr); - ut_ad(mtr->state == MTR_ACTIVE); + ut_ad((mtr == NULL) == (mode == BUF_EVICT_IF_IN_POOL)); + ut_ad(!mtr || mtr->state == MTR_ACTIVE); ut_ad((rw_latch == RW_S_LATCH) || (rw_latch == RW_X_LATCH) || (rw_latch == RW_NO_LATCH)); @@ -3072,23 +3071,29 @@ buf_page_get_gen( #ifdef UNIV_DEBUG switch (mode) { + case BUF_EVICT_IF_IN_POOL: + /* After DISCARD TABLESPACE, the tablespace would not exist, + but in IMPORT TABLESPACE, PageConverter::operator() must + replace any old pages, which were not evicted during DISCARD. + Skip the assertion on zip_size. */ + break; case BUF_GET_NO_LATCH: ut_ad(rw_latch == RW_NO_LATCH); - break; + /* fall through */ case BUF_GET: case BUF_GET_IF_IN_POOL: case BUF_PEEK_IF_IN_POOL: case BUF_GET_IF_IN_POOL_OR_WATCH: case BUF_GET_POSSIBLY_FREED: + ut_ad(zip_size == fil_space_get_zip_size(space)); break; default: ut_error; } #endif /* UNIV_DEBUG */ - ut_ad(zip_size == fil_space_get_zip_size(space)); ut_ad(ut_is_2pow(zip_size)); #ifndef UNIV_LOG_DEBUG - ut_ad(!ibuf_inside(mtr) + ut_ad(!mtr || !ibuf_inside(mtr) || ibuf_page_low(space, zip_size, offset, FALSE, file, line, NULL)); #endif @@ -3153,9 +3158,11 @@ buf_page_get_gen( rw_lock_x_unlock(hash_lock); } - if (mode == BUF_GET_IF_IN_POOL - || mode == BUF_PEEK_IF_IN_POOL - || mode == BUF_GET_IF_IN_POOL_OR_WATCH) { + switch (mode) { + case BUF_GET_IF_IN_POOL: + case BUF_GET_IF_IN_POOL_OR_WATCH: + case BUF_PEEK_IF_IN_POOL: + case BUF_EVICT_IF_IN_POOL: #ifdef UNIV_SYNC_DEBUG ut_ad(!rw_lock_own(hash_lock, RW_LOCK_EX)); ut_ad(!rw_lock_own(hash_lock, RW_LOCK_SHARED)); @@ -3244,8 +3251,10 @@ buf_page_get_gen( ut_ad(page_zip_get_size(&block->page.zip) == zip_size); - if (mode == BUF_GET_IF_IN_POOL || mode == BUF_PEEK_IF_IN_POOL) { - + switch (mode) { + case BUF_GET_IF_IN_POOL: + case BUF_PEEK_IF_IN_POOL: + case BUF_EVICT_IF_IN_POOL: bool must_read; { @@ -3274,6 +3283,19 @@ buf_page_get_gen( buf_page_t* bpage; case BUF_BLOCK_FILE_PAGE: + if (UNIV_UNLIKELY(mode == BUF_EVICT_IF_IN_POOL)) { +evict_from_pool: + ut_ad(!fix_block->page.oldest_modification); + buf_pool_mutex_enter(buf_pool); + buf_block_unfix(fix_block); + + if (!buf_LRU_free_page(&fix_block->page, true)) { + ut_ad(0); + } + + buf_pool_mutex_exit(buf_pool); + return(NULL); + } break; case BUF_BLOCK_ZIP_PAGE: @@ -3306,6 +3328,10 @@ buf_page_get_gen( goto loop; } + if (UNIV_UNLIKELY(mode == BUF_EVICT_IF_IN_POOL)) { + goto evict_from_pool; + } + /* Buffer-fix the block so that it cannot be evicted or relocated while we are attempting to allocate an uncompressed page. */ @@ -4849,7 +4875,7 @@ buf_page_io_complete(buf_page_t* bpage, bool evict) if (err != DB_SUCCESS) { /* Not a real corruption if it was triggered by error injection */ - DBUG_EXECUTE_IF("buf_page_is_corrupt_failure", + DBUG_EXECUTE_IF("buf_page_import_corrupt_failure", if (bpage->space > TRX_SYS_SPACE) { buf_mark_space_corrupt(bpage); ib_logf(IB_LOG_LEVEL_INFO, @@ -4905,7 +4931,7 @@ buf_page_io_complete(buf_page_t* bpage, bool evict) } } - DBUG_EXECUTE_IF("buf_page_is_corrupt_failure", + DBUG_EXECUTE_IF("buf_page_import_corrupt_failure", page_not_corrupt: bpage = bpage; ); if (recv_recovery_is_on()) { diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index 31feb3228..dacddfca3 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -715,7 +715,6 @@ buf_flush_update_zip_checksum( srv_checksum_algorithm))); mach_write_to_8(page + FIL_PAGE_LSN, lsn); - memset(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, 0, 8); mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, checksum); } @@ -894,8 +893,6 @@ buf_flush_write_block_low( bpage->newest_modification); ut_a(page_zip_verify_checksum(frame, zip_size)); - - memset(frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, 0, 8); break; case BUF_BLOCK_FILE_PAGE: frame = bpage->zip.data; diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc index 8c2b5df4b..a047b28f4 100644 --- a/storage/innobase/buf/buf0lru.cc +++ b/storage/innobase/buf/buf0lru.cc @@ -528,26 +528,20 @@ buf_flush_or_remove_page( return(processed); } -/******************************************************************//** -Remove all dirty pages belonging to a given tablespace inside a specific +/** Remove all dirty pages belonging to a given tablespace inside a specific buffer pool instance when we are deleting the data file(s) of that tablespace. The pages still remain a part of LRU and are evicted from the list as they age towards the tail of the LRU. +@param[in,out] buf_pool buffer pool +@param[in] id tablespace identifier +@param[in] trx transaction (to check for interrupt), + or NULL if the files should not be written to @retval DB_SUCCESS if all freed @retval DB_FAIL if not all freed @retval DB_INTERRUPTED if the transaction was interrupted */ static MY_ATTRIBUTE((nonnull(1), warn_unused_result)) dberr_t -buf_flush_or_remove_pages( -/*======================*/ - buf_pool_t* buf_pool, /*!< buffer pool instance */ - ulint id, /*!< in: target space id for which - to remove or flush pages */ - bool flush, /*!< in: flush to disk if true but - don't remove else remove without - flushing to disk */ - const trx_t* trx) /*!< to check if the operation must - be interrupted, can be 0 */ +buf_flush_or_remove_pages(buf_pool_t* buf_pool, ulint id, const trx_t* trx) { buf_page_t* prev; buf_page_t* bpage; @@ -574,7 +568,7 @@ buf_flush_or_remove_pages( /* Skip this block, as it does not belong to the target space. */ - } else if (!buf_flush_or_remove_page(buf_pool, bpage, flush)) { + } else if (!buf_flush_or_remove_page(buf_pool, bpage, trx)) { /* Remove was unsuccessful, we have to try again by scanning the entire list from the end. @@ -597,7 +591,7 @@ buf_flush_or_remove_pages( iteration. */ all_freed = false; - } else if (flush) { + } else if (trx) { /* The processing was successful. And during the processing we have released the buf_pool mutex @@ -616,19 +610,17 @@ buf_flush_or_remove_pages( processed = 0; } -#ifdef DBUG_OFF - if (flush) { + if (trx) { DBUG_EXECUTE_IF("ib_export_flush_crash", static ulint n_pages; if (++n_pages == 4) {DBUG_SUICIDE();}); - } -#endif /* DBUG_OFF */ - /* The check for trx is interrupted is expensive, we want - to check every N iterations. */ - if (!processed && trx && trx_is_interrupted(trx)) { - buf_flush_list_mutex_exit(buf_pool); - return(DB_INTERRUPTED); + /* The check for trx is interrupted is + expensive, we want to check every N iterations. */ + if (!processed && trx_is_interrupted(trx)) { + buf_flush_list_mutex_exit(buf_pool); + return(DB_INTERRUPTED); + } } } @@ -637,28 +629,25 @@ buf_flush_or_remove_pages( return(all_freed ? DB_SUCCESS : DB_FAIL); } -/******************************************************************//** -Remove or flush all the dirty pages that belong to a given tablespace +/** Remove or flush all the dirty pages that belong to a given tablespace inside a specific buffer pool instance. The pages will remain in the LRU list and will be evicted from the LRU list as they age and move towards -the tail of the LRU list. */ +the tail of the LRU list. +@param[in,out] buf_pool buffer pool +@param[in] id tablespace identifier +@param[in] trx transaction (to check for interrupt), + or NULL if the files should not be written to +*/ static MY_ATTRIBUTE((nonnull(1))) void -buf_flush_dirty_pages( -/*==================*/ - buf_pool_t* buf_pool, /*!< buffer pool instance */ - ulint id, /*!< in: space id */ - bool flush, /*!< in: flush to disk if true otherwise - remove the pages without flushing */ - const trx_t* trx) /*!< to check if the operation must - be interrupted */ +buf_flush_dirty_pages(buf_pool_t* buf_pool, ulint id, const trx_t* trx) { dberr_t err; do { buf_pool_mutex_enter(buf_pool); - err = buf_flush_or_remove_pages(buf_pool, id, flush, trx); + err = buf_flush_or_remove_pages(buf_pool, id, trx); buf_pool_mutex_exit(buf_pool); @@ -679,231 +668,27 @@ buf_flush_dirty_pages( || buf_pool_get_dirty_pages_count(buf_pool, id) == 0); } -/******************************************************************//** -Remove all pages that belong to a given tablespace inside a specific -buffer pool instance when we are DISCARDing the tablespace. */ -static MY_ATTRIBUTE((nonnull)) +/** Empty the flush list for all pages belonging to a tablespace. +@param[in] id tablespace identifier +@param[in] trx transaction, for checking for user interrupt; + or NULL if nothing is to be written +@param[in] drop_ahi whether to drop the adaptive hash index */ +UNIV_INTERN void -buf_LRU_remove_all_pages( -/*=====================*/ - buf_pool_t* buf_pool, /*!< buffer pool instance */ - ulint id) /*!< in: space id */ +buf_LRU_flush_or_remove_pages(ulint id, const trx_t* trx, bool drop_ahi) { - buf_page_t* bpage; - ibool all_freed; - -scan_again: - buf_pool_mutex_enter(buf_pool); - - all_freed = TRUE; - - for (bpage = UT_LIST_GET_LAST(buf_pool->LRU); - bpage != NULL; - /* No op */) { - - rw_lock_t* hash_lock; - buf_page_t* prev_bpage; - ib_mutex_t* block_mutex = NULL; - - ut_a(buf_page_in_file(bpage)); - ut_ad(bpage->in_LRU_list); - - prev_bpage = UT_LIST_GET_PREV(LRU, bpage); - - /* bpage->space and bpage->io_fix are protected by - buf_pool->mutex and the block_mutex. It is safe to check - them while holding buf_pool->mutex only. */ - - if (buf_page_get_space(bpage) != id) { - /* Skip this block, as it does not belong to - the space that is being invalidated. */ - goto next_page; - } else if (buf_page_get_io_fix(bpage) != BUF_IO_NONE) { - /* We cannot remove this page during this scan - yet; maybe the system is currently reading it - in, or flushing the modifications to the file */ - - all_freed = FALSE; - goto next_page; - } else { - ulint fold = buf_page_address_fold( - bpage->space, bpage->offset); - - hash_lock = buf_page_hash_lock_get(buf_pool, fold); - - rw_lock_x_lock(hash_lock); - - block_mutex = buf_page_get_mutex(bpage); - mutex_enter(block_mutex); - - if (bpage->buf_fix_count > 0) { - - mutex_exit(block_mutex); - - rw_lock_x_unlock(hash_lock); - - /* We cannot remove this page during - this scan yet; maybe the system is - currently reading it in, or flushing - the modifications to the file */ - - all_freed = FALSE; - - goto next_page; - } - } - - ut_ad(mutex_own(block_mutex)); - -#ifdef UNIV_DEBUG - if (buf_debug_prints) { - fprintf(stderr, - "Dropping space %lu page %lu\n", - (ulong) buf_page_get_space(bpage), - (ulong) buf_page_get_page_no(bpage)); - } -#endif - if (buf_page_get_state(bpage) != BUF_BLOCK_FILE_PAGE) { - /* Do nothing, because the adaptive hash index - covers uncompressed pages only. */ - } else if (((buf_block_t*) bpage)->index) { - ulint page_no; - ulint zip_size; - - buf_pool_mutex_exit(buf_pool); - - zip_size = buf_page_get_zip_size(bpage); - page_no = buf_page_get_page_no(bpage); - - rw_lock_x_unlock(hash_lock); - - mutex_exit(block_mutex); - - /* Note that the following call will acquire - and release block->lock X-latch. */ - - btr_search_drop_page_hash_when_freed( - id, zip_size, page_no); - - goto scan_again; - } - - if (bpage->oldest_modification != 0) { - - buf_flush_remove(bpage); - } - - ut_ad(!bpage->in_flush_list); - - /* Remove from the LRU list. */ - - if (buf_LRU_block_remove_hashed(bpage, true)) { - buf_LRU_block_free_hashed_page((buf_block_t*) bpage); - } else { - ut_ad(block_mutex == &buf_pool->zip_mutex); + for (ulint i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool = buf_pool_from_array(i); + if (drop_ahi) { + buf_LRU_drop_page_hash_for_tablespace(buf_pool, id); } - - ut_ad(!mutex_own(block_mutex)); - -#ifdef UNIV_SYNC_DEBUG - /* buf_LRU_block_remove_hashed() releases the hash_lock */ - ut_ad(!rw_lock_own(hash_lock, RW_LOCK_EX)); - ut_ad(!rw_lock_own(hash_lock, RW_LOCK_SHARED)); -#endif /* UNIV_SYNC_DEBUG */ - -next_page: - bpage = prev_bpage; - } - - buf_pool_mutex_exit(buf_pool); - - if (!all_freed) { - os_thread_sleep(20000); - - goto scan_again; + buf_flush_dirty_pages(buf_pool, id, trx); } -} - -/******************************************************************//** -Remove pages belonging to a given tablespace inside a specific -buffer pool instance when we are deleting the data file(s) of that -tablespace. The pages still remain a part of LRU and are evicted from -the list as they age towards the tail of the LRU only if buf_remove -is BUF_REMOVE_FLUSH_NO_WRITE. */ -static MY_ATTRIBUTE((nonnull(1))) -void -buf_LRU_remove_pages( -/*=================*/ - buf_pool_t* buf_pool, /*!< buffer pool instance */ - ulint id, /*!< in: space id */ - buf_remove_t buf_remove, /*!< in: remove or flush strategy */ - const trx_t* trx) /*!< to check if the operation must - be interrupted */ -{ - switch (buf_remove) { - case BUF_REMOVE_ALL_NO_WRITE: - buf_LRU_remove_all_pages(buf_pool, id); - break; - - case BUF_REMOVE_FLUSH_NO_WRITE: - ut_a(trx == 0); - buf_flush_dirty_pages(buf_pool, id, false, NULL); - break; - case BUF_REMOVE_FLUSH_WRITE: - ut_a(trx != 0); - buf_flush_dirty_pages(buf_pool, id, true, trx); + if (trx && !trx_is_interrupted(trx)) { /* Ensure that all asynchronous IO is completed. */ os_aio_wait_until_no_pending_writes(); fil_flush(id); - break; - } -} - -/******************************************************************//** -Flushes all dirty pages or removes all pages belonging -to a given tablespace. A PROBLEM: if readahead is being started, what -guarantees that it will not try to read in pages after this operation -has completed? */ -UNIV_INTERN -void -buf_LRU_flush_or_remove_pages( -/*==========================*/ - ulint id, /*!< in: space id */ - buf_remove_t buf_remove, /*!< in: remove or flush strategy */ - const trx_t* trx) /*!< to check if the operation must - be interrupted */ -{ - ulint i; - - /* Before we attempt to drop pages one by one we first - attempt to drop page hash index entries in batches to make - it more efficient. The batching attempt is a best effort - attempt and does not guarantee that all pages hash entries - will be dropped. We get rid of remaining page hash entries - one by one below. */ - for (i = 0; i < srv_buf_pool_instances; i++) { - buf_pool_t* buf_pool; - - buf_pool = buf_pool_from_array(i); - - switch (buf_remove) { - case BUF_REMOVE_ALL_NO_WRITE: - buf_LRU_drop_page_hash_for_tablespace(buf_pool, id); - break; - - case BUF_REMOVE_FLUSH_NO_WRITE: - /* It is a DROP TABLE for a single table - tablespace. No AHI entries exist because - we already dealt with them when freeing up - extents. */ - case BUF_REMOVE_FLUSH_WRITE: - /* We allow read-only queries against the - table, there is no need to drop the AHI entries. */ - break; - } - - buf_LRU_remove_pages(buf_pool, id, buf_remove, trx); } } diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index 1a3923047..8d7c1275c 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -570,15 +570,14 @@ dict_table_close( ut_ad(mutex_own(&dict_sys->mutex)); ut_a(table->n_ref_count > 0); - --table->n_ref_count; + const bool last_handle = !--table->n_ref_count; /* Force persistent stats re-read upon next open of the table so that FLUSH TABLE can be used to forcibly fetch stats from disk if they have been manually modified. We reset table->stat_initialized only if table reference count is 0 because we do not want too frequent stats re-reads (e.g. in other cases than FLUSH TABLE). */ - if (strchr(table->name, '/') != NULL - && table->n_ref_count == 0 + if (last_handle && strchr(table->name, '/') != NULL && dict_stats_is_persistent_enabled(table)) { dict_stats_deinit(table); @@ -598,11 +597,8 @@ dict_table_close( if (!dict_locked) { table_id_t table_id = table->id; - ibool drop_aborted; - - drop_aborted = try_drop + const bool drop_aborted = last_handle && try_drop && table->drop_aborted - && table->n_ref_count == 1 && dict_table_get_first_index(table); mutex_exit(&dict_sys->mutex); @@ -642,40 +638,6 @@ dict_table_get_col_name( return(s); } -/**********************************************************************//** -Returns a column's name. -@return column name. NOTE: not guaranteed to stay valid if table is -modified in any way (columns added, etc.). */ -UNIV_INTERN -const char* -dict_table_get_col_name_for_mysql( -/*==============================*/ - const dict_table_t* table, /*!< in: table */ - const char* col_name)/*! in: MySQL table column name */ -{ - ulint i; - const char* s; - - ut_ad(table); - ut_ad(col_name); - ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); - - s = table->col_names; - if (s) { - /* If we have many virtual columns MySQL key_part->fieldnr - could be larger than number of columns in InnoDB table - when creating new indexes. */ - for (i = 0; i < table->n_def; i++) { - - if (!innobase_strcasecmp(s, col_name)) { - break; /* Found */ - } - s += strlen(s) + 1; - } - } - - return(s); -} #ifndef UNIV_HOTBACKUP /** Allocate and init the autoinc latch of a given table. This function must not be called concurrently on the same table object. @@ -1711,7 +1673,7 @@ dict_table_rename_in_cache( filepath = fil_make_ibd_name(table->name, false); } - fil_delete_tablespace(table->space, BUF_REMOVE_ALL_NO_WRITE); + fil_delete_tablespace(table->space, true); /* Delete any temp file hanging around. */ if (os_file_status(filepath, &exists, &ftype) @@ -2145,8 +2107,9 @@ dict_table_remove_from_cache_low( } if (lru_evict && table->drop_aborted) { - /* Do as dict_table_try_drop_aborted() does. */ - + /* When evicting the table definition, + drop the orphan indexes from the data dictionary + and free the index pages. */ trx_t* trx = trx_allocate_for_background(); ut_ad(mutex_own(&dict_sys->mutex)); @@ -2157,12 +2120,7 @@ dict_table_remove_from_cache_low( trx->dict_operation_lock_mode = RW_X_LATCH; trx_set_dict_operation(trx, TRX_DICT_OP_INDEX); - - /* Silence a debug assertion in row_merge_drop_indexes(). */ - ut_d(table->n_ref_count++); - row_merge_drop_indexes(trx, table, TRUE); - ut_d(table->n_ref_count--); - ut_ad(table->n_ref_count == 0); + row_merge_drop_indexes_dict(trx, table->id); trx_commit_for_mysql(trx); trx->dict_operation_lock_mode = 0; trx_free_for_background(trx); diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc index 57a591294..43ee1a236 100644 --- a/storage/innobase/dict/dict0stats_bg.cc +++ b/storage/innobase/dict/dict0stats_bg.cc @@ -336,7 +336,7 @@ dict_stats_wait_bg_to_stop_using_table( unlocking/locking the data dict */ { while (!dict_stats_stop_bg(table)) { - DICT_STATS_BG_YIELD(trx); + DICT_BG_YIELD(trx); } } diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 7200c3c32..ac30f3c7a 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -1037,155 +1037,26 @@ fil_space_extend_must_retry( page_size = UNIV_PAGE_SIZE; } -#ifdef _WIN32 - const ulint io_completion_type = OS_FILE_READ; - /* Logically or physically extend the file with zero bytes, - depending on whether it is sparse. */ + /* fil_read_first_page() expects UNIV_PAGE_SIZE bytes. + fil_node_open_file() expects at least 4 * UNIV_PAGE_SIZE bytes.*/ - /* FIXME: Call DeviceIoControl(node->handle, FSCTL_SET_SPARSE, ...) - when opening a file when FSP_FLAGS_HAS_PAGE_COMPRESSION(). */ - { - FILE_END_OF_FILE_INFO feof; - /* fil_read_first_page() expects UNIV_PAGE_SIZE bytes. - fil_node_open_file() expects at least 4 * UNIV_PAGE_SIZE bytes. - Do not shrink short ROW_FORMAT=COMPRESSED files. */ - feof.EndOfFile.QuadPart = std::max( - os_offset_t(size - file_start_page_no) * page_size, - os_offset_t(FIL_IBD_FILE_INITIAL_SIZE - * UNIV_PAGE_SIZE)); - *success = SetFileInformationByHandle(node->handle, - FileEndOfFileInfo, - &feof, sizeof feof); - if (!*success) { - ib_logf(IB_LOG_LEVEL_ERROR, "extending file %s" - " from " INT64PF - " to " INT64PF " bytes failed with %u", - node->name, - os_offset_t(node->size) * page_size, - feof.EndOfFile.QuadPart, GetLastError()); - } else { - start_page_no = size; - } - } -#else - /* We will logically extend the file with ftruncate() if - page_compression is enabled, because the file is expected to - be sparse in that case. Make sure that ftruncate() can deal - with large files. */ - const bool is_sparse = sizeof(off_t) >= 8 - && FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags); - -# ifdef HAVE_POSIX_FALLOCATE - /* We must complete the I/O request after invoking - posix_fallocate() to avoid an assertion failure at shutdown. - Because no actual writes were dispatched, a read operation - will suffice. */ - const ulint io_completion_type = srv_use_posix_fallocate - || is_sparse ? OS_FILE_READ : OS_FILE_WRITE; - - if (srv_use_posix_fallocate && !is_sparse) { - const os_offset_t start_offset - = os_offset_t(start_page_no - file_start_page_no) - * page_size; - const ulint n_pages = size - start_page_no; - const os_offset_t len = os_offset_t(n_pages) * page_size; - - int err; - do { - err = posix_fallocate(node->handle, start_offset, len); - } while (err == EINTR - && srv_shutdown_state == SRV_SHUTDOWN_NONE); - - *success = !err; - if (!*success) { - ib_logf(IB_LOG_LEVEL_ERROR, "extending file %s" - " from " INT64PF " to " INT64PF " bytes" - " failed with error %d", - node->name, start_offset, len + start_offset, - err); - } - - DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28", - *success = FALSE; - os_has_said_disk_full = TRUE;); - - if (*success) { - os_has_said_disk_full = FALSE; - start_page_no = size; - } - } else -# else - const ulint io_completion_type = is_sparse - ? OS_FILE_READ : OS_FILE_WRITE; -# endif - if (is_sparse) { - /* fil_read_first_page() expects UNIV_PAGE_SIZE bytes. - fil_node_open_file() expects at least 4 * UNIV_PAGE_SIZE bytes. - Do not shrink short ROW_FORMAT=COMPRESSED files. */ - off_t s = std::max(off_t(size - file_start_page_no) - * off_t(page_size), - off_t(FIL_IBD_FILE_INITIAL_SIZE - * UNIV_PAGE_SIZE)); - *success = !ftruncate(node->handle, s); - if (!*success) { - ib_logf(IB_LOG_LEVEL_ERROR, "ftruncate of file %s" - " from " INT64PF " to " INT64PF " bytes" - " failed with error %d", - node->name, - os_offset_t(start_page_no - file_start_page_no) - * page_size, os_offset_t(s), errno); - } else { - start_page_no = size; - } - } else { - /* Extend at most 64 pages at a time */ - ulint buf_size = ut_min(64, size - start_page_no) - * page_size; - byte* buf2 = static_cast( - calloc(1, buf_size + page_size)); - *success = buf2 != NULL; - if (!buf2) { - ib_logf(IB_LOG_LEVEL_ERROR, "Cannot allocate " ULINTPF - " bytes to extend file", - buf_size + page_size); - } - byte* const buf = static_cast( - ut_align(buf2, page_size)); - - while (*success && start_page_no < size) { - ulint n_pages - = ut_min(buf_size / page_size, - size - start_page_no); - - os_offset_t offset = static_cast( - start_page_no - file_start_page_no) - * page_size; - - *success = os_aio(OS_FILE_WRITE, 0, OS_AIO_SYNC, - node->name, node->handle, buf, - offset, page_size * n_pages, - page_size, node, NULL, 0); - - DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28", - *success = FALSE; - os_has_said_disk_full = TRUE;); - - if (*success) { - os_has_said_disk_full = FALSE; - } - /* Let us measure the size of the file - to determine how much we were able to - extend it */ - os_offset_t fsize = os_file_get_size(node->handle); - ut_a(fsize != os_offset_t(-1)); + os_offset_t new_size = std::max( + os_offset_t(size - file_start_page_no) * page_size, + os_offset_t(FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE)); - start_page_no = ulint(fsize / page_size) - + file_start_page_no; - } + *success = os_file_set_size(node->name, node->handle, new_size, + FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags)); - free(buf2); + + DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28", + *success = FALSE; + os_has_said_disk_full = TRUE;); + + if (*success) { + os_has_said_disk_full = FALSE; + start_page_no = size; } -#endif + mutex_enter(&fil_system->mutex); ut_a(node->being_extended); @@ -1195,7 +1066,7 @@ fil_space_extend_must_retry( space->size += file_size - node->size; node->size = file_size; - fil_node_complete_io(node, fil_system, io_completion_type); + fil_node_complete_io(node, fil_system, OS_FILE_READ); node->being_extended = FALSE; @@ -2655,8 +2526,7 @@ fil_op_log_parse_or_replay( switch (type) { case MLOG_FILE_DELETE: if (fil_tablespace_exists_in_mem(space_id)) { - dberr_t err = fil_delete_tablespace( - space_id, BUF_REMOVE_FLUSH_NO_WRITE); + dberr_t err = fil_delete_tablespace(space_id); ut_a(err == DB_SUCCESS); } @@ -2934,7 +2804,7 @@ fil_close_tablespace( completely and permanently. The flag stop_new_ops also prevents fil_flush() from being applied to this tablespace. */ - buf_LRU_flush_or_remove_pages(id, BUF_REMOVE_FLUSH_WRITE, trx); + buf_LRU_flush_or_remove_pages(id, trx); #endif mutex_enter(&fil_system->mutex); @@ -2961,18 +2831,13 @@ fil_close_tablespace( return(err); } -/*******************************************************************//** -Deletes a single-table tablespace. The tablespace must be cached in the -memory cache. +/** Delete a tablespace and associated .ibd file. +@param[in] id tablespace identifier +@param[in] drop_ahi whether to drop the adaptive hash index @return DB_SUCCESS or error */ UNIV_INTERN dberr_t -fil_delete_tablespace( -/*==================*/ - ulint id, /*!< in: space id */ - buf_remove_t buf_remove) /*!< in: specify the action to take - on the tables pages in the buffer - pool */ +fil_delete_tablespace(ulint id, bool drop_ahi) { char* path = 0; fil_space_t* space = 0; @@ -3028,7 +2893,7 @@ fil_delete_tablespace( To deal with potential read requests by checking the ::stop_new_ops flag in fil_io() */ - buf_LRU_flush_or_remove_pages(id, buf_remove, 0); + buf_LRU_flush_or_remove_pages(id, NULL, drop_ahi); #endif /* !UNIV_HOTBACKUP */ @@ -3139,7 +3004,7 @@ fil_discard_tablespace( { dberr_t err; - switch (err = fil_delete_tablespace(id, BUF_REMOVE_ALL_NO_WRITE)) { + switch (err = fil_delete_tablespace(id, true)) { case DB_SUCCESS: break; diff --git a/storage/innobase/fil/fil0pagecompress.cc b/storage/innobase/fil/fil0pagecompress.cc index 7a61f1783..edc932f36 100644 --- a/storage/innobase/fil/fil0pagecompress.cc +++ b/storage/innobase/fil/fil0pagecompress.cc @@ -106,6 +106,9 @@ fil_compress_page( int comp_level = level; ulint header_len = FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE; ulint write_size = 0; +#if HAVE_LZO + lzo_uint write_size_lzo = write_size; +#endif /* Cache to avoid change during function execution */ ulint comp_method = innodb_compression_algorithm; bool allocated = false; @@ -207,7 +210,9 @@ fil_compress_page( #ifdef HAVE_LZO case PAGE_LZO_ALGORITHM: err = lzo1x_1_15_compress( - buf, len, out_buf+header_len, &write_size, out_buf+UNIV_PAGE_SIZE); + buf, len, out_buf+header_len, &write_size_lzo, out_buf+UNIV_PAGE_SIZE); + + write_size = write_size_lzo; if (err != LZO_E_OK || write_size > UNIV_PAGE_SIZE-header_len) { if (space && !space->printed_compression_failure) { @@ -604,8 +609,11 @@ fil_decompress_page( #ifdef HAVE_LZO case PAGE_LZO_ALGORITHM: { ulint olen = 0; + lzo_uint olen_lzo = olen; err = lzo1x_decompress((const unsigned char *)buf+header_len, - actual_size,(unsigned char *)in_buf, &olen, NULL); + actual_size,(unsigned char *)in_buf, &olen_lzo, NULL); + + olen = olen_lzo; if (err != LZO_E_OK || (olen == 0 || olen > UNIV_PAGE_SIZE)) { ib_logf(IB_LOG_LEVEL_ERROR, diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index bfe32e2ae..2ba58c9a5 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -1,7 +1,7 @@ /***************************************************************************** -Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. All Rights reserved. +Copyright (c) 2011, 2017, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2016, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -26,6 +26,7 @@ Full Text Search interface #include "row0mysql.h" #include "row0upd.h" #include "dict0types.h" +#include "dict0stats_bg.h" #include "row0sel.h" #include "fts0fts.h" @@ -868,18 +869,37 @@ fts_drop_index( err = fts_drop_index_tables(trx, index); - fts_free(table); - + for(;;) { + bool retry = false; + if (index->index_fts_syncing) { + retry = true; + } + if (!retry){ + fts_free(table); + break; + } + DICT_BG_YIELD(trx); + } return(err); } - current_doc_id = table->fts->cache->next_doc_id; - first_doc_id = table->fts->cache->first_doc_id; - fts_cache_clear(table->fts->cache); - fts_cache_destroy(table->fts->cache); - table->fts->cache = fts_cache_create(table); - table->fts->cache->next_doc_id = current_doc_id; - table->fts->cache->first_doc_id = first_doc_id; + for(;;) { + bool retry = false; + if (index->index_fts_syncing) { + retry = true; + } + if (!retry){ + current_doc_id = table->fts->cache->next_doc_id; + first_doc_id = table->fts->cache->first_doc_id; + fts_cache_clear(table->fts->cache); + fts_cache_destroy(table->fts->cache); + table->fts->cache = fts_cache_create(table); + table->fts->cache->next_doc_id = current_doc_id; + table->fts->cache->first_doc_id = first_doc_id; + break; + } + DICT_BG_YIELD(trx); + } } else { fts_cache_t* cache = table->fts->cache; fts_index_cache_t* index_cache; @@ -889,9 +909,17 @@ fts_drop_index( index_cache = fts_find_index_cache(cache, index); if (index_cache != NULL) { - if (index_cache->words) { - fts_words_free(index_cache->words); - rbt_free(index_cache->words); + for(;;) { + bool retry = false; + if (index->index_fts_syncing) { + retry = true; + } + if (!retry && index_cache->words) { + fts_words_free(index_cache->words); + rbt_free(index_cache->words); + break; + } + DICT_BG_YIELD(trx); } ib_vector_remove(cache->indexes, *(void**) index_cache); @@ -2645,22 +2673,23 @@ fts_get_next_doc_id( will consult the CONFIG table and user table to re-establish the initial value of the Doc ID */ - if (cache->first_doc_id != 0 || !fts_init_doc_id(table)) { - if (!DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_HAS_DOC_ID)) { - *doc_id = FTS_NULL_DOC_ID; - return(DB_SUCCESS); + if (!DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_HAS_DOC_ID)) { + if (cache->first_doc_id == FTS_NULL_DOC_ID) { + fts_init_doc_id(table); } + *doc_id = FTS_NULL_DOC_ID; + return(DB_SUCCESS); + } - /* Otherwise, simply increment the value in cache */ - mutex_enter(&cache->doc_id_lock); - *doc_id = ++cache->next_doc_id; - mutex_exit(&cache->doc_id_lock); - } else { - mutex_enter(&cache->doc_id_lock); - *doc_id = cache->next_doc_id; - mutex_exit(&cache->doc_id_lock); + if (cache->first_doc_id == FTS_NULL_DOC_ID) { + fts_init_doc_id(table); } + DEBUG_SYNC_C("get_next_FTS_DOC_ID"); + mutex_enter(&cache->doc_id_lock); + *doc_id = cache->next_doc_id++; + mutex_exit(&cache->doc_id_lock); + return(DB_SUCCESS); } @@ -3033,53 +3062,6 @@ fts_modify( return(error); } -/*********************************************************************//** -Create a new document id. -@return DB_SUCCESS if all went well else error */ -UNIV_INTERN -dberr_t -fts_create_doc_id( -/*==============*/ - dict_table_t* table, /*!< in: row is of this table. */ - dtuple_t* row, /* in/out: add doc id value to this - row. This is the current row that is - being inserted. */ - mem_heap_t* heap) /*!< in: heap */ -{ - doc_id_t doc_id; - dberr_t error = DB_SUCCESS; - - ut_a(table->fts->doc_col != ULINT_UNDEFINED); - - if (!DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_HAS_DOC_ID)) { - if (table->fts->cache->first_doc_id == FTS_NULL_DOC_ID) { - error = fts_get_next_doc_id(table, &doc_id); - } - return(error); - } - - error = fts_get_next_doc_id(table, &doc_id); - - if (error == DB_SUCCESS) { - dfield_t* dfield; - doc_id_t* write_doc_id; - - ut_a(doc_id > 0); - - dfield = dtuple_get_nth_field(row, table->fts->doc_col); - write_doc_id = static_cast( - mem_heap_alloc(heap, sizeof(*write_doc_id))); - - ut_a(doc_id != FTS_NULL_DOC_ID); - ut_a(sizeof(doc_id) == dfield->type.len); - fts_write_doc_id((byte*) write_doc_id, doc_id); - - dfield_set_data(dfield, write_doc_id, sizeof(*write_doc_id)); - } - - return(error); -} - /*********************************************************************//** The given transaction is about to be committed; do whatever is necessary from the FTS system's POV. @@ -4615,10 +4597,16 @@ fts_sync( index_cache = static_cast( ib_vector_get(cache->indexes, i)); - if (index_cache->index->to_be_dropped) { + if (index_cache->index->to_be_dropped + || index_cache->index->table->to_be_dropped) { continue; } + index_cache->index->index_fts_syncing = true; + DBUG_EXECUTE_IF("fts_instrument_sync_sleep_drop_waits", + os_thread_sleep(10000000); + ); + error = fts_sync_index(sync, index_cache); if (error != DB_SUCCESS && !sync->interrupted) { @@ -4651,11 +4639,33 @@ fts_sync( end_sync: if (error == DB_SUCCESS && !sync->interrupted) { error = fts_sync_commit(sync); + if (error == DB_SUCCESS) { + for (i = 0; i < ib_vector_size(cache->indexes); ++i) { + fts_index_cache_t* index_cache; + index_cache = static_cast( + ib_vector_get(cache->indexes, i)); + if (index_cache->index->index_fts_syncing) { + index_cache->index->index_fts_syncing + = false; + } + } + } } else { fts_sync_rollback(sync); } rw_lock_x_lock(&cache->lock); + /* Clear fts syncing flags of any indexes incase sync is + interrupeted */ + for (i = 0; i < ib_vector_size(cache->indexes); ++i) { + fts_index_cache_t* index_cache; + index_cache = static_cast( + ib_vector_get(cache->indexes, i)); + if (index_cache->index->index_fts_syncing == true) { + index_cache->index->index_fts_syncing = false; + } + } + sync->interrupted = false; sync->in_progress = false; os_event_set(sync->event); diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc index cb30122ad..d9f969480 100644 --- a/storage/innobase/fts/fts0opt.cc +++ b/storage/innobase/fts/fts0opt.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2016, MariaDB Corporation. All Rights reserved. This program is free software; you can redistribute it and/or modify it under @@ -2971,13 +2971,6 @@ fts_optimize_sync_table( { dict_table_t* table = NULL; - /* Prevent DROP INDEX etc. from running when we are syncing - cache in background. */ - if (!rw_lock_s_lock_nowait(&dict_operation_lock, __FILE__, __LINE__)) { - /* Exit when fail to get dict operation lock. */ - return; - } - table = dict_table_open_on_id(table_id, FALSE, DICT_TABLE_OP_NORMAL); if (table) { @@ -2987,8 +2980,6 @@ fts_optimize_sync_table( dict_table_close(table, FALSE, FALSE); } - - rw_lock_s_unlock(&dict_operation_lock); } /**********************************************************************//** diff --git a/storage/innobase/fts/fts0que.cc b/storage/innobase/fts/fts0que.cc index 26bd0378a..b87430996 100644 --- a/storage/innobase/fts/fts0que.cc +++ b/storage/innobase/fts/fts0que.cc @@ -1,6 +1,7 @@ /***************************************************************************** -Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2017, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -3633,6 +3634,10 @@ fts_query_free( fts_doc_ids_free(query->deleted); } + if (query->intersection) { + fts_query_free_doc_ids(query, query->intersection); + } + if (query->doc_ids) { fts_query_free_doc_ids(query, query->doc_ids); } @@ -3657,8 +3662,6 @@ fts_query_free( rbt_free(query->word_freqs); } - ut_a(!query->intersection); - if (query->word_map) { rbt_free(query->word_map); } diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index e50f9fc97..9a7258bc9 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -5427,8 +5427,6 @@ innobase_match_index_columns( if (innodb_idx_fld >= innodb_idx_fld_end) { DBUG_RETURN(FALSE); } - - mtype = innodb_idx_fld->col->mtype; } // MariaDB-5.5 compatibility @@ -10420,7 +10418,7 @@ wsrep_append_foreign_key( shared ? WSREP_KEY_SHARED : WSREP_KEY_EXCLUSIVE, copy); if (rcode) { - DBUG_PRINT("wsrep", ("row key failed: %lu", rcode)); + DBUG_PRINT("wsrep", ("row key failed: %zu", rcode)); WSREP_ERROR("Appending cascaded fk row key failed: %s, %lu", (wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void", rcode); @@ -18416,7 +18414,7 @@ buffer_pool_load_now( const void* save) /*!< in: immediate result from check function */ { - if (*(my_bool*) save) { + if (*(my_bool*) save && !srv_read_only_mode) { buf_load_start(); } } @@ -18439,7 +18437,7 @@ buffer_pool_load_abort( const void* save) /*!< in: immediate result from check function */ { - if (*(my_bool*) save) { + if (*(my_bool*) save && !srv_read_only_mode) { buf_load_abort(); } } @@ -18711,7 +18709,7 @@ wsrep_innobase_kill_one_trx( wsrep_thd_awake(thd, signal); } else { /* abort currently executing query */ - DBUG_PRINT("wsrep",("sending KILL_QUERY to: %ld", + DBUG_PRINT("wsrep",("sending KILL_QUERY to: %lu", thd_get_thread_id(thd))); WSREP_DEBUG("kill query for: %ld", thd_get_thread_id(thd)); @@ -18842,7 +18840,8 @@ wsrep_fake_trx_id( mutex_enter(&trx_sys->mutex); trx_id_t trx_id = trx_sys_get_new_trx_id(); mutex_exit(&trx_sys->mutex); - WSREP_DEBUG("innodb fake trx id: %lu thd: %s", trx_id, wsrep_thd_query(thd)); + WSREP_DEBUG("innodb fake trx id: " TRX_ID_FMT " thd: %s", + trx_id, wsrep_thd_query(thd)); wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd), trx_id); } diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 2a74ac489..bdc4987b5 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2013, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under @@ -208,60 +208,44 @@ innobase_fulltext_exist( return(false); } -/*******************************************************************//** -Determine if ALTER TABLE needs to rebuild the table. -@param ha_alter_info the DDL operation -@param altered_table MySQL original table +/** Determine if ALTER TABLE needs to rebuild the table. +@param ha_alter_info the DDL operation +@param table metadata before ALTER TABLE @return whether it is necessary to rebuild the table */ static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool innobase_need_rebuild( -/*==================*/ const Alter_inplace_info* ha_alter_info, - const TABLE* altered_table) + const TABLE* table) { Alter_inplace_info::HA_ALTER_FLAGS alter_inplace_flags = - ha_alter_info->handler_flags & ~(INNOBASE_INPLACE_IGNORE); + ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE; + + if (alter_inplace_flags & Alter_inplace_info::CHANGE_CREATE_OPTION) { + const ha_table_option_struct& alt_opt= + *ha_alter_info->create_info->option_struct; + const ha_table_option_struct& opt= *table->s->option_struct; + + if (alt_opt.page_compressed != opt.page_compressed + || alt_opt.page_compression_level + != opt.page_compression_level + || alt_opt.encryption != opt.encryption + || alt_opt.encryption_key_id != opt.encryption_key_id) { + return(true); + } + } - if (alter_inplace_flags - == Alter_inplace_info::CHANGE_CREATE_OPTION + if (alter_inplace_flags == Alter_inplace_info::CHANGE_CREATE_OPTION && !(ha_alter_info->create_info->used_fields & (HA_CREATE_USED_ROW_FORMAT | HA_CREATE_USED_KEY_BLOCK_SIZE))) { /* Any other CHANGE_CREATE_OPTION than changing - ROW_FORMAT or KEY_BLOCK_SIZE is ignored. */ + ROW_FORMAT or KEY_BLOCK_SIZE can be done without + rebuilding the table. */ return(false); } - /* If alter table changes column name and adds a new - index, we need to check is this new index created - to new column name. This is because column name - changes are done normally after creating indexes. */ - if ((ha_alter_info->handler_flags - & Alter_inplace_info::ALTER_COLUMN_NAME) && - ((ha_alter_info->handler_flags - & Alter_inplace_info::ADD_INDEX) || - (ha_alter_info->handler_flags - & Alter_inplace_info::ADD_FOREIGN_KEY))) { - for (ulint i = 0; i < ha_alter_info->index_add_count; i++) { - const KEY* key = &ha_alter_info->key_info_buffer[ - ha_alter_info->index_add_buffer[i]]; - - for (ulint j = 0; j < key->user_defined_key_parts; j++) { - const KEY_PART_INFO* key_part = &(key->key_part[j]); - const Field* field = altered_table->field[key_part->fieldnr]; - - /* Field used on added index is renamed on - this same alter table. We need table - rebuild. */ - if (field && field->flags & FIELD_IS_RENAMED) { - return (true); - } - } - } - } - - return(!!(ha_alter_info->handler_flags & INNOBASE_ALTER_REBUILD)); + return(!!(alter_inplace_flags & INNOBASE_ALTER_REBUILD)); } /** Check if InnoDB supports a particular alter table in-place @@ -311,29 +295,6 @@ ha_innobase::check_if_supported_inplace_alter( update_thd(); trx_search_latch_release_if_reserved(prebuilt->trx); - /* Change on engine specific table options require rebuild of the - table */ - if (ha_alter_info->handler_flags - & Alter_inplace_info::CHANGE_CREATE_OPTION) { - ha_table_option_struct *new_options= ha_alter_info->create_info->option_struct; - ha_table_option_struct *old_options= table->s->option_struct; - - if (new_options->page_compressed != old_options->page_compressed || - new_options->page_compression_level != old_options->page_compression_level || - new_options->atomic_writes != old_options->atomic_writes) { - ha_alter_info->unsupported_reason = innobase_get_err_msg( - ER_ALTER_OPERATION_NOT_SUPPORTED_REASON); - DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); - } - - if (new_options->encryption != old_options->encryption || - new_options->encryption_key_id != old_options->encryption_key_id) { - ha_alter_info->unsupported_reason = innobase_get_err_msg( - ER_ALTER_OPERATION_NOT_SUPPORTED_REASON); - DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); - } - } - if (ha_alter_info->handler_flags & ~(INNOBASE_INPLACE_IGNORE | INNOBASE_ALTER_NOREBUILD @@ -612,7 +573,7 @@ ha_innobase::check_if_supported_inplace_alter( operation is possible. */ } else if (((ha_alter_info->handler_flags & Alter_inplace_info::ADD_PK_INDEX) - || innobase_need_rebuild(ha_alter_info, table)) + || innobase_need_rebuild(ha_alter_info, table)) && (innobase_fulltext_exist(altered_table))) { /* Refuse to rebuild the table online, if fulltext indexes are to survive the rebuild. */ @@ -1548,38 +1509,49 @@ innobase_check_index_keys( return(0); } -/*******************************************************************//** -Create index field definition for key part */ +/** Create index field definition for key part +@param[in] new_clustered true if alter is generating a new clustered +index +@param[in] altered_table MySQL table that is being altered +@param[in] key_part MySQL key definition +@param[out] index_field index field defition for key_part */ static MY_ATTRIBUTE((nonnull(2,3))) void innobase_create_index_field_def( -/*============================*/ - const TABLE* altered_table, /*!< in: MySQL table that is - being altered, or NULL - if a new clustered index is - not being created */ - const KEY_PART_INFO* key_part, /*!< in: MySQL key definition */ - index_field_t* index_field, /*!< out: index field - definition for key_part */ - const Field** fields) /*!< in: MySQL table fields */ + bool new_clustered, + const TABLE* altered_table, + const KEY_PART_INFO* key_part, + index_field_t* index_field) { const Field* field; ibool is_unsigned; ulint col_type; + ulint innodb_fieldnr=0; DBUG_ENTER("innobase_create_index_field_def"); ut_ad(key_part); ut_ad(index_field); + ut_ad(altered_table); + + /* Virtual columns are not stored in InnoDB data dictionary, thus + if there is virtual columns we need to skip them to find the + correct field. */ + for(ulint i = 0; i < key_part->fieldnr; i++) { + const Field* table_field = altered_table->field[i]; + if (!table_field->stored_in_db) { + continue; + } + innodb_fieldnr++; + } - field = altered_table - ? altered_table->field[key_part->fieldnr] + field = new_clustered ? + altered_table->field[key_part->fieldnr] : key_part->field; - ut_a(field); - index_field->col_no = key_part->fieldnr; - index_field->col_name = altered_table ? field->field_name : fields[key_part->fieldnr]->field_name; + ut_a(field); + index_field->col_no = innodb_fieldnr; col_type = get_innobase_type_from_mysql_type(&is_unsigned, field); if (DATA_BLOB == col_type @@ -1613,10 +1585,8 @@ innobase_create_index_def( bool key_clustered, /*!< in: true if this is the new clustered index */ index_def_t* index, /*!< out: index definition */ - mem_heap_t* heap, /*!< in: heap where memory + mem_heap_t* heap) /*!< in: heap where memory is allocated */ - const Field** fields) /*!< in: MySQL table fields - */ { const KEY* key = &keys[key_number]; ulint i; @@ -1627,10 +1597,10 @@ innobase_create_index_def( DBUG_ENTER("innobase_create_index_def"); DBUG_ASSERT(!key_clustered || new_clustered); + ut_ad(altered_table); + index->fields = static_cast( mem_heap_alloc(heap, n_fields * sizeof *index->fields)); - memset(index->fields, 0, n_fields * sizeof *index->fields); - index->ind_type = 0; index->key_number = key_number; index->n_fields = n_fields; @@ -1661,13 +1631,12 @@ innobase_create_index_def( index->ind_type |= DICT_FTS; } - if (!new_clustered) { - altered_table = NULL; - } - for (i = 0; i < n_fields; i++) { innobase_create_index_field_def( - altered_table, &key->key_part[i], &index->fields[i], fields); + new_clustered, + altered_table, + &key->key_part[i], + &index->fields[i]); } DBUG_VOID_RETURN; @@ -1993,7 +1962,7 @@ innobase_create_key_defs( /* Create the PRIMARY key index definition */ innobase_create_index_def( altered_table, key_info, primary_key_number, - TRUE, TRUE, indexdef++, heap, (const Field **)altered_table->field); + TRUE, TRUE, indexdef++, heap); created_clustered: n_add = 1; @@ -2005,7 +1974,7 @@ innobase_create_key_defs( /* Copy the index definitions. */ innobase_create_index_def( altered_table, key_info, i, TRUE, FALSE, - indexdef, heap, (const Field **)altered_table->field); + indexdef, heap); if (indexdef->ind_type & DICT_FTS) { n_fts_add++; @@ -2050,7 +2019,7 @@ innobase_create_key_defs( for (ulint i = 0; i < n_add; i++) { innobase_create_index_def( altered_table, key_info, add[i], FALSE, FALSE, - indexdef, heap, (const Field **)altered_table->field); + indexdef, heap); if (indexdef->ind_type & DICT_FTS) { n_fts_add++; @@ -2067,7 +2036,6 @@ innobase_create_key_defs( index->fields = static_cast( mem_heap_alloc(heap, sizeof *index->fields)); - memset(index->fields, 0, sizeof *index->fields); index->n_fields = 1; index->fields->col_no = fts_doc_id_col; index->fields->prefix_len = 0; @@ -2157,7 +2125,7 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx /** mapping of old column numbers to new ones, or NULL */ const ulint* col_map; /** new column names, or NULL if nothing was renamed */ - const char** col_names; + const char** col_names; /** added AUTO_INCREMENT column position, or ULINT_UNDEFINED */ const ulint add_autoinc; /** default values of ADD COLUMN, or NULL */ @@ -2884,7 +2852,6 @@ prepare_inplace_alter_table_dict( to rebuild the table with a temporary name. */ if (new_clustered) { - fil_space_crypt_t* crypt_data; const char* new_table_name = dict_mem_create_temporary_tablename( ctx->heap, @@ -2895,13 +2862,29 @@ prepare_inplace_alter_table_dict( ulint key_id = FIL_DEFAULT_ENCRYPTION_KEY; fil_encryption_t mode = FIL_ENCRYPTION_DEFAULT; - fil_space_t* space = fil_space_acquire(ctx->prebuilt->table->space); - crypt_data = space->crypt_data; - fil_space_release(space); + if (fil_space_t* space + = fil_space_acquire(ctx->prebuilt->table->space)) { + if (const fil_space_crypt_t* crypt_data + = space->crypt_data) { + key_id = crypt_data->key_id; + mode = crypt_data->encryption; + } - if (crypt_data) { - key_id = crypt_data->key_id; - mode = crypt_data->encryption; + fil_space_release(space); + } + + if (ha_alter_info->handler_flags + & Alter_inplace_info::CHANGE_CREATE_OPTION) { + const ha_table_option_struct& alt_opt= + *ha_alter_info->create_info->option_struct; + const ha_table_option_struct& opt= + *old_table->s->option_struct; + if (alt_opt.encryption != opt.encryption + || alt_opt.encryption_key_id + != opt.encryption_key_id) { + key_id = alt_opt.encryption_key_id; + mode = fil_encryption_t(alt_opt.encryption); + } } if (innobase_check_foreigns( @@ -3114,8 +3097,7 @@ prepare_inplace_alter_table_dict( for (ulint a = 0; a < ctx->num_to_add_index; a++) { ctx->add_index[a] = row_merge_create_index( - ctx->trx, ctx->new_table, - &index_defs[a], ctx->col_names); + ctx->trx, ctx->new_table, &index_defs[a]); add_key_nums[a] = index_defs[a].key_number; @@ -5917,7 +5899,47 @@ ha_innobase::commit_inplace_alter_table( break; } - DICT_STATS_BG_YIELD(trx); + DICT_BG_YIELD(trx); + } + + /* Make a concurrent Drop fts Index to wait until sync of that + fts index is happening in the background */ + for (;;) { + bool retry = false; + + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + int count =0; + ha_innobase_inplace_ctx* ctx + = static_cast(*pctx); + DBUG_ASSERT(new_clustered == ctx->need_rebuild()); + + if (dict_fts_index_syncing(ctx->old_table)) { + count++; + if (count == 100) { + fprintf(stderr, + "Drop index waiting for background sync" + "to finish\n"); + } + retry = true; + } + + if (new_clustered && dict_fts_index_syncing(ctx->new_table)) { + count++; + if (count == 100) { + fprintf(stderr, + "Drop index waiting for background sync" + "to finish\n"); + } + retry = true; + } + } + + if (!retry) { + break; + } + + DICT_BG_YIELD(trx); } /* Apply the changes to the data dictionary tables, for all @@ -6233,8 +6255,13 @@ ha_innobase::commit_inplace_alter_table( ut_d(dict_table_check_for_dup_indexes( ctx->new_table, CHECK_ABORTED_OK)); - ut_a(fts_check_cached_index(ctx->new_table)); +#ifdef UNIV_DEBUG + if (!(ctx->new_table->fts != NULL + && ctx->new_table->fts->cache->sync->in_progress)) { + ut_a(fts_check_cached_index(ctx->new_table)); + } +#endif if (new_clustered) { /* Since the table has been rebuilt, we remove all persistent statistics corresponding to the diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc index 145100c88..2c82c1b49 100644 --- a/storage/innobase/handler/i_s.cc +++ b/storage/innobase/handler/i_s.cc @@ -6383,6 +6383,7 @@ i_s_sys_tables_fill_table_stats( } heap = mem_heap_create(1000); + rw_lock_s_lock(&dict_operation_lock); mutex_enter(&dict_sys->mutex); mtr_start(&mtr); @@ -6409,9 +6410,11 @@ i_s_sys_tables_fill_table_stats( err_msg); } + rw_lock_s_unlock(&dict_operation_lock); mem_heap_empty(heap); /* Get the next record */ + rw_lock_s_lock(&dict_operation_lock); mutex_enter(&dict_sys->mutex); mtr_start(&mtr); rec = dict_getnext_system(&pcur, &mtr); @@ -6419,6 +6422,7 @@ i_s_sys_tables_fill_table_stats( mtr_commit(&mtr); mutex_exit(&dict_sys->mutex); + rw_lock_s_unlock(&dict_operation_lock); mem_heap_free(heap); DBUG_RETURN(0); @@ -7722,8 +7726,6 @@ i_s_dict_fill_sys_tablespaces( { Field** fields; ulint atomic_blobs = FSP_FLAGS_HAS_ATOMIC_BLOBS(flags); - ulint page_size = fsp_flags_get_page_size(flags); - ulint zip_size = fsp_flags_get_zip_size(flags); const char* file_format; const char* row_format; @@ -7740,13 +7742,11 @@ i_s_dict_fill_sys_tablespaces( fields = table_to_fill->field; - OK(fields[SYS_TABLESPACES_SPACE]->store( - static_cast(space))); + OK(fields[SYS_TABLESPACES_SPACE]->store(space, true)); OK(field_store_string(fields[SYS_TABLESPACES_NAME], name)); - OK(fields[SYS_TABLESPACES_FLAGS]->store( - static_cast(flags))); + OK(fields[SYS_TABLESPACES_FLAGS]->store(flags, true)); OK(field_store_string(fields[SYS_TABLESPACES_FILE_FORMAT], file_format)); @@ -7754,11 +7754,18 @@ i_s_dict_fill_sys_tablespaces( OK(field_store_string(fields[SYS_TABLESPACES_ROW_FORMAT], row_format)); - OK(fields[SYS_TABLESPACES_PAGE_SIZE]->store( - static_cast(page_size))); + ulint cflags = fsp_flags_is_valid(flags, space) + ? flags : fsp_flags_convert_from_101(flags); + if (cflags != ULINT_UNDEFINED) { + OK(fields[SYS_TABLESPACES_PAGE_SIZE]->store( + fsp_flags_get_page_size(cflags), true)); - OK(fields[SYS_TABLESPACES_ZIP_PAGE_SIZE]->store( - static_cast(zip_size))); + OK(fields[SYS_TABLESPACES_ZIP_PAGE_SIZE]->store( + fsp_flags_get_zip_size(cflags), true)); + } else { + fields[SYS_TABLESPACES_PAGE_SIZE]->set_null(); + fields[SYS_TABLESPACES_ZIP_PAGE_SIZE]->set_null(); + } OK(schema_table_store_record(thd, table_to_fill)); diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc index 356dbbfb6..c621ed5f7 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.cc +++ b/storage/innobase/ibuf/ibuf0ibuf.cc @@ -4000,7 +4000,7 @@ ibuf_insert_to_index_page_low( (ulong) zip_size, (ulong) old_bits); fputs("InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", stderr); + " to https://jira.mariadb.org/\n", stderr); ut_ad(0); DBUG_RETURN(NULL); } @@ -4073,7 +4073,7 @@ ibuf_insert_to_index_page( " Please run CHECK TABLE on\n" "InnoDB: your tables.\n" "InnoDB: Submit a detailed bug report to" - " http://bugs.mysql.com!\n", stderr); + " https://jira.mariadb.org/\n", stderr); DBUG_VOID_RETURN; } @@ -4249,7 +4249,7 @@ ibuf_set_del_mark( fprintf(stderr, "\nspace %u offset %u" " (%u records, index id %llu)\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org/\n", (unsigned) buf_block_get_space(block), (unsigned) buf_block_get_page_no(block), (unsigned) page_get_n_recs(page), @@ -4313,7 +4313,7 @@ ibuf_delete( fprintf(stderr, "\nspace %u offset %u" " (%u records, index id %llu)\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org/\n", (unsigned) buf_block_get_space(block), (unsigned) buf_block_get_page_no(block), (unsigned) page_get_n_recs(page), @@ -4384,7 +4384,7 @@ ibuf_restore_pos( } else { fprintf(stderr, "InnoDB: ERROR: Submit the output to" - " http://bugs.mysql.com\n" + " https://jira.mariadb.org/\n" "InnoDB: ibuf cursor restoration fails!\n" "InnoDB: ibuf record inserted to page %lu:%lu\n", (ulong) space, (ulong) page_no); @@ -4703,7 +4703,7 @@ ibuf_merge_or_delete_for_page( "InnoDB: to determine if they are corrupt" " after this.\n\n" "InnoDB: Please submit a detailed bug report" - " to http://bugs.mysql.com\n\n", + " to https://jira.mariadb.org/\n\n", (ulong) page_no, (ulong) fil_page_get_type(block->frame)); @@ -5136,7 +5136,20 @@ ibuf_check_bitmap_on_import( return(DB_TABLE_NOT_FOUND); } - size = fil_space_get_size(space_id); + mtr_t mtr; + mtr_start(&mtr); + { + buf_block_t* sp = buf_page_get(space_id, zip_size, 0, + RW_S_LATCH, &mtr); + if (sp) { + size = mach_read_from_4( + FSP_HEADER_OFFSET + FSP_FREE_LIMIT + + sp->frame); + } else { + size = 0; + } + } + mtr_commit(&mtr); if (size == 0) { return(DB_TABLE_NOT_FOUND); @@ -5147,7 +5160,6 @@ ibuf_check_bitmap_on_import( page_size = zip_size ? zip_size : UNIV_PAGE_SIZE; for (page_no = 0; page_no < size; page_no += page_size) { - mtr_t mtr; page_t* bitmap_page; ulint i; diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 002e562f2..857bdf9d2 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -59,6 +59,7 @@ Created 11/5/1995 Heikki Tuuri #define BUF_GET_POSSIBLY_FREED 16 /*!< Like BUF_GET, but do not mind if the file page has been freed. */ +#define BUF_EVICT_IF_IN_POOL 20 /*!< evict a clean block if found */ /* @} */ /** @name Modes for buf_page_get_known_nowait */ /* @{ */ diff --git a/storage/innobase/include/buf0lru.h b/storage/innobase/include/buf0lru.h index a7a65df33..308bda20c 100644 --- a/storage/innobase/include/buf0lru.h +++ b/storage/innobase/include/buf0lru.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -51,19 +52,14 @@ These are low-level functions /** Minimum LRU list length for which the LRU_old pointer is defined */ #define BUF_LRU_OLD_MIN_LEN 512 /* 8 megabytes of 16k pages */ -/******************************************************************//** -Flushes all dirty pages or removes all pages belonging -to a given tablespace. A PROBLEM: if readahead is being started, what -guarantees that it will not try to read in pages after this operation -has completed? */ +/** Empty the flush list for all pages belonging to a tablespace. +@param[in] id tablespace identifier +@param[in] trx transaction, for checking for user interrupt; + or NULL if nothing is to be written +@param[in] drop_ahi whether to drop the adaptive hash index */ UNIV_INTERN void -buf_LRU_flush_or_remove_pages( -/*==========================*/ - ulint id, /*!< in: space id */ - buf_remove_t buf_remove, /*!< in: remove or flush strategy */ - const trx_t* trx); /*!< to check if the operation must - be interrupted */ +buf_LRU_flush_or_remove_pages(ulint id, const trx_t* trx, bool drop_ahi=false); #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG /********************************************************************//** diff --git a/storage/innobase/include/buf0types.h b/storage/innobase/include/buf0types.h index 11bbc9b5c..511240d66 100644 --- a/storage/innobase/include/buf0types.h +++ b/storage/innobase/include/buf0types.h @@ -58,17 +58,6 @@ enum buf_flush_t { BUF_FLUSH_N_TYPES /*!< index of last element + 1 */ }; -/** Algorithm to remove the pages for a tablespace from the buffer pool. -See buf_LRU_flush_or_remove_pages(). */ -enum buf_remove_t { - BUF_REMOVE_ALL_NO_WRITE, /*!< Remove all pages from the buffer - pool, don't write or sync to disk */ - BUF_REMOVE_FLUSH_NO_WRITE, /*!< Remove only, from the flush list, - don't write or sync to disk */ - BUF_REMOVE_FLUSH_WRITE /*!< Flush dirty pages to disk only - don't remove from the buffer pool */ -}; - /** Flags for io_fix types */ enum buf_io_fix { BUF_IO_NONE = 0, /**< no pending I/O */ diff --git a/storage/innobase/include/data0type.ic b/storage/innobase/include/data0type.ic index b4dbf4b12..bf433036e 100644 --- a/storage/innobase/include/data0type.ic +++ b/storage/innobase/include/data0type.ic @@ -576,7 +576,7 @@ dtype_get_fixed_size_low( return(len); #endif /* !UNIV_HOTBACKUP */ /* Treat as variable-length. */ - /* Fall through */ + /* fall through */ case DATA_VARCHAR: case DATA_BINARY: case DATA_DECIMAL: diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h index 6e88c9155..0d5ade163 100644 --- a/storage/innobase/include/dict0dict.h +++ b/storage/innobase/include/dict0dict.h @@ -620,17 +620,6 @@ dict_table_get_col_name( ulint col_nr) /*!< in: column number */ MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** -Returns a column's name. -@return column name. NOTE: not guaranteed to stay valid if table is -modified in any way (columns added, etc.). */ -UNIV_INTERN -const char* -dict_table_get_col_name_for_mysql( -/*==============================*/ - const dict_table_t* table, /*!< in: table */ - const char* col_name)/*!< in: MySQL table column name */ - MY_ATTRIBUTE((nonnull, warn_unused_result)); -/**********************************************************************//** Prints a table data. */ UNIV_INTERN void diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic index 147968a34..22b96a58f 100644 --- a/storage/innobase/include/dict0dict.ic +++ b/storage/innobase/include/dict0dict.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2013, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under @@ -1076,6 +1076,27 @@ dict_table_x_lock_indexes( } } +/*********************************************************************//** +Returns true if the particular FTS index in the table is still syncing +in the background, false otherwise. +@param [in] table Table containing FTS index +@return True if sync of fts index is still going in the background */ +UNIV_INLINE +bool +dict_fts_index_syncing( + dict_table_t* table) +{ + dict_index_t* index; + + for (index = dict_table_get_first_index(table); + index != NULL; + index = dict_table_get_next_index(index)) { + if (index->index_fts_syncing) { + return(true); + } + } + return(false); +} /*********************************************************************//** Release the exclusive locks on all index tree. */ UNIV_INLINE diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index 1c0f4d730..9a6cc0aa0 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. Copyright (c) 2013, 2017, MariaDB Corporation. @@ -704,6 +704,8 @@ struct dict_index_t{ dict_sys->mutex. Other changes are protected by index->lock. */ dict_field_t* fields; /*!< array of field descriptions */ + bool index_fts_syncing;/*!< Whether the fts index is + still syncing in the background */ #ifndef UNIV_HOTBACKUP UT_LIST_NODE_T(dict_index_t) indexes;/*!< list of indexes of the table */ diff --git a/storage/innobase/include/dict0stats_bg.h b/storage/innobase/include/dict0stats_bg.h index 8f3385eb2..66fcf7a09 100644 --- a/storage/innobase/include/dict0stats_bg.h +++ b/storage/innobase/include/dict0stats_bg.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under @@ -83,7 +83,7 @@ dict_stats_defrag_pool_del( /** Yield the data dictionary latch when waiting for the background thread to stop accessing a table. @param trx transaction holding the data dictionary locks */ -#define DICT_STATS_BG_YIELD(trx) do { \ +#define DICT_BG_YIELD(trx) do { \ row_mysql_unlock_data_dictionary(trx); \ os_thread_sleep(250000); \ row_mysql_lock_data_dictionary(trx); \ diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h index 382509493..81f207d1e 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -851,18 +851,13 @@ fil_op_log_parse_or_replay( only be parsed but not replayed */ ulint log_flags); /*!< in: redo log flags (stored in the page number parameter) */ -/*******************************************************************//** -Deletes a single-table tablespace. The tablespace must be cached in the -memory cache. -@return TRUE if success */ +/** Delete a tablespace and associated .ibd file. +@param[in] id tablespace identifier +@param[in] drop_ahi whether to drop the adaptive hash index +@return DB_SUCCESS or error */ UNIV_INTERN dberr_t -fil_delete_tablespace( -/*==================*/ - ulint id, /*!< in: space id */ - buf_remove_t buf_remove); /*!< in: specify the action to take - on the tables pages in the buffer - pool */ +fil_delete_tablespace(ulint id, bool drop_ahi = false); /*******************************************************************//** Closes a single-table tablespace. The tablespace must be cached in the memory cache. Free all pages used by the tablespace. diff --git a/storage/innobase/include/fts0fts.h b/storage/innobase/include/fts0fts.h index 7aa705564..cd94956dc 100644 --- a/storage/innobase/include/fts0fts.h +++ b/storage/innobase/include/fts0fts.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. All Rights reserved. +Copyright (c) 2016, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -429,21 +429,6 @@ fts_update_next_doc_id( MY_ATTRIBUTE((nonnull(2))); /******************************************************************//** -Create a new document id . -@return DB_SUCCESS if all went well else error */ -UNIV_INTERN -dberr_t -fts_create_doc_id( -/*==============*/ - dict_table_t* table, /*!< in: row is of this - table. */ - dtuple_t* row, /*!< in/out: add doc id - value to this row. This is the - current row that is being - inserted. */ - mem_heap_t* heap) /*!< in: heap */ - MY_ATTRIBUTE((nonnull)); -/******************************************************************//** Create a new fts_doc_ids_t. @return new fts_doc_ids_t. */ UNIV_INTERN diff --git a/storage/innobase/include/mtr0log.ic b/storage/innobase/include/mtr0log.ic index 6457e02d4..bdfd98709 100644 --- a/storage/innobase/include/mtr0log.ic +++ b/storage/innobase/include/mtr0log.ic @@ -215,7 +215,7 @@ mlog_write_initial_log_record_fast( "%d on page %lu of space %lu in the " "doublewrite buffer, continuing anyway.\n" "Please post a bug report to " - "bugs.mysql.com.\n", + "https://jira.mariadb.org/\n", type, offset, space); ut_ad(0); } diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h index fea6bd997..6129d03fa 100644 --- a/storage/innobase/include/row0merge.h +++ b/storage/innobase/include/row0merge.h @@ -108,7 +108,6 @@ struct index_field_t { ulint col_no; /*!< column offset */ ulint prefix_len; /*!< column prefix length, or 0 if indexing the whole column */ - const char* col_name; /*!< column name or NULL */ }; /** Definition of an index being created */ @@ -265,11 +264,7 @@ row_merge_create_index( /*===================*/ trx_t* trx, /*!< in/out: trx (sets error_state) */ dict_table_t* table, /*!< in: the index is on this table */ - const index_def_t* index_def, - /*!< in: the index definition */ - const char** col_names); - /*! in: column names if columns are - renamed or NULL */ + const index_def_t* index_def); /*!< in: the index definition */ /*********************************************************************//** Check if a transaction can use an index. @return TRUE if index can be used by the transaction else FALSE */ diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index fb6caf269..6b2c309e4 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -2351,6 +2351,7 @@ lock_rec_insert_by_trx_age( return DB_SUCCESS; } +#ifdef UNIV_DEBUG static bool lock_queue_validate( @@ -2384,6 +2385,7 @@ lock_queue_validate( } return true; } +#endif /* UNIV_DEBUG */ /*********************************************************************//** Enqueues a waiting request for a lock which cannot be granted immediately. @@ -2451,7 +2453,7 @@ lock_rec_enqueue_waiting( dict_index_name_print(stderr, trx, index); fputs(".\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org/\n", stderr); ut_ad(0); } @@ -5185,7 +5187,7 @@ lock_table_enqueue_waiting( ut_print_name(stderr, trx, TRUE, table->name); fputs(".\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org/\n", stderr); ut_ad(0); } diff --git a/storage/innobase/log/log0crypt.cc b/storage/innobase/log/log0crypt.cc index fe1b41202..13d691187 100644 --- a/storage/innobase/log/log0crypt.cc +++ b/storage/innobase/log/log0crypt.cc @@ -246,7 +246,7 @@ log_blocks_crypt( ENCRYPTION_FLAG_DECRYPT @param[in] offs offset to block @param[in] space_id tablespace id -@return true if successfull, false in case of failure +@return true if successful, false in case of failure */ static bool diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 44093935b..e9abdc91f 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -2335,12 +2335,21 @@ os_file_get_size( return(offset); #else - return((os_offset_t) lseek(file, 0, SEEK_END)); - + struct stat statbuf; + return fstat(file, &statbuf) ? os_offset_t(-1) : statbuf.st_size; #endif /* __WIN__ */ } -/** Set the size of a newly created file. +/** Extend a file. + +On Windows, extending a file allocates blocks for the file, +unless the file is sparse. + +On Unix, we will extend the file with ftruncate(), if +file needs to be sparse. Otherwise posix_fallocate() is used +when available, and if not, binary zeroes are added to the end +of file. + @param[in] name file name @param[in] file file handle @param[in] size desired file size @@ -2381,25 +2390,41 @@ os_file_set_size( if (srv_use_posix_fallocate) { int err; do { - err = posix_fallocate(file, 0, size); + os_offset_t current_size = os_file_get_size(file); + err = current_size >= size + ? 0 : posix_fallocate(file, current_size, + size - current_size); } while (err == EINTR && srv_shutdown_state == SRV_SHUTDOWN_NONE); - if (err) { + switch (err) { + case 0: + return true; + default: ib_logf(IB_LOG_LEVEL_ERROR, "preallocating " INT64PF " bytes for" "file %s failed with error %d", size, name, err); + /* fall through */ + case EINTR: + errno = err; + return false; + case EINVAL: + /* fall back to the code below */ + break; } - return(!err); } # endif + os_offset_t current_size = os_file_get_size(file); + + if (current_size >= size) { + return true; + } + /* Write up to 1 megabyte at a time. */ ulint buf_size = ut_min(64, (ulint) (size / UNIV_PAGE_SIZE)) * UNIV_PAGE_SIZE; - os_offset_t current_size = 0; - byte* buf2 = static_cast(calloc(1, buf_size + UNIV_PAGE_SIZE)); if (!buf2) { @@ -2429,11 +2454,12 @@ os_file_set_size( } current_size += n_bytes; - } while (current_size < size); + } while (current_size < size + && srv_shutdown_state == SRV_SHUTDOWN_NONE); free(buf2); - return(ret && os_file_flush(file)); + return(ret && current_size >= size && os_file_flush(file)); #endif } diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index 801ac1ecc..9cf55699d 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -1601,18 +1601,16 @@ PageConverter::PageConverter( : AbstractCallback(trx), m_cfg(cfg), + m_index(cfg->m_indexes), + m_current_lsn(log_get_lsn()), m_page_zip_ptr(0), - m_heap(0) UNIV_NOTHROW + m_rec_iter(), + m_offsets_(), m_offsets(m_offsets_), + m_heap(0), + m_cluster_index(dict_table_get_first_index(cfg->m_table)) UNIV_NOTHROW { - m_index = m_cfg->m_indexes; - - m_current_lsn = log_get_lsn(); ut_a(m_current_lsn > 0); - - m_offsets = m_offsets_; rec_offs_init(m_offsets_); - - m_cluster_index = dict_table_get_first_index(m_cfg->m_table); } /** @@ -2103,7 +2101,7 @@ PageConverter::operator() ( we can work on them */ if ((err = update_page(block, page_type)) != DB_SUCCESS) { - return(err); + break; } /* Note: For compressed pages this function will write to the @@ -2140,9 +2138,15 @@ PageConverter::operator() ( "%s: Page %lu at offset " UINT64PF " looks corrupted.", m_filepath, (ulong) (offset / m_page_size), offset); - return(DB_CORRUPTION); + err = DB_CORRUPTION; } + /* If we already had and old page with matching number + in the buffer pool, evict it now, because + we no longer evict the pages on DISCARD TABLESPACE. */ + buf_page_get_gen(get_space_id(), get_zip_size(), block->page.offset, + RW_NO_LATCH, NULL, BUF_EVICT_IF_IN_POOL, + __FILE__, __LINE__, NULL); return(err); } @@ -3716,8 +3720,7 @@ row_import_for_mysql( The only dirty pages generated should be from the pessimistic purge of delete marked records that couldn't be purged in Phase I. */ - buf_LRU_flush_or_remove_pages( - prebuilt->table->space, BUF_REMOVE_FLUSH_WRITE, trx); + buf_LRU_flush_or_remove_pages(prebuilt->table->space, trx); if (trx_is_interrupted(trx)) { ib_logf(IB_LOG_LEVEL_INFO, "Phase III - Flush interrupted"); diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index cbbb584d6..acbffb3a3 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -1137,7 +1137,7 @@ row_ins_foreign_check_on_constraint( rec_print(stderr, clust_rec, clust_index); fputs("\n" "InnoDB: Submit a detailed bug report to" - " http://bugs.mysql.com\n", stderr); + " https://jira.mariadb.org/\n", stderr); ut_ad(0); err = DB_SUCCESS; @@ -1291,12 +1291,11 @@ row_ins_foreign_check_on_constraint( #ifdef WITH_WSREP err = wsrep_append_foreign_key( - thr_get_trx(thr), - foreign, - clust_rec, - clust_index, - FALSE, - (node) ? TRUE : FALSE); + thr_get_trx(thr), + foreign, + clust_rec, + clust_index, + FALSE, FALSE); if (err != DB_SUCCESS) { fprintf(stderr, "WSREP: foreign key append failed: %d\n", err); diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc index ec6b4a606..9107ad623 100644 --- a/storage/innobase/row/row0log.cc +++ b/storage/innobase/row/row0log.cc @@ -182,7 +182,6 @@ struct row_log_t { dict_table_t* table; /*!< table that is being rebuilt, or NULL when this is a secondary index that is being created online */ - dict_index_t* index; /*!< index to be build */ bool same_pk;/*!< whether the definition of the PRIMARY KEY has remained the same */ const dtuple_t* add_cols; @@ -385,7 +384,7 @@ row_log_online_op( byte_offset, index->table->space)) { log->error = DB_DECRYPTION_FAILED; - goto err_exit; + goto write_failed; } srv_stats.n_rowlog_blocks_encrypted.inc(); @@ -479,13 +478,15 @@ static MY_ATTRIBUTE((nonnull)) void row_log_table_close_func( /*=====================*/ - row_log_t* log, /*!< in/out: online rebuild log */ + dict_index_t* index, /*!< in/out: online rebuilt index */ #ifdef UNIV_DEBUG const byte* b, /*!< in: end of log record */ #endif /* UNIV_DEBUG */ ulint size, /*!< in: size of log record */ ulint avail) /*!< in: available size for log record */ { + row_log_t* log = index->online_log; + ut_ad(mutex_own(&log->mutex)); if (size >= avail) { @@ -520,7 +521,7 @@ row_log_table_close_func( srv_sort_buf_size, log->crypt_tail, byte_offset, - log->index->table->space)) { + index->table->space)) { log->error = DB_DECRYPTION_FAILED; goto err_exit; } @@ -559,11 +560,11 @@ row_log_table_close_func( } #ifdef UNIV_DEBUG -# define row_log_table_close(log, b, size, avail) \ - row_log_table_close_func(log, b, size, avail) +# define row_log_table_close(index, b, size, avail) \ + row_log_table_close_func(index, b, size, avail) #else /* UNIV_DEBUG */ # define row_log_table_close(log, b, size, avail) \ - row_log_table_close_func(log, size, avail) + row_log_table_close_func(index, size, avail) #endif /* UNIV_DEBUG */ /******************************************************//** @@ -735,8 +736,7 @@ row_log_table_delete( b += ext_size; } - row_log_table_close( - index->online_log, b, mrec_size, avail_size); + row_log_table_close(index, b, mrec_size, avail_size); } func_exit: @@ -859,8 +859,7 @@ row_log_table_low_redundant( b + extra_size, index, tuple->fields, tuple->n_fields); b += size; - row_log_table_close( - index->online_log, b, mrec_size, avail_size); + row_log_table_close(index, b, mrec_size, avail_size); } mem_heap_free(heap); @@ -969,8 +968,7 @@ row_log_table_low( memcpy(b, rec, rec_offs_data_size(offsets)); b += rec_offs_data_size(offsets); - row_log_table_close( - index->online_log, b, mrec_size, avail_size); + row_log_table_close(index, b, mrec_size, avail_size); } } @@ -2678,7 +2676,7 @@ row_log_table_apply_ops( /* If encryption is enabled decrypt buffer after reading it from file system. */ - if (log_tmp_is_encrypted()) { + if (success && log_tmp_is_encrypted()) { if (!log_tmp_block_decrypt(buf, srv_sort_buf_size, index->online_log->crypt_head, @@ -2999,7 +2997,6 @@ row_log_allocate( log->head.total = 0; log->path = path; log->crypt_tail = log->crypt_head = NULL; - log->index = index; dict_index_set_online_status(index, ONLINE_INDEX_CREATION); index->online_log = log; @@ -3548,7 +3545,7 @@ row_log_apply_ops( /* If encryption is enabled decrypt buffer after reading it from file system. */ - if (log_tmp_is_encrypted()) { + if (success && log_tmp_is_encrypted()) { if (!log_tmp_block_decrypt(buf, srv_sort_buf_size, index->online_log->crypt_head, diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index 62dc98a3e..f4120e5fd 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -880,8 +880,8 @@ row_merge_read( success = os_file_read_no_error_handling_int_fd(fd, buf, ofs, srv_sort_buf_size); - /* For encrypted tables, decrypt data after reading and copy data */ - if (log_tmp_is_encrypted()) { + /* If encryption is enabled decrypt buffer */ + if (success && log_tmp_is_encrypted()) { if (!log_tmp_block_decrypt(buf, srv_sort_buf_size, crypt_buf, ofs, space)) { return (FALSE); @@ -3733,11 +3733,7 @@ row_merge_create_index( /*===================*/ trx_t* trx, /*!< in/out: trx (sets error_state) */ dict_table_t* table, /*!< in: the index is on this table */ - const index_def_t* index_def, - /*!< in: the index definition */ - const char** col_names) - /*! in: column names if columns are - renamed or NULL */ + const index_def_t* index_def) /*!< in: the index definition */ { dict_index_t* index; dberr_t err; @@ -3757,28 +3753,10 @@ row_merge_create_index( for (i = 0; i < n_fields; i++) { index_field_t* ifield = &index_def->fields[i]; - const char * col_name; - - /* - Alter table renaming a column and then adding a index - to this new name e.g ALTER TABLE t - CHANGE COLUMN b c INT NOT NULL, ADD UNIQUE INDEX (c); - requires additional check as column names are not yet - changed when new index definitions are created. Table's - new column names are on a array of column name pointers - if any of the column names are changed. */ - - if (col_names && col_names[i]) { - col_name = col_names[i]; - } else { - col_name = ifield->col_name ? - dict_table_get_col_name_for_mysql(table, ifield->col_name) : - dict_table_get_col_name(table, ifield->col_no); - } dict_mem_index_add_field( index, - col_name, + dict_table_get_col_name(table, ifield->col_no), ifield->prefix_len); } @@ -3915,22 +3893,13 @@ row_merge_build_indexes( DBUG_RETURN(DB_OUT_OF_MEMORY); } - /* Get crypt data from tablespace if present. We should be protected - from concurrent DDL (e.g. drop table) by MDL-locks. */ - fil_space_t* space = fil_space_acquire(new_table->space); - - if (!space) { - DBUG_RETURN(DB_TABLESPACE_NOT_FOUND); - } - - /* If tablespace is encrypted, allocate additional buffer for + /* If temporal log file is encrypted allocate memory for encryption/decryption. */ if (log_tmp_is_encrypted()) { crypt_block = static_cast( os_mem_alloc_large(&block_size)); if (crypt_block == NULL) { - fil_space_release(space); DBUG_RETURN(DB_OUT_OF_MEMORY); } } @@ -4310,9 +4279,5 @@ row_merge_build_indexes( } } - if (space) { - fil_space_release(space); - } - DBUG_RETURN(error); } diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index 1d64d66cd..dcf4413a1 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2015, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under @@ -59,6 +59,7 @@ Created 9/17/2000 Heikki Tuuri #include "btr0defragment.h" #include "fil0fil.h" #include "fil0crypt.h" +#include "srv0srv.h" #include "ibuf0ibuf.h" #include "fts0fts.h" #include "fts0types.h" @@ -570,11 +571,33 @@ row_mysql_convert_row_to_innobase( /* If there is a FTS doc id column and it is not user supplied ( generated by server) then assign it a new doc id. */ - if (prebuilt->table->fts) { + if (!prebuilt->table->fts) { + return; + } - ut_a(prebuilt->table->fts->doc_col != ULINT_UNDEFINED); + ut_a(prebuilt->table->fts->doc_col != ULINT_UNDEFINED); - fts_create_doc_id(prebuilt->table, row, prebuilt->heap); + doc_id_t doc_id; + + if (!DICT_TF2_FLAG_IS_SET(prebuilt->table, DICT_TF2_FTS_HAS_DOC_ID)) { + if (prebuilt->table->fts->cache->first_doc_id + == FTS_NULL_DOC_ID) { + fts_get_next_doc_id(prebuilt->table, &doc_id); + } + return; + } + + dfield_t* fts_doc_id = dtuple_get_nth_field( + row, prebuilt->table->fts->doc_col); + + if (fts_get_next_doc_id(prebuilt->table, &doc_id) == DB_SUCCESS) { + ut_a(doc_id != FTS_NULL_DOC_ID); + ut_ad(sizeof(doc_id) == fts_doc_id->type.len); + dfield_set_data(fts_doc_id, prebuilt->ins_upd_rec_buff + + prebuilt->mysql_row_len, 8); + fts_write_doc_id(fts_doc_id->data, doc_id); + } else { + dfield_set_null(fts_doc_id); } } @@ -1049,7 +1072,10 @@ row_get_prebuilt_insert_row( prebuilt->ins_upd_rec_buff = static_cast( mem_heap_alloc( prebuilt->heap, - prebuilt->mysql_row_len)); + DICT_TF2_FLAG_IS_SET(prebuilt->table, + DICT_TF2_FTS_HAS_DOC_ID) + ? prebuilt->mysql_row_len + 8/* FTS_DOC_ID */ + : prebuilt->mysql_row_len)); } dtuple_t* row; @@ -2451,10 +2477,7 @@ row_create_table_for_mysql( /* We already have .ibd file here. it should be deleted. */ if (table->space - && fil_delete_tablespace( - table->space, - BUF_REMOVE_FLUSH_NO_WRITE) - != DB_SUCCESS) { + && fil_delete_tablespace(table->space) != DB_SUCCESS) { ut_print_timestamp(stderr); fprintf(stderr, @@ -3083,9 +3106,6 @@ row_discard_tablespace( 4) FOREIGN KEY operations: if table->n_foreign_key_checks_running > 0, we do not allow the discard. */ - /* Play safe and remove all insert buffer entries, though we should - have removed them already when DISCARD TABLESPACE was called */ - ibuf_delete_for_discarded_space(table->space); table_id_t new_id; @@ -4001,6 +4021,16 @@ row_drop_table_for_mysql( ut_ad(!table->fts->add_wq); ut_ad(lock_trx_has_sys_table_locks(trx) == 0); + for (;;) { + bool retry = false; + if (dict_fts_index_syncing(table)) { + retry = true; + } + if (!retry) { + break; + } + DICT_BG_YIELD(trx); + } row_mysql_unlock_data_dictionary(trx); fts_optimize_remove_table(table); row_mysql_lock_data_dictionary(trx); @@ -4460,9 +4490,7 @@ row_drop_table_for_mysql( fil_delete_file(filepath); - } else if (fil_delete_tablespace( - space_id, - BUF_REMOVE_FLUSH_NO_WRITE) + } else if (fil_delete_tablespace(space_id) != DB_SUCCESS) { fprintf(stderr, "InnoDB: We removed now the InnoDB" diff --git a/storage/innobase/row/row0quiesce.cc b/storage/innobase/row/row0quiesce.cc index 583fbe60f..6c4e6adb9 100644 --- a/storage/innobase/row/row0quiesce.cc +++ b/storage/innobase/row/row0quiesce.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -542,8 +543,7 @@ row_quiesce_table_start( } if (!trx_is_interrupted(trx)) { - buf_LRU_flush_or_remove_pages( - table->space, BUF_REMOVE_FLUSH_WRITE, trx); + buf_LRU_flush_or_remove_pages(table->space, trx); if (trx_is_interrupted(trx)) { diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc index 04894d29e..d309cf4c7 100644 --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@ -2724,6 +2724,7 @@ row_sel_field_store_in_mysql_format_func( case DATA_SYS: /* These column types should never be shipped to MySQL. */ ut_ad(0); + /* fall through */ case DATA_CHAR: case DATA_FIXBINARY: @@ -2758,8 +2759,6 @@ row_sel_field_store_in_mysql_format_func( @param[in] field_no templ->rec_field_no or templ->clust_rec_field_no or templ->icp_rec_field_no - or sec field no if clust_templ_for_sec - is TRUE @param[in] templ row template */ static MY_ATTRIBUTE((warn_unused_result)) @@ -2912,10 +2911,6 @@ be needed in the query. @param[in] rec_clust TRUE if the rec in the clustered index @param[in] index index of rec @param[in] offsets array returned by rec_get_offsets(rec) -@param[in] clust_templ_for_sec TRUE if rec belongs to secondary index - but the prebuilt->template is in - clustered index format and it is - used only for end range comparison @return TRUE on success, FALSE if not all columns could be retrieved */ static MY_ATTRIBUTE((warn_unused_result)) ibool @@ -3098,7 +3093,7 @@ row_sel_get_clust_rec_for_mysql( trx_print(stderr, trx, 600); fputs("\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", stderr); + " to https://jira.mariadb.org/\n", stderr); ut_ad(0); } diff --git a/storage/innobase/row/row0umod.cc b/storage/innobase/row/row0umod.cc index a97c89212..4aa5cfdc4 100644 --- a/storage/innobase/row/row0umod.cc +++ b/storage/innobase/row/row0umod.cc @@ -683,7 +683,7 @@ row_undo_mod_del_unmark_sec_and_undo_update( trx_print(stderr, trx, 0); fputs("\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", stderr); + " to https://jira.mariadb.org/\n", stderr); ib_logf(IB_LOG_LEVEL_WARN, "record in index %s was not found" diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index ba874ac6d..ef51e2046 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -1952,7 +1952,7 @@ row_upd_sec_index_entry( trx_print(stderr, trx, 0); fputs("\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", stderr); + " to https://jira.mariadb.org/\n", stderr); ut_ad(0); break; case ROW_FOUND: diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 143121127..749ece33a 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -1914,7 +1914,7 @@ DECLARE_THREAD(srv_error_monitor_thread)(void*) " was greater\n" "InnoDB: than the new log sequence number " LSN_PF "!\n" "InnoDB: Please submit a bug report" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org\n", old_lsn, new_lsn); ut_ad(0); } diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index 8eff14e0e..5553de481 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -603,7 +603,7 @@ trx_purge_rseg_get_next_history_log( "InnoDB: but its length is still" " reported as %lu! Make a detailed bug\n" "InnoDB: report, and submit it" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org/\n", (ulong) trx_sys->rseg_history_len); ut_ad(0); } diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc index ab92d1ef0..1010f6094 100644 --- a/storage/innobase/trx/trx0rec.cc +++ b/storage/innobase/trx/trx0rec.cc @@ -772,7 +772,25 @@ trx_undo_page_report_modify( const dict_col_t* col = dict_table_get_nth_col(table, col_no); - if (col->ord_part) { + if (!col->ord_part) { + continue; + } + + if (update) { + for (i = 0; i < update->n_fields; i++) { + const dict_field_t* f + = dict_index_get_nth_field( + index, + upd_get_nth_field( + update, i) + ->field_no); + if (f->col == col) { + goto already_logged; + } + } + } + + if (TRUE) { ulint pos; /* Write field number to undo log */ @@ -823,6 +841,9 @@ trx_undo_page_report_modify( ptr += flen; } } + +already_logged: + continue; } mach_write_to_2(old_ptr, ptr - old_ptr); @@ -1001,7 +1022,7 @@ trx_undo_update_rec_get_update( fprintf(stderr, "\n" "InnoDB: but index has only %lu fields\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n" + " to https://jira.mariadb.org/\n" "InnoDB: Run also CHECK TABLE ", (ulong) dict_index_get_n_fields(index)); ut_print_name(stderr, trx, TRUE, index->table_name); diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index c7db5cb5e..1cd0b6ede 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -314,8 +314,9 @@ trx_free_prepared( trx_t* trx) /*!< in, own: trx object */ { ut_a(trx_state_eq(trx, TRX_STATE_PREPARED) - || (trx_state_eq(trx, TRX_STATE_ACTIVE) - && trx->is_recovered + || (trx->is_recovered + && (trx_state_eq(trx, TRX_STATE_ACTIVE) + || trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY)) && (srv_read_only_mode || srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO))); ut_a(trx->magic_n == TRX_MAGIC_N); @@ -2434,4 +2435,3 @@ trx_start_for_ddl_low( ut_error; } - diff --git a/storage/innobase/trx/trx0undo.cc b/storage/innobase/trx/trx0undo.cc index 220589dd9..1836d282c 100644 --- a/storage/innobase/trx/trx0undo.cc +++ b/storage/innobase/trx/trx0undo.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2014, 2017, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2014, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -2015,6 +2015,12 @@ trx_undo_free_prepared( switch (trx->update_undo->state) { case TRX_UNDO_PREPARED: break; + case TRX_UNDO_CACHED: + case TRX_UNDO_TO_FREE: + case TRX_UNDO_TO_PURGE: + ut_ad(trx_state_eq(trx, + TRX_STATE_COMMITTED_IN_MEMORY)); + /* fall through */ case TRX_UNDO_ACTIVE: /* lock_trx_release_locks() assigns trx->is_recovered=false */ @@ -2033,6 +2039,12 @@ trx_undo_free_prepared( switch (trx->insert_undo->state) { case TRX_UNDO_PREPARED: break; + case TRX_UNDO_CACHED: + case TRX_UNDO_TO_FREE: + case TRX_UNDO_TO_PURGE: + ut_ad(trx_state_eq(trx, + TRX_STATE_COMMITTED_IN_MEMORY)); + /* fall through */ case TRX_UNDO_ACTIVE: /* lock_trx_release_locks() assigns trx->is_recovered=false */ diff --git a/storage/innobase/ut/ut0dbg.cc b/storage/innobase/ut/ut0dbg.cc index a1cad144d..a0bd82b38 100644 --- a/storage/innobase/ut/ut0dbg.cc +++ b/storage/innobase/ut/ut0dbg.cc @@ -63,7 +63,7 @@ ut_dbg_assertion_failed( fputs("InnoDB: We intentionally generate a memory trap.\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com.\n" + " to https://jira.mariadb.org/\n" "InnoDB: If you get repeated assertion failures" " or crashes, even\n" "InnoDB: immediately after the mysqld startup, there may be\n" diff --git a/storage/maria/ma_extra.c b/storage/maria/ma_extra.c index 99c9df230..6c74bb52f 100644 --- a/storage/maria/ma_extra.c +++ b/storage/maria/ma_extra.c @@ -314,7 +314,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function, share->state.open_count= 1; share->changed= 1; _ma_mark_file_changed_now(share); - /* Fall through */ + /* fall through */ case HA_EXTRA_PREPARE_FOR_RENAME: { my_bool do_flush= MY_TEST(function != HA_EXTRA_PREPARE_FOR_DROP); @@ -660,4 +660,3 @@ my_bool ma_killed_standalone(MARIA_HA *info __attribute__((unused))) { return 0; } - diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index defa11ad6..7a3d4a216 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -2727,7 +2727,7 @@ static my_bool translog_recover_page_up_to_sector(uchar *page, uint16 offset) DBUG_PRINT("enter", ("offset: %u first chunk: %u", (uint) offset, (uint) chunk_offset)); - while (page[chunk_offset] != TRANSLOG_FILLER && chunk_offset < offset) + while (chunk_offset < offset && page[chunk_offset] != TRANSLOG_FILLER) { uint16 chunk_length; if ((chunk_length= diff --git a/storage/maria/ma_recovery.c b/storage/maria/ma_recovery.c index b1d237887..b0b547a30 100644 --- a/storage/maria/ma_recovery.c +++ b/storage/maria/ma_recovery.c @@ -3058,7 +3058,7 @@ static MARIA_HA *get_MARIA_HA_from_REDO_record(const case LOGREC_REDO_INDEX: case LOGREC_REDO_INDEX_FREE_PAGE: index_page_redo_entry= 1; - /* Fall through */ + /* fall through*/ case LOGREC_REDO_INSERT_ROW_HEAD: case LOGREC_REDO_INSERT_ROW_TAIL: case LOGREC_REDO_PURGE_ROW_HEAD: diff --git a/storage/mroonga/CMakeLists.txt b/storage/mroonga/CMakeLists.txt index 39dad9ce1..5d8e8c1ee 100644 --- a/storage/mroonga/CMakeLists.txt +++ b/storage/mroonga/CMakeLists.txt @@ -15,7 +15,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA cmake_minimum_required(VERSION 2.6) project(mroonga) @@ -51,6 +51,14 @@ if(MSVC) endif() endif() +if(MRN_BUNDLED) + if(WITHOUT_MROONGA OR + WITHOUT_MROONGA_STORAGE_ENGINE OR + "${PLUGIN_MROONGA}" STREQUAL "NO") + return() + endif() +endif() + set(MRN_BUNDLED_GROONGA_RELATIVE_DIR "vendor/groonga") set(MRN_BUNDLED_GROONGA_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${MRN_BUNDLED_GROONGA_RELATIVE_DIR}") @@ -79,6 +87,58 @@ file(READ ${MRN_SOURCE_DIR}/version_micro MRN_VERSION_MICRO) file(READ ${MRN_SOURCE_DIR}/version_in_hex MRN_VERSION_IN_HEX) file(READ ${MRN_SOURCE_DIR}/plugin_version MRN_PLUGIN_VERSION) +if(MRN_GROONGA_BUNDLED) + option(MRN_GROONGA_EMBED + "Embed libgroonga" + ON) + if(MRN_GROONGA_EMBED) + set(GRN_EMBED ON) + endif() + + set(MRN_BUNDLED_GROONGA_NORMALIZER_MYSQL_DIR + "${MRN_BUNDLED_GROONGA_DIR}/vendor/plugins/groonga-normalizer-mysql") + option(MRN_GROONGA_NORMALIZER_MYSQL_EMBED + "Embed groonga-normalizer-mysql Groonga plugin" + ON) + if(EXISTS ${MRN_BUNDLED_GROONGA_NORMALIZER_MYSQL_DIR}) + set(GROONGA_NORMALIZER_MYSQL_FOUND ON) + else() + set(GROONGA_NORMALIZER_MYSQL_FOUND OFF) + set(MRN_GROONGA_NORMALIZER_MYSQL_EMBED OFF) + endif() + if(MRN_GROONGA_NORMALIZER_MYSQL_EMBED) + set(GROONGA_NORMALIZER_MYSQL_EMBED ON) + endif() + + file(READ "${MRN_BUNDLED_GROONGA_DIR}/bundled_lz4_version" + MRN_BUNDLED_LZ4_VERSION) + string(STRIP + "${MRN_BUNDLED_LZ4_VERSION}" + MRN_BUNDLED_LZ4_VERSION) + set(MRN_BUNDLED_LZ4_DIR + "${MRN_BUNDLED_GROONGA_DIR}/vendor/lz4-${MRN_BUNDLED_LZ4_VERSION}") + if(EXISTS ${MRN_BUNDLED_LZ4_DIR}) + set(GRN_WITH_BUNDLED_LZ4 ON) + set(GRN_WITH_LZ4 "yes") + else() + set(GRN_WITH_LZ4 "no") + endif() + + add_subdirectory("${MRN_BUNDLED_GROONGA_RELATIVE_DIR}") +else() + set(MRN_GROONGA_EMBED OFF) + + file(READ ${MRN_SOURCE_DIR}/required_groonga_version REQUIRED_GROONGA_VERSION) + string(STRIP "${REQUIRED_GROONGA_VERSION}" REQUIRED_GROONGA_VERSION) + + file(READ + ${MRN_SOURCE_DIR}/required_groonga_normalizer_mysql_version + REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION) + string(STRIP + "${REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION}" + REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION) +endif() + set(MRN_PACKAGE_STRING "${PROJECT_NAME} ${MRN_VERSION}") include(CheckCCompilerFlag) @@ -107,18 +167,7 @@ read_file_list(${CMAKE_CURRENT_SOURCE_DIR}/udf/sources.am MRN_UDF_SOURCES) string(REGEX REPLACE "([^;]+)" "${MRN_RELATIVE_DIR_PREFIX}udf/\\1" MRN_UDF_SOURCES "${MRN_UDF_SOURCES}") -set(MRN_ALL_SOURCES - ${MRN_SOURCES} - ${MRN_UDF_SOURCES} - ${LIBMRN_NO_MYSQL_SOURCES} - ${LIBMRN_NEED_MYSQL_SOURCES}) - if(MRN_BUNDLED) - mysql_add_plugin(mroonga ${MRN_ALL_SOURCES} STORAGE_ENGINE MODULE_ONLY) - if(NOT TARGET mroonga) - return() - endif() - set(MYSQL_SOURCE_DIR ${CMAKE_SOURCE_DIR}) set(MYSQL_BUILD_DIR ${MYSQL_SOURCE_DIR}) set(MYSQL_CONFIG ${CMAKE_SOURCE_DIR}/scripts/mysql_config) @@ -134,44 +183,6 @@ else() endif() find_path(MYSQL_CONFIG "${MYSQL_CONFIG}") -if(MRN_GROONGA_BUNDLED) - option(MRN_GROONGA_EMBED - "Embed libgroonga" - ON) - if(MRN_GROONGA_EMBED) - set(GRN_EMBED ON) - endif() - - set(MRN_BUNDLED_GROONGA_NORMALIZER_MYSQL_DIR - "${MRN_BUNDLED_GROONGA_DIR}/vendor/plugins/groonga-normalizer-mysql") - option(MRN_GROONGA_NORMALIZER_MYSQL_EMBED - "Embed groonga-normalizer-mysql Groonga plugin" - ON) - if(EXISTS ${MRN_BUNDLED_GROONGA_NORMALIZER_MYSQL_DIR}) - set(GROONGA_NORMALIZER_MYSQL_FOUND ON) - else() - set(GROONGA_NORMALIZER_MYSQL_FOUND OFF) - set(MRN_GROONGA_NORMALIZER_MYSQL_EMBED OFF) - endif() - if(MRN_GROONGA_NORMALIZER_MYSQL_EMBED) - set(GROONGA_NORMALIZER_MYSQL_EMBED ON) - endif() - - add_subdirectory("${MRN_BUNDLED_GROONGA_RELATIVE_DIR}") -else() - set(MRN_GROONGA_EMBED OFF) - - file(READ ${MRN_SOURCE_DIR}/required_groonga_version REQUIRED_GROONGA_VERSION) - string(STRIP "${REQUIRED_GROONGA_VERSION}" REQUIRED_GROONGA_VERSION) - - file(READ - ${MRN_SOURCE_DIR}/required_groonga_normalizer_mysql_version - REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION) - string(STRIP - "${REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION}" - REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION) -endif() - if(EXISTS "${MYSQL_SOURCE_DIR}/storage/maria") set(MYSQL_VARIANT "MariaDB") else() @@ -194,6 +205,7 @@ if(EXISTS "${MYSQL_SOURCE_DIR}/libbinlogevents") set(MYSQL_LIBBINLOGEVENTS_EXPORT_DIR "${MYSQL_SOURCE_DIR}/libbinlogevents/export") set(MYSQL_LIBBINLOGEVENTS_INCLUDE_DIR + "${MYSQL_BUILD_DIR}/libbinlogevents/include" "${MYSQL_SOURCE_DIR}/libbinlogevents/include") else() set(MYSQL_LIBBINLOGEVENTS_EXPORT_DIR) @@ -270,6 +282,7 @@ else() set(MRN_LIBRARY_DIRS ${MRN_LIBRARY_DIRS} ${GROONGA_LIBRARY_DIRS}) + set(MRN_LIBRARIES ${GROONGA_LIBRARIES}) endif() include_directories( @@ -291,11 +304,17 @@ link_directories( ${MRN_LIBRARY_DIRS} ${MYSQL_LIBRARY_DIRS}) +set(MRN_ALL_SOURCES + ${MRN_SOURCES} + ${MRN_UDF_SOURCES} + ${LIBMRN_NO_MYSQL_SOURCES} + ${LIBMRN_NEED_MYSQL_SOURCES}) + if(MRN_BUNDLED) - target_link_libraries(mroonga ${MRN_LIBRARIES}) - if(NOT TARGET mroonga) - return() - endif() + mysql_add_plugin(mroonga + ${MRN_ALL_SOURCES} + STORAGE_ENGINE MODULE_ONLY + LINK_LIBRARIES ${MRN_LIBRARIES}) else() add_library(mroonga MODULE ${MRN_ALL_SOURCES}) @@ -340,9 +359,14 @@ else() MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-strict-aliasing") MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated") MY_CHECK_AND_SET_COMPILER_FLAG("-fno-implicit-templates") - MY_CHECK_AND_SET_COMPILER_FLAG("-fno-exceptions") - MY_CHECK_AND_SET_COMPILER_FLAG("-fno-rtti") + if(("${MYSQL_VARIANT}" STREQUAL "MariaDB") OR + ("${MYSQL_VARIANT}" STREQUAL "MySQL" AND + ${MYSQL_VERSION} VERSION_LESS "5.7.0")) + MY_CHECK_AND_SET_COMPILER_FLAG("-fno-exceptions") + MY_CHECK_AND_SET_COMPILER_FLAG("-fno-rtti") + endif() MY_CHECK_AND_SET_COMPILER_FLAG("-felide-constructors") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough") endif() set_source_files_properties(${MRN_SOURCES} PROPERTIES COMPILE_FLAGS "${MYSQL_CFLAGS} ${MRN_CXX_COMPILE_FLAGS}") @@ -361,10 +385,20 @@ else() install(TARGETS mroonga DESTINATION "${MYSQL_PLUGIN_DIR}") endif() +option(MRN_BUILD_FOR_EMBEDDED_SERVER + "Whether to build Mroonga for embedded server or not. You can't use Mroonga built for embedded server with non embedded server." + OFF) +if(MRN_BUILD_FOR_EMBEDDED_SERVER) + set_property(TARGET mroonga APPEND PROPERTY + COMPILE_DEFINITIONS "EMBEDDED_LIBRARY") +endif() + if(GROONGA_NORMALIZER_MYSQL_FOUND) - add_definitions("-DWITH_GROONGA_NORMALIZER_MYSQL=1") + set_property(TARGET mroonga APPEND PROPERTY + COMPILE_DEFINITIONS "WITH_GROONGA_NORMALIZER_MYSQL=1") if(MRN_GROONGA_NORMALIZER_MYSQL_EMBED) - add_definitions("-DMRN_GROONGA_NORMALIZER_MYSQL_EMBEDDED") + set_property(TARGET mroonga APPEND PROPERTY + COMPILE_DEFINITIONS "MRN_GROONGA_NORMALIZER_MYSQL_EMBEDDED") else() set_property(TARGET mroonga APPEND PROPERTY COMPILE_DEFINITIONS "GROONGA_NORMALIZER_MYSQL_PLUGIN_NAME=\"normalizers/mysql\"") @@ -372,7 +406,8 @@ if(GROONGA_NORMALIZER_MYSQL_FOUND) endif() if(MRN_GROONGA_EMBED) - add_definitions("-DMRN_GROONGA_EMBEDDED") + set_property(TARGET mroonga APPEND PROPERTY + COMPILE_DEFINITIONS "MRN_GROONGA_EMBEDDED") endif() set(MRN_DEFAULT_PARSER "" CACHE STRING @@ -418,6 +453,8 @@ else() set(MRN_DATA_DIR "share/${PROJECT_NAME}") endif() install(FILES + "${PROJECT_SOURCE_DIR}/AUTHORS" + "${PROJECT_SOURCE_DIR}/COPYING" "${PROJECT_BINARY_DIR}/data/install.sql" "${PROJECT_SOURCE_DIR}/data/uninstall.sql" DESTINATION "${MRN_DATA_DIR}/") diff --git a/storage/mroonga/Makefile.am b/storage/mroonga/Makefile.am index d783ec883..69349ea6a 100644 --- a/storage/mroonga/Makefile.am +++ b/storage/mroonga/Makefile.am @@ -1,9 +1,9 @@ +ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_ARGS} AUTOMAKE_OPTIONS = 1.9.7 LOCALES = ja AM_CPPFLAGS = $(MYSQL_INCLUDES) $(GROONGA_CFLAGS) -I$(top_srcdir)/lib -ACLOCAL_AMFLAGS = $$ACLOCAL_ARGS include sources.am @@ -49,7 +49,13 @@ tag: cd $(top_srcdir) && \ git tag v$(VERSION) -a -m 'Mroonga $(VERSION)!!!' -update-latest-release: misc +ensure-cutter-source-path: + @if test -z "$(CUTTER_SOURCE_PATH)"; then \ + echo "\$$(CUTTER_SOURCE_PATH) is missing"; \ + exit 1; \ + fi + +update-latest-release: ensure-cutter-source-path @if test -z "$(OLD_RELEASE)"; then \ echo "\$$(OLD_RELEASE) is missing"; \ exit 1; \ @@ -63,17 +69,40 @@ update-latest-release: misc exit 1; \ fi cd $(top_srcdir) && \ - misc/update-latest-release.rb \ + "$(CUTTER_SOURCE_PATH)/misc/update-latest-release.rb" \ $(PACKAGE) $(OLD_RELEASE) $(OLD_RELEASE_DATE) \ $(VERSION) $(NEW_RELEASE_DATE) \ packages/rpm/centos/mariadb-mroonga.spec.in \ + packages/rpm/centos/mariadb-10.1-mroonga.spec.in \ + packages/rpm/centos/mariadb-10.2-mroonga.spec.in \ packages/rpm/centos/mysql55-mroonga.spec.in \ packages/rpm/centos/mysql56-community-mroonga.spec.in \ - packages/debian/changelog \ + packages/rpm/centos/mysql57-community-mroonga.spec.in \ + packages/rpm/centos/percona-server-56-mroonga.spec.in \ + packages/rpm/centos/percona-server-57-mroonga.spec.in \ doc/source/install/*.rst \ doc/locale/*/LC_MESSAGES/install.po \ - $(MROONGA_GITHUB_COM_PATH)/index.html \ - $(MROONGA_GITHUB_COM_PATH)/ja/index.html + $(MROONGA_GITHUB_COM_PATH)/_config.yml + cd $(top_srcdir) && \ + "$(CUTTER_SOURCE_PATH)/misc/update-latest-release.rb" \ + $(PACKAGE)-5.5 $(OLD_RELEASE) $(OLD_RELEASE_DATE) \ + $(VERSION) $(NEW_RELEASE_DATE) \ + packages/debian-5.5/changelog + cd $(top_srcdir) && \ + "$(CUTTER_SOURCE_PATH)/misc/update-latest-release.rb" \ + $(PACKAGE)-5.6 $(OLD_RELEASE) $(OLD_RELEASE_DATE) \ + $(VERSION) $(NEW_RELEASE_DATE) \ + packages/debian-5.6/changelog + cd $(top_srcdir) && \ + "$(CUTTER_SOURCE_PATH)/misc/update-latest-release.rb" \ + $(PACKAGE)-5.7 $(OLD_RELEASE) $(OLD_RELEASE_DATE) \ + $(VERSION) $(NEW_RELEASE_DATE) \ + packages/debian-5.7/changelog + cd $(top_srcdir) && \ + "$(CUTTER_SOURCE_PATH)/misc/update-latest-release.rb" \ + $(PACKAGE)-mariadb-10.0 $(OLD_RELEASE) $(OLD_RELEASE_DATE) \ + $(VERSION) $(NEW_RELEASE_DATE) \ + packages/debian-mariadb-10.0/changelog update-po: @for lang in $(LOCALES); do \ @@ -144,10 +173,3 @@ upload-to-github: echo-cutter: echo $(CUTTER) - -misc: - @if test -z "$(CUTTER_SOURCE_PATH)"; then \ - echo "\$$(CUTTER_SOURCE_PATH) is missing"; \ - exit 1; \ - fi - ln -s "$(CUTTER_SOURCE_PATH)/misc" misc diff --git a/storage/mroonga/appveyor.yml b/storage/mroonga/appveyor.yml index 038d59005..3cf8ff8d3 100644 --- a/storage/mroonga/appveyor.yml +++ b/storage/mroonga/appveyor.yml @@ -1,54 +1,63 @@ version: "{build}" clone_depth: 10 +environment: + global: + MARIADB_VERSION: 10.1.26 + matrix: + - CMAKE_GENERATOR_NAME: "Visual Studio 14 2015" + - CMAKE_GENERATOR_NAME: "Visual Studio 14 2015 Win64" + install: - cd .. - choco install -y curl 7zip.commandline - - curl -O http://mirror.jmu.edu/pub/mariadb/mariadb-10.0.20/source/mariadb-10.0.20.tar.gz - - 7z x mariadb-10.0.20.tar.gz - - 7z x mariadb-10.0.20.tar > nul - - cd mariadb-10.0.20 + - curl -O http://mirror.jmu.edu/pub/mariadb/mariadb-%MARIADB_VERSION%/source/mariadb-%MARIADB_VERSION%.tar.gz + - 7z x mariadb-%MARIADB_VERSION%.tar.gz + - 7z x mariadb-%MARIADB_VERSION%.tar > nul + - cd mariadb-%MARIADB_VERSION% - rmdir /S /Q storage\mroonga\ - move ..\mroonga storage\mroonga - - git clone --quiet --depth 1 https://github.com/groonga/groonga.git ..\groonga - - cd ..\groonga - - git submodule update --init - - cd ..\mariadb-10.0.20 + - git clone --quiet --depth 1 --recursive https://github.com/groonga/groonga.git ..\groonga - rmdir /S /Q ..\groonga\test\ + - cd ..\groonga\vendor + - c:\Ruby22-x64\bin\ruby -v download_lz4.rb + - c:\Ruby22-x64\bin\ruby -v download_mecab.rb + - cd ..\..\mariadb-%MARIADB_VERSION% - mkdir storage\mroonga\vendor - move ..\groonga storage\mroonga\vendor\groonga - git clone --quiet --depth 1 https://github.com/groonga/groonga-normalizer-mysql.git storage\mroonga\vendor\groonga\vendor\plugins\groonga-normalizer-mysql build_script: - "echo # > win\\packaging\\CMakeLists.txt" - - cmake . -G "Visual Studio 12 Win64" + - cmake . -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=Debug - -DWITHOUT_ARCHIVE=ON - -DWITHOUT_BLACKHOLE=ON - -DWITHOUT_CASSANDRA=ON - -DWITHOUT_CONNECT=ON - -DWITHOUT_CSV=ON - -DWITHOUT_EXAMPLE=ON - -DWITHOUT_FEDERATED=ON - -DWITHOUT_FEDERATEDX=ON - -DWITHOUT_HEAP=ON - -DWITHOUT_INNOBASE=ON - -DWITHOUT_MYISAM=ON - -DWITHOUT_MYISAMMRG=ON - -DWITHOUT_OQGRAPH=ON - -DWITHOUT_PERFSCHEMA=OFF - -DWITHOUT_SEQUENCE=ON - -DWITHOUT_SPHINX=ON - -DWITHOUT_SPIDER=ON - -DWITHOUT_TEST_SQL_DISCOVERY=ON - -DWITHOUT_TOKUDB=ON - -DWITHOUT_XTRADB=ON + -DPLUGIN_ARCHIVE=NO + -DPLUGIN_BLACKHOLE=NO + -DPLUGIN_CASSANDRA=NO + -DPLUGIN_CONNECT=NO + -DPLUGIN_CSV=NO + -DPLUGIN_EXAMPLE=NO + -DPLUGIN_FEDERATED=NO + -DPLUGIN_FEDERATEDX=NO + -DPLUGIN_HEAP=NO + -DPLUGIN_INNOBASE=NO + -DPLUGIN_MYISAM=NO + -DPLUGIN_MYISAMMRG=NO + -DPLUGIN_OQGRAPH=NO + -DPLUGIN_PERFSCHEMA=NO + -DPLUGIN_SEQUENCE=NO + -DPLUGIN_SPHINX=NO + -DPLUGIN_SPIDER=NO + -DPLUGIN_TEST_SQL_DISCOVERY=NO + -DPLUGIN_TOKUDB=NO + -DPLUGIN_XTRADB=NO -DWITH_UNIT_TESTS=OFF + -DWITH_MARIABACKUP=OFF + -DGRN_WITH_BUNDLED_MECAB=ON - cmake --build . --config Debug notifications: - provider: Email to: - groonga-mysql-commit@lists.sourceforge.jp - - kou@clear-code.com on_build_status_changed: true test: off diff --git a/storage/mroonga/autogen.sh b/storage/mroonga/autogen.sh index 7a1d38635..f795ad000 100755 --- a/storage/mroonga/autogen.sh +++ b/storage/mroonga/autogen.sh @@ -1,116 +1,11 @@ #!/bin/sh -warn() { - echo " WARNING: $@" 1>&2 -} - -# init - -LIBTOOLIZE=libtoolize -ACLOCAL=aclocal -AUTOCONF=autoconf -AUTOHEADER=autoheader -AUTOMAKE=automake - -case `uname -s` in -Darwin) - LIBTOOLIZE=glibtoolize - ;; +case $(uname -s) in FreeBSD) - ACLOCAL_ARGS="$ACLOCAL_ARGS -I /usr/local/share/aclocal/" - ;; + ACLOCAL_ARGS="$ACLOCAL_ARGS -I /usr/local/share/aclocal/" + ;; esac +mkdir -p m4 -# libtoolize -echo "Searching libtoolize..." -if [ `which $LIBTOOLIZE` ] ; then - echo " FOUND: libtoolize -> $LIBTOOLIZE" -else - warn "Cannot Found libtoolize... input libtool command" - read LIBTOOLIZE - LIBTOOLIZE=`which $LIBTOOLIZE` - if [ `which $LIBTOOLIZE` ] ; then - echo " SET: libtoolize -> $LIBTOOLIZE" - else - warn "$LIBTOOLIZE: Command not found." - exit 1; - fi -fi - -# aclocal -echo "Searching aclocal..." -if [ `which $ACLOCAL` ] ; then - echo " FOUND: aclocal -> $ACLOCAL" -else - warn "Cannot Found aclocal... input aclocal command" - read ACLOCAL - ACLOCAL=`which $ACLOCAL` - if [ `which $ACLOCAL` ] ; then - echo " SET: aclocal -> $ACLOCAL" - else - warn "$ACLOCAL: Command not found." - exit 1; - fi -fi - -# automake -echo "Searching automake..." -if [ `which $AUTOMAKE` ] ; then - echo " FOUND: automake -> $AUTOMAKE" -else - warn "Cannot Found automake... input automake command" - read AUTOMAKE - ACLOCAL=`which $AUTOMAKE` - if [ `which $AUTOMAKE` ] ; then - echo " SET: automake -> $AUTOMAKE" - else - warn "$AUTOMAKE: Command not found." - exit 1; - fi -fi - -# autoheader -echo "Searching autoheader..." -if [ `which $AUTOHEADER` ] ; then - echo " FOUND: autoheader -> $AUTOHEADER" -else - warn "Cannot Found autoheader... input autoheader command" - read AUTOHEADER - ACLOCAL=`which $AUTOHEADER` - if [ `which $AUTOHEADER` ] ; then - echo " SET: autoheader -> $AUTOHEADER" - else - warn "$AUTOHEADER: Command not found." - exit 1; - fi -fi - -# autoconf -echo "Searching autoconf..." -if [ `which $AUTOCONF` ] ; then - echo " FOUND: autoconf -> $AUTOCONF" -else - warn "Cannot Found autoconf... input autoconf command" - read AUTOCONF - ACLOCAL=`which $AUTOCONF` - if [ `which $AUTOCONF` ] ; then - echo " SET: autoconf -> $AUTOCONF" - else - warn "$AUTOCONF: Command not found." - exit 1; - fi -fi - -set -e - -echo "Running libtoolize ..." -$LIBTOOLIZE --force --copy -echo "Running aclocal ..." -$ACLOCAL ${ACLOCAL_ARGS} -echo "Running autoheader..." -$AUTOHEADER -echo "Running automake ..." -$AUTOMAKE --add-missing --copy -echo "Running autoconf ..." -$AUTOCONF +${AUTORECONF:-autoreconf} --force --install "$@" diff --git a/storage/mroonga/build/makefiles/sphinx-build.am b/storage/mroonga/build/makefiles/sphinx-build.am index e237377ba..57bbcd614 100644 --- a/storage/mroonga/build/makefiles/sphinx-build.am +++ b/storage/mroonga/build/makefiles/sphinx-build.am @@ -10,10 +10,8 @@ PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = $(PAPEROPT_$(PAPER)) -E $(SPHINXOPTS) $(SOURCE_DIR) -SPHINX_DIR = $(abs_top_builddir)/doc/sphinx SPHINX_BUILD_COMMAND = \ DOCUMENT_VERSION="$(DOCUMENT_VERSION)" \ DOCUMENT_VERSION_FULL="$(DOCUMENT_VERSION_FULL)" \ LOCALE="$(LOCALE)" \ - PYTHONPATH="$(SPHINX_DIR):$$PYTHONPATH" \ $(SPHINX_BUILD) diff --git a/storage/mroonga/config.sh.in b/storage/mroonga/config.sh.in index e86973bdf..32e88fd5c 100644 --- a/storage/mroonga/config.sh.in +++ b/storage/mroonga/config.sh.in @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA MYSQL_SOURCE_DIR="@MYSQL_SOURCE_DIR@" MYSQL_BUILD_DIR="@MYSQL_BUILD_DIR@" diff --git a/storage/mroonga/configure.ac b/storage/mroonga/configure.ac index f60b481e0..b1e66904f 100644 --- a/storage/mroonga/configure.ac +++ b/storage/mroonga/configure.ac @@ -8,6 +8,7 @@ m4_define([mrn_version_in_hex], m4_include(version_in_hex)) m4_define([mrn_plugin_version], m4_include(plugin_version)) AC_INIT([mroonga], [mrn_version], [groonga-talk@lists.sourceforge.net]) +AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([tar-pax foreign subdir-objects]) @@ -173,18 +174,27 @@ AC_DEFUN([CONFIG_OPTION_MYSQL],[ MYSQL_INCLUDES="" MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_build_dir/include" MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/sql" + if test -d "$ac_mysql_source_dir/sql/auth"; then + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/sql/auth" + fi MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/include" if test -d "$ac_mysql_source_dir/extra/rapidjson"; then mysql_rapidjson_include_dir="$ac_mysql_source_dir/extra/rapidjson/include" MYSQL_INCLUDES="$MYSQL_INCLUDES -I$mysql_rapidjson_include_dir" fi - if test -d "$ac_mysql_source_dir/pcre"; then - mysql_regex_include_dir="$ac_mysql_source_dir/pcre" + if test -d "$ac_mysql_source_dir/extra/regex"; then + mysql_regex_include_dir="$ac_mysql_source_dir/extra/regex" + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$mysql_regex_include_dir" else - mysql_regex_include_dir="$ac_mysql_source_dir/regex" + if test -d "$ac_mysql_source_dir/pcre"; then + mysql_regex_include_dir="$ac_mysql_source_dir/pcre" + else + mysql_regex_include_dir="$ac_mysql_source_dir/regex" + fi + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$mysql_regex_include_dir" fi - MYSQL_INCLUDES="$MYSQL_INCLUDES -I$mysql_regex_include_dir" if test -d "$ac_mysql_source_dir/libbinlogevents"; then + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_build_dir/libbinlogevents/include" MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/libbinlogevents/export" MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/libbinlogevents/include" fi @@ -199,7 +209,7 @@ AC_DEFUN([CONFIG_OPTION_MYSQL],[ MYSQL_CXXFLAGS="-fno-implicit-templates -felide-constructors" case "$MYSQL_MAJOR_MINOR_VERSION" in - 5.7) + 5.7|8.*) : ;; *) @@ -381,6 +391,13 @@ AC_ARG_WITH(rsync-path, [RSYNC_PATH="packages@packages.groonga.org:public"]) AC_SUBST(RSYNC_PATH) +AC_ARG_WITH(launchpad-ppa, + [AS_HELP_STRING([--with-launchpad-ppa=PPA], + [specify Launchpad Personal Package Archive. [default=groonga-ppa]])], + [LAUNCHPAD_PPA="$withval"], + [LAUNCHPAD_PPA="groonga-ppa"]) +AC_SUBST(LAUNCHPAD_PPA) + AC_ARG_WITH(launchpad-uploader-pgp-key, [AS_HELP_STRING([--with-launchpad-uploader-pgp-key=KEY], [specify PGP key UID to upload Groonga packages to Launchpad.])], @@ -429,7 +446,7 @@ if test x"$enable_document" != x"no"; then AC_PATH_PROG(SPHINX_BUILD, sphinx-build, []) if test -n "$SPHINX_BUILD"; then sphinx_build_version=`"$SPHINX_BUILD" --version` - if ! echo "$sphinx_build_version" | grep -q ' 1\.[[23]]'; then + if ! echo "$sphinx_build_version" | grep -q ' 1\.[[2-6]]'; then AC_MSG_ERROR([ sphinx-build is old: $sphinx_build_version Sphinx 1.2 or later is required.]) @@ -509,12 +526,19 @@ AC_OUTPUT([ mrn_version.h mysql-test/mroonga/storage/information_schema/r/plugins.result mysql-test/mroonga/storage/variable/r/version.result - packages/debian/control + packages/debian-5.5/control + packages/debian-5.6/control + packages/debian-5.7/control + packages/debian-mariadb-10.0/control packages/apt/env.sh packages/rpm/centos/mysql55-mroonga.spec packages/rpm/centos/mysql56-community-mroonga.spec + packages/rpm/centos/mysql57-community-mroonga.spec packages/rpm/centos/mariadb-mroonga.spec + packages/rpm/centos/mariadb-10.1-mroonga.spec + packages/rpm/centos/mariadb-10.2-mroonga.spec packages/rpm/centos/percona-server-56-mroonga.spec + packages/rpm/centos/percona-server-57-mroonga.spec packages/yum/env.sh data/install.sql ]) diff --git a/storage/mroonga/data/install.sql.in b/storage/mroonga/data/install.sql.in index b0c930c81..d7d5f3c4a 100644 --- a/storage/mroonga/data/install.sql.in +++ b/storage/mroonga/data/install.sql.in @@ -17,3 +17,19 @@ CREATE FUNCTION mroonga_command RETURNS STRING DROP FUNCTION IF EXISTS mroonga_escape; CREATE FUNCTION mroonga_escape RETURNS STRING SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@'; + +DROP FUNCTION IF EXISTS mroonga_snippet_html; +CREATE FUNCTION mroonga_snippet_html RETURNS STRING + SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@'; + +DROP FUNCTION IF EXISTS mroonga_normalize; +CREATE FUNCTION mroonga_normalize RETURNS STRING + SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@'; + +DROP FUNCTION IF EXISTS mroonga_highlight_html; +CREATE FUNCTION mroonga_highlight_html RETURNS STRING + SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@'; + +DROP FUNCTION IF EXISTS mroonga_query_expand; +CREATE FUNCTION mroonga_query_expand RETURNS STRING + SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@'; diff --git a/storage/mroonga/data/uninstall.sql b/storage/mroonga/data/uninstall.sql index b79e6c03d..5713e0742 100644 --- a/storage/mroonga/data/uninstall.sql +++ b/storage/mroonga/data/uninstall.sql @@ -2,6 +2,10 @@ DROP FUNCTION IF EXISTS last_insert_grn_id; DROP FUNCTION IF EXISTS mroonga_snippet; DROP FUNCTION IF EXISTS mroonga_command; DROP FUNCTION IF EXISTS mroonga_escape; +DROP FUNCTION IF EXISTS mroonga_snippet_html; +DROP FUNCTION IF EXISTS mroonga_normalize; +DROP FUNCTION IF EXISTS mroonga_highlight_html; +DROP FUNCTION IF EXISTS mroonga_query_expand; UNINSTALL PLUGIN Mroonga; diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp index 597ec4690..96f506f9e 100644 --- a/storage/mroonga/ha_mroonga.cpp +++ b/storage/mroonga/ha_mroonga.cpp @@ -2,7 +2,7 @@ /* Copyright(C) 2010 Tetsuro IKEDA Copyright(C) 2010-2013 Kentoku SHIBA - Copyright(C) 2011-2015 Kouhei Sutou + Copyright(C) 2011-2017 Kouhei Sutou Copyright(C) 2013 Kenji Maruyama This library is free software; you can redistribute it and/or @@ -66,14 +66,9 @@ # include #endif -#define MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(type, variable_name, variable_size) \ - type *variable_name = \ - (type *)mrn_my_malloc(sizeof(type) * (variable_size), MYF(MY_WME)) -#define MRN_FREE_VARIABLE_LENGTH_ARRAYS(variable_name) \ - my_free(variable_name) - #include "mrn_err.h" #include "mrn_table.hpp" +#include #include "ha_mroonga.hpp" #include #include @@ -91,9 +86,17 @@ #include #include #include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include #ifdef MRN_SUPPORT_FOREIGN_KEYS # include @@ -143,10 +146,18 @@ static mysql_mutex_t *mrn_LOCK_open; # define MRN_NEED_M_LOCK_TYPE_CHECK_FOR_WRAPPER_EXTERNAL_LOCK #endif -#if MYSQL_VERSION_ID >= 50603 && !defined(MRN_MARIADB_P) -# define MRN_ORDER_IS_ASC(order) ((order)->direction == ORDER::ORDER_ASC) +#ifdef MRN_MARIADB_P +# if MYSQL_VERSION_ID >= 100200 +# define MRN_ORDER_IS_ASC(order) ((order)->direction == ORDER::ORDER_ASC) +# else +# define MRN_ORDER_IS_ASC(order) ((order)->asc) +# endif #else -# define MRN_ORDER_IS_ASC(order) ((order)->asc) +# if MYSQL_VERSION_ID >= 50603 +# define MRN_ORDER_IS_ASC(order) ((order)->direction == ORDER::ORDER_ASC) +# else +# define MRN_ORDER_IS_ASC(order) ((order)->asc) +# endif #endif #define MRN_STRINGIFY(macro_or_string) MRN_STRINGIFY_ARG(macro_or_string) @@ -199,22 +210,6 @@ static mysql_mutex_t *mrn_LOCK_open; calculate_key_len(table, key_index, buffer, keypart_map) #endif -#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) -# define MRN_SELECT_LEX_GET_WHERE_COND(select_lex) \ - ((select_lex)->where_cond()) -# define MRN_SELECT_LEX_GET_HAVING_COND(select_lex) \ - ((select_lex)->having_cond()) -# define MRN_SELECT_LEX_GET_ACTIVE_OPTIONS(select_lex) \ - ((select_lex)->active_options()) -#else -# define MRN_SELECT_LEX_GET_WHERE_COND(select_lex) \ - ((select_lex)->where) -# define MRN_SELECT_LEX_GET_HAVING_COND(select_lex) \ - ((select_lex)->having) -# define MRN_SELECT_LEX_GET_ACTIVE_OPTIONS(select_lex) \ - ((select_lex)->options) -#endif - #if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) # define MRN_TABLE_LIST_GET_DERIVED(table_list) NULL #else @@ -249,10 +244,6 @@ static const char *MRN_PLUGIN_AUTHOR = "The Mroonga project"; extern "C" { #endif -/* groonga's internal functions */ -int grn_atoi(const char *nptr, const char *end, const char **rest); -uint grn_atoui(const char *nptr, const char *end, const char **rest); - #ifdef HAVE_PSI_INTERFACE # ifdef WIN32 # ifdef MRN_TABLE_SHARE_HAVE_LOCK_SHARE @@ -266,18 +257,41 @@ static PSI_mutex_key mrn_allocated_thds_mutex_key; PSI_mutex_key mrn_share_mutex_key; PSI_mutex_key mrn_long_term_share_auto_inc_mutex_key; static PSI_mutex_key mrn_log_mutex_key; +static PSI_mutex_key mrn_query_log_mutex_key; static PSI_mutex_key mrn_db_manager_mutex_key; +static PSI_mutex_key mrn_context_pool_mutex_key; +static PSI_mutex_key mrn_operations_mutex_key; + +# if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +# define MRN_MUTEXT_INFO_ENTRY(key, name, flags, volatility) \ + {key, name, flags, volatility} +# else +# define MRN_MUTEXT_INFO_ENTRY(key, name, flags, volatility) \ + {key, name, flags} +# endif static PSI_mutex_info mrn_mutexes[] = { - {&mrn_open_tables_mutex_key, "open_tables", PSI_FLAG_GLOBAL}, - {&mrn_long_term_share_mutex_key, "long_term_share", PSI_FLAG_GLOBAL}, - {&mrn_allocated_thds_mutex_key, "allocated_thds", PSI_FLAG_GLOBAL}, - {&mrn_share_mutex_key, "share", 0}, - {&mrn_long_term_share_auto_inc_mutex_key, - "long_term_share::auto_inc", 0}, - {&mrn_log_mutex_key, "log", PSI_FLAG_GLOBAL}, - {&mrn_db_manager_mutex_key, "DatabaseManager", PSI_FLAG_GLOBAL} + MRN_MUTEXT_INFO_ENTRY(&mrn_open_tables_mutex_key, + "mrn::open_tables", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_long_term_share_mutex_key, + "mrn::long_term_share", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_allocated_thds_mutex_key, + "mrn::allocated_thds", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_share_mutex_key, + "mrn::share", 0, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_long_term_share_auto_inc_mutex_key, + "mrn::long_term_share::auto_inc", 0, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_log_mutex_key, + "mrn::log", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_query_log_mutex_key, + "mrn::query_log", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_db_manager_mutex_key, + "mrn::DatabaseManager", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_context_pool_mutex_key, + "mrn::ContextPool", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_operations_mutex_key, + "mrn::Operations", PSI_FLAG_GLOBAL, 0) }; #endif @@ -294,10 +308,14 @@ mysql_mutex_t mrn_allocated_thds_mutex; /* internal variables */ static grn_ctx mrn_ctx; static mysql_mutex_t mrn_log_mutex; +static mysql_mutex_t mrn_query_log_mutex; static grn_obj *mrn_db; static grn_ctx mrn_db_manager_ctx; static mysql_mutex_t mrn_db_manager_mutex; mrn::DatabaseManager *mrn_db_manager = NULL; +static mysql_mutex_t mrn_context_pool_mutex; +mrn::ContextPool *mrn_context_pool = NULL; +static mysql_mutex_t mrn_operations_mutex; #ifdef WIN32 @@ -539,6 +557,26 @@ static const char *mrn_inspect_extra_function(enum ha_extra_function operation) case HA_EXTRA_PREPARE_FOR_FORCED_CLOSE: inspected = "HA_EXTRA_PREPARE_FOR_FORCED_CLOSE"; break; +#endif +#ifdef MRN_HAVE_HA_EXTRA_SKIP_SERIALIZABLE_DD_VIEW + case HA_EXTRA_SKIP_SERIALIZABLE_DD_VIEW: + inspected = "HA_EXTRA_SKIP_SERIALIZABLE_DD_VIEW"; + break; +#endif +#ifdef MRN_HAVE_HA_EXTRA_BEGIN_ALTER_COPY + case HA_EXTRA_BEGIN_ALTER_COPY: + inspected = "HA_EXTRA_BEGIN_ALTER_COPY"; + break; +#endif +#ifdef MRN_HAVE_HA_EXTRA_END_ALTER_COPY + case HA_EXTRA_END_ALTER_COPY: + inspected = "HA_EXTRA_END_ALTER_COPY"; + break; +#endif +#ifdef MRN_HAVE_HA_EXTRA_NO_AUTOINC_LOCKING + case HA_EXTRA_NO_AUTOINC_LOCKING: + inspected = "HA_EXTRA_NO_AUTOINC_LOCKING"; + break; #endif } return inspected; @@ -576,6 +614,7 @@ static FILE *mrn_log_file = NULL; static bool mrn_log_file_opened = false; static grn_log_level mrn_log_level_default = GRN_LOG_DEFAULT_LEVEL; static ulong mrn_log_level = mrn_log_level_default; +static char *mrn_query_log_file_path = NULL; char *mrn_default_tokenizer = NULL; char *mrn_default_wrapper_engine = NULL; @@ -583,16 +622,10 @@ static int mrn_lock_timeout = grn_get_lock_timeout(); static char *mrn_libgroonga_version = const_cast(grn_get_version()); static char *mrn_version = const_cast(MRN_VERSION); static char *mrn_vector_column_delimiter = NULL; -static my_bool mrn_libgroonga_support_zlib = FALSE; -static my_bool mrn_libgroonga_support_lz4 = FALSE; -typedef enum { - MRN_BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT = (1 << 0), - MRN_BOOLEAN_MODE_SYNTAX_FLAG_SYNTAX_QUERY = (1 << 1), - MRN_BOOLEAN_MODE_SYNTAX_FLAG_SYNTAX_SCRIPT = (1 << 2), - MRN_BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_COLUMN = (1 << 3), - MRN_BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_UPDATE = (1 << 4), - MRN_BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_LEADING_NOT = (1 << 5) -} mrn_boolean_mode_syntax_flag; +static mrn_bool mrn_libgroonga_support_zlib = false; +static mrn_bool mrn_libgroonga_support_lz4 = false; +static mrn_bool mrn_libgroonga_support_zstd = false; +static mrn_bool mrn_enable_operations_recording = true; #ifdef MRN_SUPPORT_THDVAR_SET static const char *mrn_boolean_mode_sytnax_flag_names[] = { "DEFAULT", @@ -611,28 +644,13 @@ static TYPELIB mrn_boolean_mode_syntax_flags_typelib = { }; #endif #ifdef MRN_GROONGA_EMBEDDED -static my_bool mrn_libgroonga_embedded = TRUE; +static mrn_bool mrn_libgroonga_embedded = true; #else -static my_bool mrn_libgroonga_embedded = FALSE; +static mrn_bool mrn_libgroonga_embedded = false; #endif -typedef enum { - MRN_ACTION_ON_ERROR_ERROR, - MRN_ACTION_ON_ERROR_ERROR_AND_LOG, - MRN_ACTION_ON_ERROR_IGNORE, - MRN_ACTION_ON_ERROR_IGNORE_AND_LOG, -} mrn_action_on_error; - -static const char *mrn_action_on_error_names[] = { - "ERROR", - "ERROR_AND_LOG", - "IGNORE", - "IGNORE_AND_LOG", - NullS, -}; - -static mrn_action_on_error mrn_action_on_fulltext_query_error_default = - MRN_ACTION_ON_ERROR_ERROR_AND_LOG; +static mrn::variables::ActionOnError mrn_action_on_fulltext_query_error_default = + mrn::variables::ACTION_ON_ERROR_ERROR_AND_LOG; static void mrn_logger_log(grn_ctx *ctx, grn_log_level level, const char *timestamp, const char *title, @@ -749,20 +767,19 @@ static void mrn_log_file_update(THD *thd, struct st_mysql_sys_var *var, const char *new_value = *((const char **)save); char **old_value_ptr = (char **)var_ptr; - grn_ctx ctx; - grn_ctx_init(&ctx, 0); - mrn_change_encoding(&ctx, system_charset_info); + grn_ctx *ctx = &mrn_ctx; + mrn_change_encoding(ctx, system_charset_info); const char *new_log_file_name; new_log_file_name = *old_value_ptr; if (strcmp(*old_value_ptr, new_value) == 0) { - GRN_LOG(&ctx, GRN_LOG_NOTICE, + GRN_LOG(ctx, GRN_LOG_NOTICE, "log file isn't changed " "because the requested path isn't different: <%s>", new_value); } else { - GRN_LOG(&ctx, GRN_LOG_NOTICE, + GRN_LOG(ctx, GRN_LOG_NOTICE, "log file is changed: <%s> -> <%s>", *old_value_ptr, new_value); @@ -783,18 +800,18 @@ static void mrn_log_file_update(THD *thd, struct st_mysql_sys_var *var, } if (log_file_open_errno == 0) { - GRN_LOG(&ctx, GRN_LOG_NOTICE, + GRN_LOG(ctx, GRN_LOG_NOTICE, "log file is changed: <%s> -> <%s>", *old_value_ptr, new_value); new_log_file_name = new_value; } else { if (mrn_log_file) { - GRN_LOG(&ctx, GRN_LOG_ERROR, + GRN_LOG(ctx, GRN_LOG_ERROR, "log file isn't changed " "because the requested path can't be opened: <%s>: <%s>", new_value, strerror(log_file_open_errno)); } else { - GRN_LOG(&ctx, GRN_LOG_ERROR, + GRN_LOG(ctx, GRN_LOG_ERROR, "log file can't be opened: <%s>: <%s>", new_value, strerror(log_file_open_errno)); } @@ -809,8 +826,6 @@ static void mrn_log_file_update(THD *thd, struct st_mysql_sys_var *var, *old_value_ptr = mrn_my_strdup(new_log_file_name, MYF(MY_WME)); #endif - grn_ctx_fin(&ctx); - DBUG_VOID_RETURN; } @@ -821,23 +836,100 @@ static MYSQL_SYSVAR_STR(log_file, mrn_log_file_path, mrn_log_file_update, MRN_LOG_FILE_PATH); +static void mrn_query_log_file_update(THD *thd, struct st_mysql_sys_var *var, + void *var_ptr, const void *save) +{ + MRN_DBUG_ENTER_FUNCTION(); + const char *new_value = *((const char **)save); + char **old_value_ptr = (char **)var_ptr; + const char *normalized_new_value = NULL; + + grn_ctx *ctx = &mrn_ctx; + mrn_change_encoding(ctx, system_charset_info); + + const char *new_query_log_file_name; + new_query_log_file_name = *old_value_ptr; + + bool need_update = false; + if (!*old_value_ptr) { + if (new_value && new_value[0] != '\0') { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "query log is enabled: <%s>", + new_value); + need_update = true; + normalized_new_value = new_value; + } else { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "query log file is still disabled"); + } + } else { + if (!new_value || new_value[0] == '\0') { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "query log file is disabled: <%s>", + *old_value_ptr); + need_update = true; + normalized_new_value = NULL; + } else if (strcmp(*old_value_ptr, new_value) == 0) { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "query log file isn't changed " + "because the requested path isn't different: <%s>", + new_value); + } else { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "query log file is changed: <%s> -> <%s>", + *old_value_ptr, new_value); + need_update = true; + normalized_new_value = new_value; + } + } + + if (need_update) { + { // TODO: Remove me when Groonga 7.0.5 is released. + mrn::Lock lock(&mrn_query_log_mutex); + grn_default_query_logger_set_path(normalized_new_value); + } + grn_query_logger_reopen(ctx); + new_query_log_file_name = normalized_new_value; + } + +#ifdef MRN_NEED_FREE_STRING_MEMALLOC_PLUGIN_VAR + char *old_query_log_file_name = *old_value_ptr; +#endif + if (new_query_log_file_name) { + *old_value_ptr = mrn_my_strdup(new_query_log_file_name, MYF(0)); + } else { + *old_value_ptr = NULL; + } +#ifdef MRN_NEED_FREE_STRING_MEMALLOC_PLUGIN_VAR + my_free(old_query_log_file_name); +#endif + + DBUG_VOID_RETURN; +} + +static MYSQL_SYSVAR_STR(query_log_file, mrn_query_log_file_path, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC, + "query log file for " MRN_PLUGIN_NAME_STRING, + NULL, + mrn_query_log_file_update, + NULL); + static void mrn_default_tokenizer_update(THD *thd, struct st_mysql_sys_var *var, void *var_ptr, const void *save) { MRN_DBUG_ENTER_FUNCTION(); const char *new_value = *((const char **)save); char **old_value_ptr = (char **)var_ptr; - grn_ctx ctx; + grn_ctx *ctx = &mrn_ctx; - grn_ctx_init(&ctx, 0); - mrn_change_encoding(&ctx, system_charset_info); + mrn_change_encoding(ctx, system_charset_info); if (strcmp(*old_value_ptr, new_value) == 0) { - GRN_LOG(&ctx, GRN_LOG_NOTICE, + GRN_LOG(ctx, GRN_LOG_NOTICE, "default tokenizer for fulltext index isn't changed " "because the requested default tokenizer isn't different: <%s>", new_value); } else { - GRN_LOG(&ctx, GRN_LOG_NOTICE, + GRN_LOG(ctx, GRN_LOG_NOTICE, "default tokenizer for fulltext index is changed: <%s> -> <%s>", *old_value_ptr, new_value); } @@ -849,8 +941,6 @@ static void mrn_default_tokenizer_update(THD *thd, struct st_mysql_sys_var *var, *old_value_ptr = (char *)new_value; #endif - grn_ctx_fin(&ctx); - DBUG_VOID_RETURN; } @@ -956,6 +1046,14 @@ static MYSQL_SYSVAR_STR(default_wrapper_engine, mrn_default_wrapper_engine, NULL, NULL); +static const char *mrn_action_on_error_names[] = { + "ERROR", + "ERROR_AND_LOG", + "IGNORE", + "IGNORE_AND_LOG", + NullS, +}; + static TYPELIB mrn_action_on_error_typelib = { array_elements(mrn_action_on_error_names) - 1, @@ -1010,7 +1108,7 @@ static MYSQL_SYSVAR_STR(version, mrn_version, NULL, MRN_VERSION); -static my_bool grn_check_zlib_support() +static mrn_bool grn_check_zlib_support() { bool is_zlib_support = false; grn_obj grn_support_p; @@ -1023,7 +1121,14 @@ static my_bool grn_check_zlib_support() return is_zlib_support; } -static my_bool grn_check_lz4_support() +static MYSQL_SYSVAR_BOOL(libgroonga_support_zlib, mrn_libgroonga_support_zlib, + PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, + "The status of libgroonga supports zlib", + NULL, + NULL, + grn_check_zlib_support()); + +static mrn_bool grn_check_lz4_support() { bool is_lz4_support = false; grn_obj grn_support_p; @@ -1036,19 +1141,51 @@ static my_bool grn_check_lz4_support() return is_lz4_support; } -static MYSQL_SYSVAR_BOOL(libgroonga_support_zlib, mrn_libgroonga_support_zlib, +static MYSQL_SYSVAR_BOOL(libgroonga_support_lz4, mrn_libgroonga_support_lz4, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, - "The status of libgroonga supports zlib", + "The status of libgroonga supports LZ4", NULL, NULL, - grn_check_zlib_support()); + grn_check_lz4_support()); -static MYSQL_SYSVAR_BOOL(libgroonga_support_lz4, mrn_libgroonga_support_lz4, +static mrn_bool grn_check_zstd_support() +{ + bool is_zstd_support = false; + grn_obj grn_support_p; + + GRN_BOOL_INIT(&grn_support_p, 0); + grn_obj_get_info(&mrn_ctx, NULL, GRN_INFO_SUPPORT_ZSTD, &grn_support_p); + is_zstd_support = (GRN_BOOL_VALUE(&grn_support_p)); + grn_obj_unlink(&mrn_ctx, &grn_support_p); + + return is_zstd_support; +} + +static MYSQL_SYSVAR_BOOL(libgroonga_support_zstd, mrn_libgroonga_support_zstd, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, - "The status of libgroonga supports LZ4", + "The status of libgroonga supports Zstandard", NULL, NULL, - grn_check_lz4_support()); + grn_check_zstd_support()); + +static void mrn_enable_operations_recording_update(THD *thd, struct st_mysql_sys_var *var, + void *var_ptr, const void *save) +{ + MRN_DBUG_ENTER_FUNCTION(); + const bool new_value = *static_cast(save); + bool *old_value_ptr = static_cast(var_ptr); + + *old_value_ptr = new_value; + + DBUG_VOID_RETURN; +} + +static MYSQL_SYSVAR_BOOL(enable_operations_recording, mrn_enable_operations_recording, + PLUGIN_VAR_RQCMDARG, + "Whether recording operations for recovery is enabled or not", + NULL, + mrn_enable_operations_recording_update, + true); #ifdef MRN_SUPPORT_THDVAR_SET static MYSQL_THDVAR_SET(boolean_mode_syntax_flags, @@ -1060,7 +1197,7 @@ static MYSQL_THDVAR_SET(boolean_mode_syntax_flags, "ALLOW_COLUMN, ALLOW_UPDATE and ALLOW_LEADING_NOT", NULL, NULL, - MRN_BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT, + mrn::variables::BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT, &mrn_boolean_mode_syntax_flags_typelib); #endif @@ -1102,11 +1239,14 @@ static struct st_mysql_sys_var *mrn_system_variables[] = MYSQL_SYSVAR(vector_column_delimiter), MYSQL_SYSVAR(libgroonga_support_zlib), MYSQL_SYSVAR(libgroonga_support_lz4), + MYSQL_SYSVAR(libgroonga_support_zstd), #ifdef MRN_SUPPORT_THDVAR_SET MYSQL_SYSVAR(boolean_mode_syntax_flags), #endif MYSQL_SYSVAR(max_n_records_for_estimate), MYSQL_SYSVAR(libgroonga_embedded), + MYSQL_SYSVAR(query_log_file), + MYSQL_SYSVAR(enable_operations_recording), NULL }; @@ -1188,6 +1328,9 @@ struct st_mysql_plugin i_s_mrn_stats = "Statistics for " MRN_PLUGIN_NAME_STRING, PLUGIN_LICENSE_GPL, i_s_mrn_stats_init, +#ifdef MRN_ST_MYSQL_PLUGIN_HAVE_CHECK_UNINSTALL + NULL, +#endif i_s_mrn_stats_deinit, MRN_VERSION_IN_HEX, NULL, @@ -1196,7 +1339,12 @@ struct st_mysql_plugin i_s_mrn_stats = }; /* End of mroonga information schema implementations */ -static handler *mrn_handler_create(handlerton *hton, TABLE_SHARE *share, MEM_ROOT *root) +static handler *mrn_handler_create(handlerton *hton, + TABLE_SHARE *share, +#ifdef MRN_HANDLERTON_CREATE_HAVE_PARTITIONED + bool partitioned, +#endif + MEM_ROOT *root) { MRN_DBUG_ENTER_FUNCTION(); handler *new_handler = new (root) ha_mroonga(hton, share); @@ -1407,6 +1555,11 @@ static grn_builtin_type mrn_grn_type_from_field(grn_ctx *ctx, Field *field, case MYSQL_TYPE_GEOMETRY: // case-by-case type = GRN_DB_WGS84_GEO_POINT; // 8bytes break; +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + case MYSQL_TYPE_JSON: + type = GRN_DB_TEXT; + break; +#endif } return type; } @@ -1457,6 +1610,17 @@ static bool mrn_parse_grn_column_create_flags(THD *thd, "COMPRESS_LZ4"); } flag_names += 12; + } else if (rest_length >= 13 && !memcmp(flag_names, "COMPRESS_ZSTD", 13)) { + if (mrn_libgroonga_support_zstd) { + *column_flags |= GRN_OBJ_COMPRESS_ZSTD; + found = true; + } else { + push_warning_printf(thd, MRN_SEVERITY_WARNING, + ER_MRN_UNSUPPORTED_COLUMN_FLAG_NUM, + ER_MRN_UNSUPPORTED_COLUMN_FLAG_STR, + "COMPRESS_ZSTD"); + } + flag_names += 13; } else { char invalid_flag_name[MRN_MESSAGE_BUFFER_SIZE]; snprintf(invalid_flag_name, MRN_MESSAGE_BUFFER_SIZE, @@ -1477,7 +1641,7 @@ static bool mrn_parse_grn_index_column_flags(THD *thd, grn_ctx *ctx, const char *flag_names, uint flag_names_length, - grn_obj_flags *index_column_flags) + grn_column_flags *index_column_flags) { const char *flag_names_end = flag_names + flag_names_length; bool found = false; @@ -1504,6 +1668,14 @@ static bool mrn_parse_grn_index_column_flags(THD *thd, *index_column_flags |= GRN_OBJ_WITH_WEIGHT; flag_names += 11; found = true; + } else if (rest_length >= 11 && !memcmp(flag_names, "INDEX_SMALL", 11)) { + *index_column_flags |= GRN_OBJ_INDEX_SMALL; + flag_names += 11; + found = true; + } else if (rest_length >= 12 && !memcmp(flag_names, "INDEX_MEDIUM", 12)) { + *index_column_flags |= GRN_OBJ_INDEX_MEDIUM; + flag_names += 12; + found = true; } else { char invalid_flag_name[MRN_MESSAGE_BUFFER_SIZE]; snprintf(invalid_flag_name, MRN_MESSAGE_BUFFER_SIZE, @@ -1615,8 +1787,7 @@ static int mrn_init(void *p) { // init handlerton grn_ctx *ctx = NULL; - handlerton *hton; - hton = (handlerton *)p; + handlerton *hton = static_cast(p); hton->state = SHOW_OPTION_YES; hton->create = mrn_handler_create; hton->flags = HTON_NO_FLAGS; @@ -1671,7 +1842,7 @@ static int mrn_init(void *p) # endif #endif -#ifdef HAVE_PSI_INTERFACE +#ifdef MRN_HAVE_PSI_SERVER if (PSI_server) { const char *category = "mroonga"; int n_mutexes = array_elements(mrn_mutexes); @@ -1679,6 +1850,8 @@ static int mrn_init(void *p) } #endif + grn_default_query_logger_set_path(mrn_query_log_file_path); + if (grn_init() != GRN_SUCCESS) { goto err_grn_init; } @@ -1705,6 +1878,11 @@ static int mrn_init(void *p) MY_MUTEX_INIT_FAST) != 0) { goto err_log_mutex_init; } + if (mysql_mutex_init(mrn_query_log_mutex_key, + &mrn_query_log_mutex, + MY_MUTEX_INIT_FAST) != 0) { + goto err_query_log_mutex_init; + } mrn_logger.max_level = static_cast(mrn_log_level); grn_logger_set(ctx, &mrn_logger); @@ -1737,13 +1915,31 @@ static int mrn_init(void *p) if (!mrn_db_manager->init()) { goto err_db_manager_init; } + + if (mysql_mutex_init(mrn_context_pool_mutex_key, + &mrn_context_pool_mutex, + MY_MUTEX_INIT_FAST) != 0) { + GRN_LOG(ctx, GRN_LOG_ERROR, + "failed to initialize mutex for context pool"); + goto error_context_pool_mutex_init; + } + mrn_context_pool = new mrn::ContextPool(&mrn_context_pool_mutex); + + if (mysql_mutex_init(mrn_operations_mutex_key, + &mrn_operations_mutex, + MY_MUTEX_INIT_FAST) != 0) { + GRN_LOG(ctx, GRN_LOG_ERROR, + "failed to initialize mutex for operations"); + goto error_operations_mutex_init; + } + if ((mysql_mutex_init(mrn_allocated_thds_mutex_key, &mrn_allocated_thds_mutex, MY_MUTEX_INIT_FAST) != 0)) { goto err_allocated_thds_mutex_init; } - if (my_hash_init(&mrn_allocated_thds, system_charset_info, 32, 0, 0, - mrn_allocated_thds_get_key, 0, 0)) { + if (mrn_my_hash_init(&mrn_allocated_thds, system_charset_info, 32, 0, 0, + mrn_allocated_thds_get_key, 0, 0)) { goto error_allocated_thds_hash_init; } if ((mysql_mutex_init(mrn_open_tables_mutex_key, @@ -1751,8 +1947,8 @@ static int mrn_init(void *p) MY_MUTEX_INIT_FAST) != 0)) { goto err_allocated_open_tables_mutex_init; } - if (my_hash_init(&mrn_open_tables, system_charset_info, 32, 0, 0, - mrn_open_tables_get_key, 0, 0)) { + if (mrn_my_hash_init(&mrn_open_tables, system_charset_info, 32, 0, 0, + mrn_open_tables_get_key, 0, 0)) { goto error_allocated_open_tables_hash_init; } if ((mysql_mutex_init(mrn_long_term_share_mutex_key, @@ -1760,8 +1956,8 @@ static int mrn_init(void *p) MY_MUTEX_INIT_FAST) != 0)) { goto error_allocated_long_term_share_mutex_init; } - if (my_hash_init(&mrn_long_term_share, system_charset_info, 32, 0, 0, - mrn_long_term_share_get_key, 0, 0)) { + if (mrn_my_hash_init(&mrn_long_term_share, system_charset_info, 32, 0, 0, + mrn_long_term_share_get_key, 0, 0)) { goto error_allocated_long_term_share_hash_init; } @@ -1782,6 +1978,11 @@ static int mrn_init(void *p) error_allocated_thds_hash_init: mysql_mutex_destroy(&mrn_allocated_thds_mutex); err_allocated_thds_mutex_init: + mysql_mutex_destroy(&mrn_operations_mutex); +error_operations_mutex_init: + delete mrn_context_pool; + mysql_mutex_destroy(&mrn_context_pool_mutex); +error_context_pool_mutex_init: err_db_manager_init: delete mrn_db_manager; mysql_mutex_destroy(&mrn_db_manager_mutex); @@ -1794,6 +1995,8 @@ static int mrn_init(void *p) mrn_log_file_opened = false; } err_log_file_open: + mysql_mutex_destroy(&mrn_query_log_mutex); +err_query_log_mutex_init: mysql_mutex_destroy(&mrn_log_mutex); err_log_mutex_init: err_mrn_change_encoding: @@ -1838,6 +2041,9 @@ static int mrn_deinit(void *p) mysql_mutex_destroy(&mrn_open_tables_mutex); my_hash_free(&mrn_allocated_thds); mysql_mutex_destroy(&mrn_allocated_thds_mutex); + mysql_mutex_destroy(&mrn_operations_mutex); + delete mrn_context_pool; + mysql_mutex_destroy(&mrn_context_pool_mutex); delete mrn_db_manager; mysql_mutex_destroy(&mrn_db_manager_mutex); grn_ctx_fin(&mrn_db_manager_ctx); @@ -1850,6 +2056,7 @@ static int mrn_deinit(void *p) fclose(mrn_log_file); mrn_log_file_opened = false; } + mysql_mutex_destroy(&mrn_query_log_mutex); mysql_mutex_destroy(&mrn_log_mutex); return 0; @@ -2336,7 +2543,8 @@ ha_mroonga::ha_mroonga(handlerton *hton, TABLE_SHARE *share_arg) ignoring_no_key_columns(false), replacing_(false), written_by_row_based_binlog(0), - current_ft_item(NULL) + current_ft_item(NULL), + operations_(NULL) { MRN_DBUG_ENTER_METHOD(); grn_ctx_init(ctx, 0); @@ -2355,6 +2563,9 @@ ha_mroonga::ha_mroonga(handlerton *hton, TABLE_SHARE *share_arg) ha_mroonga::~ha_mroonga() { MRN_DBUG_ENTER_METHOD(); + + delete operations_; + if (analyzed_for_create) { if (wrap_handler_for_create) { delete wrap_handler_for_create; @@ -2619,6 +2830,12 @@ ulonglong ha_mroonga::wrapper_table_flags() const #endif #ifdef HA_CAN_FULLTEXT_EXT table_flags |= HA_CAN_FULLTEXT_EXT; +#endif +#ifdef HA_GENERATED_COLUMNS + table_flags |= HA_GENERATED_COLUMNS; +#endif +#ifdef HA_CAN_VIRTUAL_COLUMNS + table_flags |= HA_CAN_VIRTUAL_COLUMNS; #endif DBUG_RETURN(table_flags); } @@ -2648,6 +2865,12 @@ ulonglong ha_mroonga::storage_table_flags() const #endif #ifdef HA_CAN_FULLTEXT_EXT flags |= HA_CAN_FULLTEXT_EXT; +#endif +#ifdef HA_GENERATED_COLUMNS + flags |= HA_GENERATED_COLUMNS; +#endif +#ifdef HA_CAN_VIRTUAL_COLUMNS + flags |= HA_CAN_VIRTUAL_COLUMNS; #endif DBUG_RETURN(flags); } @@ -2713,7 +2936,7 @@ ulong ha_mroonga::storage_index_flags(uint idx, uint part, bool all_parts) const part = 0; } Field *field = &(key->key_part[part].field[0]); - if (field && should_normalize(field)) { + if (field && (have_custom_normalizer(key) || should_normalize(field))) { need_normalize_p = true; } if (!need_normalize_p) { @@ -2737,7 +2960,7 @@ ulong ha_mroonga::index_flags(uint idx, uint part, bool all_parts) const DBUG_RETURN(HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR); } if (mrn_is_geo_key(key)) { - DBUG_RETURN(HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR); + DBUG_RETURN(HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR | HA_READ_RANGE); } int error = 0; @@ -2854,9 +3077,11 @@ int ha_mroonga::wrapper_create(const char *name, TABLE *table, DBUG_RETURN(ER_REQUIRES_PRIMARY_KEY); } - mrn::PathMapper mapper(name); - error = wrapper_create_index(name, table, info, tmp_share, - mapper.table_name()); + error = ensure_database_open(name); + if (error) + DBUG_RETURN(error); + + error = wrapper_create_index(name, table, tmp_share); if (error) DBUG_RETURN(error); @@ -2904,6 +3129,7 @@ int ha_mroonga::wrapper_create(const char *name, TABLE *table, delete hnd; if (error) { + mrn::PathMapper mapper(name); generic_delete_table(name, mapper.table_name()); } @@ -2967,7 +3193,7 @@ int ha_mroonga::wrapper_create_index_fulltext(const char *grn_table_name, GRN_OBJ_PERSISTENT; grn_obj *index_table; - grn_obj_flags index_column_flags = GRN_OBJ_COLUMN_INDEX | GRN_OBJ_PERSISTENT; + grn_column_flags index_column_flags = GRN_OBJ_COLUMN_INDEX | GRN_OBJ_PERSISTENT; if (!find_index_column_flags(key_info, &index_column_flags)) { index_column_flags |= GRN_OBJ_WITH_POSITION; @@ -3014,7 +3240,8 @@ int ha_mroonga::wrapper_create_index_fulltext(const char *grn_table_name, grn_obj_unlink(ctx, &token_filters); } - if (should_normalize(&key_info->key_part->field[0])) { + if (have_custom_normalizer(key_info) || + should_normalize(&key_info->key_part->field[0])) { grn_info_type info_type = GRN_INFO_NORMALIZER; grn_obj *normalizer = find_normalizer(key_info); if (normalizer) { @@ -3103,22 +3330,18 @@ int ha_mroonga::wrapper_create_index_geo(const char *grn_table_name, } int ha_mroonga::wrapper_create_index(const char *name, TABLE *table, - HA_CREATE_INFO *info, - MRN_SHARE *tmp_share, - const char *grn_table_name) + MRN_SHARE *tmp_share) { MRN_DBUG_ENTER_METHOD(); int error = 0; - error = ensure_database_open(name); - if (error) - DBUG_RETURN(error); - error = mrn_change_encoding(ctx, system_charset_info); if (error) DBUG_RETURN(error); grn_obj *grn_index_table; + mrn::PathMapper mapper(name); + const char *grn_table_name = mapper.table_name(); char *grn_table_path = NULL; // we don't specify path grn_obj *pkey_type = grn_ctx_at(ctx, GRN_DB_SHORT_TEXT); grn_obj *pkey_value_type = NULL; // we don't use this @@ -3307,10 +3530,9 @@ int ha_mroonga::storage_create(const char *name, TABLE *table, uint n_columns = table->s->fields; for (uint i = 0; i < n_columns; i++) { Field *field = table->s->field[i]; - const char *column_name = field->field_name; - int column_name_size = strlen(column_name); + mrn::ColumnName column_name(field->field_name); - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (strcmp(MRN_COLUMN_NAME_ID, column_name.mysql_name()) == 0) { continue; } @@ -3325,6 +3547,12 @@ int ha_mroonga::storage_create(const char *name, TABLE *table, } #endif +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif + grn_obj_flags col_flags = GRN_OBJ_PERSISTENT; if (!find_column_flags(field, tmp_share, i, &col_flags)) { col_flags |= GRN_OBJ_COLUMN_SCALAR; @@ -3341,12 +3569,13 @@ int ha_mroonga::storage_create(const char *name, TABLE *table, } char *col_path = NULL; // we don't specify path - grn_column_create(ctx, table_obj, column_name, column_name_size, + grn_column_create(ctx, table_obj, + column_name.c_str(), column_name.length(), col_path, col_flags, col_type); if (ctx->rc) { - grn_obj_remove(ctx, table_obj); error = ER_CANT_CREATE_TABLE; my_message(error, ctx->errbuf, MYF(0)); + grn_obj_remove(ctx, table_obj); DBUG_RETURN(error); } } @@ -3484,7 +3713,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, if (!grn_table_ref) { error = ER_CANT_CREATE_TABLE; char err_msg[MRN_BUFFER_SIZE]; - sprintf(err_msg, "refference table [%s.%s] is not mroonga table", + sprintf(err_msg, "reference table [%s.%s] is not mroonga table", table->s->db.str, ref_table_name.str); my_message(error, err_msg, MYF(0)); DBUG_RETURN(false); @@ -3503,7 +3732,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, grn_obj_unlink(ctx, grn_table_ref); error = ER_CANT_CREATE_TABLE; char err_msg[MRN_BUFFER_SIZE]; - sprintf(err_msg, "refference table [%s.%s] is not found", + sprintf(err_msg, "reference table [%s.%s] is not found", table->s->db.str, ref_table_name.str); my_message(error, err_msg, MYF(0)); DBUG_RETURN(false); @@ -3516,7 +3745,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, grn_obj_unlink(ctx, grn_table_ref); error = ER_CANT_CREATE_TABLE; char err_msg[MRN_BUFFER_SIZE]; - sprintf(err_msg, "refference table [%s.%s] has no primary key", + sprintf(err_msg, "reference table [%s.%s] has no primary key", table->s->db.str, ref_table_name.str); my_message(error, err_msg, MYF(0)); DBUG_RETURN(false); @@ -3531,7 +3760,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, error = ER_CANT_CREATE_TABLE; char err_msg[MRN_BUFFER_SIZE]; sprintf(err_msg, - "refference table [%s.%s] primary key is multiple column", + "reference table [%s.%s] primary key is multiple column", table->s->db.str, ref_table_name.str); my_message(error, err_msg, MYF(0)); DBUG_RETURN(false); @@ -3545,7 +3774,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, error = ER_CANT_CREATE_TABLE; char err_msg[MRN_BUFFER_SIZE]; sprintf(err_msg, - "refference column [%s.%s.%s] is not used for primary key", + "reference column [%s.%s.%s] is not used for primary key", table->s->db.str, ref_table_name.str, ref_field_name.str); my_message(error, err_msg, MYF(0)); DBUG_RETURN(false); @@ -3721,11 +3950,14 @@ int ha_mroonga::storage_create_index_table(TABLE *table, grn_obj *normalizer = NULL; Field *field = &(key_info->key_part->field[0]); if (key_info->flags & HA_FULLTEXT) { - if (should_normalize(field)) { + if (have_custom_normalizer(key_info) || + should_normalize(field)) { normalizer = find_normalizer(key_info); } } else if (key_alg != HA_KEY_ALG_HASH) { - if (!is_multiple_column_index && should_normalize(field)) { + if (!is_multiple_column_index && + (have_custom_normalizer(key_info) || + should_normalize(field))) { normalizer = find_normalizer(key_info); } } @@ -3748,19 +3980,48 @@ int ha_mroonga::storage_create_index(TABLE *table, const char *grn_table_name, { MRN_DBUG_ENTER_METHOD(); int error = 0; - grn_obj *index_table, *index_column; - const char *column_name = NULL; - int column_name_size = 0; + grn_obj *index_column; bool is_multiple_column_index = KEY_N_KEY_PARTS(key_info) > 1; if (!is_multiple_column_index) { Field *field = key_info->key_part[0].field; - column_name = field->field_name; - column_name_size = strlen(column_name); - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (strcmp(MRN_COLUMN_NAME_ID, field->field_name) == 0) { // skipping _id virtual column DBUG_RETURN(0); } + + if (is_foreign_key_field(table->s->table_name.str, + field->field_name)) { + DBUG_RETURN(0); + } + +#ifdef HA_CAN_VIRTUAL_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: storage: failed to create index: " + ER_MRN_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN_STR, + field->field_name); + error = ER_MRN_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN_NUM; + my_message(error, error_message, MYF(0)); + DBUG_RETURN(error); + } + } else { + int j, n_key_parts = KEY_N_KEY_PARTS(key_info); + for (j = 0; j < n_key_parts; j++) { + Field *field = key_info->key_part[j].field; + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: storage: failed to create index: " + ER_MRN_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN_STR, + field->field_name); + error = ER_MRN_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN_NUM; + my_message(error, error_message, MYF(0)); + DBUG_RETURN(error); + } + } +#endif } error = mrn_change_encoding(ctx, system_charset_info); @@ -3773,16 +4034,21 @@ int ha_mroonga::storage_create_index(TABLE *table, const char *grn_table_name, if (error) DBUG_RETURN(error); - grn_obj_flags index_column_flags = GRN_OBJ_COLUMN_INDEX | GRN_OBJ_PERSISTENT; + grn_obj *index_table = index_tables[i]; + + grn_column_flags index_column_flags = GRN_OBJ_COLUMN_INDEX | GRN_OBJ_PERSISTENT; if (!find_index_column_flags(key_info, &index_column_flags)) { - index_column_flags |= GRN_OBJ_WITH_POSITION; - if (is_multiple_column_index) { + grn_obj *tokenizer = grn_obj_get_info(ctx, index_table, + GRN_INFO_DEFAULT_TOKENIZER, NULL); + if (tokenizer) { + index_column_flags |= GRN_OBJ_WITH_POSITION; + } + if (is_multiple_column_index && (key_info->flags & HA_FULLTEXT)) { index_column_flags |= GRN_OBJ_WITH_SECTION; } } - index_table = index_tables[i]; const char *index_column_name; if (tmp_share->index_table && tmp_share->index_table[i]) { index_column_name = key_info->name; @@ -3813,10 +4079,11 @@ int ha_mroonga::storage_create_index(TABLE *table, const char *grn_table_name, int j, n_key_parts = KEY_N_KEY_PARTS(key_info); for (j = 0; j < n_key_parts; j++) { Field *field = key_info->key_part[j].field; - const char *column_name = field->field_name; - int column_name_size = strlen(column_name); - grn_obj *source_column = grn_obj_column(ctx, grn_table, - column_name, column_name_size); + mrn::ColumnName column_name(field->field_name); + grn_obj *source_column = grn_obj_column(ctx, + grn_table, + column_name.c_str(), + column_name.length()); grn_id source_id = grn_obj_id(ctx, source_column); GRN_UINT32_PUT(ctx, &source_ids, source_id); grn_obj_unlink(ctx, source_column); @@ -3826,8 +4093,13 @@ int ha_mroonga::storage_create_index(TABLE *table, const char *grn_table_name, grn_obj_unlink(ctx, &source_ids); } } else { + Field *field = key_info->key_part[0].field; + mrn::ColumnName column_name(field->field_name); grn_obj *column; - column = grn_obj_column(ctx, grn_table, column_name, column_name_size); + column = grn_obj_column(ctx, + grn_table, + column_name.c_str(), + column_name.length()); if (column) { grn_obj source_ids; grn_id source_id = grn_obj_id(ctx, column); @@ -3887,18 +4159,31 @@ int ha_mroonga::storage_create_indexes(TABLE *table, const char *grn_table_name, DBUG_RETURN(error); } -int ha_mroonga::ensure_database_open(const char *name) +int ha_mroonga::ensure_database_open(const char *name, mrn::Database **db) { int error; MRN_DBUG_ENTER_METHOD(); - grn_obj *db; - error = mrn_db_manager->open(name, &db); + if (db) + *db = NULL; + + mrn::Database *local_db; + error = mrn_db_manager->open(name, &local_db); if (error) DBUG_RETURN(error); - grn_ctx_use(ctx, db); + if (db) + *db = local_db; + grn_ctx_use(ctx, local_db->get()); + + delete operations_; + operations_ = new mrn::Operations(ctx); + if (mrn_enable_operations_recording) { + operations_->enable_recording(); + } else { + operations_->disable_recording(); + } DBUG_RETURN(error); } @@ -3913,6 +4198,9 @@ int ha_mroonga::ensure_database_remove(const char *name) if (error) DBUG_RETURN(error); + delete operations_; + operations_ = NULL; + mrn_db_manager->close(name); mrn::PathMapper mapper(name); @@ -3922,7 +4210,14 @@ int ha_mroonga::ensure_database_remove(const char *name) } -int ha_mroonga::create(const char *name, TABLE *table, HA_CREATE_INFO *info) +int ha_mroonga::create(const char *name, + TABLE *table, + HA_CREATE_INFO *info +#ifdef MRN_HANDLER_CREATE_HAVE_TABLE_DEFINITION + , + dd::Table *table_def +#endif + ) { int error = 0; MRN_SHARE *tmp_share; @@ -3954,26 +4249,17 @@ int ha_mroonga::create(const char *name, TABLE *table, HA_CREATE_INFO *info) DBUG_RETURN(error); } -int ha_mroonga::wrapper_open(const char *name, int mode, uint test_if_locked) +int ha_mroonga::wrapper_open(const char *name, int mode, uint open_options) { int error = 0; MRN_DBUG_ENTER_METHOD(); - if (thd_sql_command(ha_thd()) == SQLCOM_REPAIR) { - error = ensure_database_remove(name); - if (error) - DBUG_RETURN(error); - error = ensure_database_open(name); - if (error) - DBUG_RETURN(error); - grn_table = NULL; - grn_index_tables = NULL; - grn_index_columns = NULL; - } else { - error = ensure_database_open(name); - if (error) - DBUG_RETURN(error); + mrn::Database *db = NULL; + error = ensure_database_open(name, &db); + if (error) + DBUG_RETURN(error); + if (!(open_options & HA_OPEN_FOR_REPAIR)) { error = open_table(name); if (error) DBUG_RETURN(error); @@ -4012,7 +4298,7 @@ int ha_mroonga::wrapper_open(const char *name, int mode, uint test_if_locked) #ifdef MRN_HANDLER_HAVE_SET_HA_SHARE_REF wrap_handler->set_ha_share_ref(&table->s->ha_share); #endif - error = wrap_handler->ha_open(table, name, mode, test_if_locked); + error = wrap_handler->ha_open(table, name, mode, open_options); } else { if (!(wrap_handler = parent_for_clone->wrap_handler->clone(name, mem_root_for_clone))) @@ -4039,6 +4325,39 @@ int ha_mroonga::wrapper_open(const char *name, int mode, uint test_if_locked) pk_keypart_map = make_prev_keypart_map( KEY_N_KEY_PARTS(&(table->key_info[table_share->primary_key]))); + if (!error) { + if (open_options & HA_OPEN_FOR_REPAIR) { + // TODO: How to check whether is DISABLE KEYS used or not? + error = wrapper_recreate_indexes(ha_thd()); + } else if (db) { + mrn::Lock lock(&mrn_operations_mutex); + mrn::PathMapper mapper(name); + const char *table_name = mapper.table_name(); + size_t table_name_size = strlen(table_name); + if (db->is_broken_table(table_name, table_name_size)) { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "Auto repair is started: <%s>", + name); + error = operations_->clear(table_name, table_name_size); + if (!error) { + db->mark_table_repaired(table_name, table_name_size); + if (!share->disable_keys) { + // TODO: implemented by "reindex" instead of "remove and recreate". + // Because "remove and recreate" invalidates opened indexes by + // other threads. + error = wrapper_disable_indexes_mroonga(HA_KEY_SWITCH_ALL); + if (!error) { + error = wrapper_enable_indexes_mroonga(HA_KEY_SWITCH_ALL); + } + } + } + GRN_LOG(ctx, GRN_LOG_NOTICE, + "Auto repair is done: <%s>: %s", + name, error == 0 ? "success" : "failure"); + } + } + } + if (error) { grn_obj_unlink(ctx, grn_table); @@ -4098,6 +4417,11 @@ int ha_mroonga::wrapper_open_indexes(const char *name) grn_index_tables[i] = grn_ctx_get(ctx, index_table_name.c_str(), index_table_name.length()); + if (ctx->rc == GRN_SUCCESS && !grn_index_tables[i]) { + grn_index_tables[i] = grn_ctx_get(ctx, + index_table_name.old_c_str(), + index_table_name.old_length()); + } if (ctx->rc) { DBUG_PRINT("info", ("mroonga: sql_command=%u", thd_sql_command(ha_thd()))); @@ -4160,8 +4484,16 @@ void ha_mroonga::wrapper_overwrite_index_bits() { Field *field = table_share->field[i]; field->part_of_key.clear_all(); +#ifdef MRN_HAVE_MYSQL_FIELD_PART_OF_KEY_NOT_CLUSTERED field->part_of_key_not_clustered.clear_all(); +#endif field->part_of_sortkey.clear_all(); + /* + TODO: We may need to update field->part_of_key_not_extended for + MySQL >= 5.7.18. If users report "raw InnoDB can use index for + this case but Mroonga wrapper mode for InnoDB can't use index + for the same case", we'll reconsider it again. + */ } for (i = 0; i < table_share->keys; i++) { KEY *key_info = &table->s->key_info[i]; @@ -4176,7 +4508,9 @@ void ha_mroonga::wrapper_overwrite_index_bits() { table_share->keys_for_keyread.set_bit(i); field->part_of_key.set_bit(i); +#ifdef MRN_HAVE_MYSQL_FIELD_PART_OF_KEY_NOT_CLUSTERED field->part_of_key_not_clustered.set_bit(i); +#endif } if (index_flags(i, j, 1) & HA_READ_ORDER) field->part_of_sortkey.set_bit(i); @@ -4195,12 +4529,93 @@ void ha_mroonga::wrapper_overwrite_index_bits() DBUG_VOID_RETURN; } -int ha_mroonga::storage_open(const char *name, int mode, uint test_if_locked) +int ha_mroonga::storage_reindex() { int error = 0; MRN_DBUG_ENTER_METHOD(); - error = ensure_database_open(name); + uint n_keys = table_share->keys; + KEY *key_info = table->key_info; + + bool have_multiple_column_index = false; + bitmap_clear_all(table->read_set); + for (uint i = 0; i < n_keys; ++i) { + if (!grn_index_columns[i]) + continue; + + grn_hash *columns = grn_hash_create(ctx, NULL, sizeof(grn_id), 0, + GRN_OBJ_TABLE_HASH_KEY); + grn_table_columns(ctx, grn_index_tables[i], NULL, 0, + reinterpret_cast(columns)); + unsigned int n_columns = + grn_table_size(ctx, reinterpret_cast(columns)); + grn_hash_close(ctx, columns); + + bool is_multiple_column_index = + (KEY_N_KEY_PARTS(&(key_info[i])) != 1 && + !(key_info[i].flags & HA_FULLTEXT)); + + if (n_columns == 1 || is_multiple_column_index) { + grn_table_truncate(ctx, grn_index_tables[i]); + if (ctx->rc != GRN_SUCCESS) { + error = ER_ERROR_ON_WRITE; + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + char index_table_name[GRN_TABLE_MAX_KEY_SIZE]; + int index_table_name_size; + index_table_name_size = + grn_obj_name(ctx, grn_index_tables[i], + index_table_name, GRN_TABLE_MAX_KEY_SIZE); + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: reindex: failed to truncate index table: " + "<%.*s>: <%s>(%d)", + index_table_name_size, index_table_name, + ctx->errbuf, ctx->rc); + my_message(error, error_message, MYF(0)); + break; + } + } + + if (is_multiple_column_index) { + mrn_set_bitmap_by_key(table->read_set, &key_info[i]); + have_multiple_column_index = true; + } else { + grn_obj_reindex(ctx, grn_index_columns[i]); + if (ctx->rc != GRN_SUCCESS) { + error = ER_ERROR_ON_WRITE; + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + char index_column_name[GRN_TABLE_MAX_KEY_SIZE]; + int index_column_name_size; + index_column_name_size = + grn_obj_name(ctx, grn_index_columns[i], + index_column_name, GRN_TABLE_MAX_KEY_SIZE); + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: reindex: failed to reindex: " + "<%.*s>: <%s>(%d)", + index_column_name_size, index_column_name, + ctx->errbuf, ctx->rc); + my_message(error, error_message, MYF(0)); + break; + } + } + } + + if (!error && have_multiple_column_index) + error = storage_add_index_multiple_columns(key_info, n_keys, + grn_index_tables, + grn_index_columns, + false); + bitmap_set_all(table->read_set); + + DBUG_RETURN(error); +} + +int ha_mroonga::storage_open(const char *name, int mode, uint open_options) +{ + int error = 0; + MRN_DBUG_ENTER_METHOD(); + + mrn::Database *db; + error = ensure_database_open(name, &db); if (error) DBUG_RETURN(error); @@ -4215,19 +4630,38 @@ int ha_mroonga::storage_open(const char *name, int mode, uint test_if_locked) DBUG_RETURN(error); } - if (!(ha_thd()->open_options & HA_OPEN_FOR_REPAIR)) { + if (!(open_options & HA_OPEN_FOR_REPAIR)) { error = storage_open_indexes(name); if (error) { + storage_close_columns(); grn_obj_unlink(ctx, grn_table); grn_table = NULL; - // TODO: unlink elements - free(grn_columns); - // TODO: unlink elements - free(grn_column_ranges); DBUG_RETURN(error); } storage_set_keys_in_use(); + + { + mrn::Lock lock(&mrn_operations_mutex); + mrn::PathMapper mapper(name); + const char *table_name = mapper.table_name(); + size_t table_name_size = strlen(table_name); + if (db->is_broken_table(table_name, table_name_size)) { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "Auto repair is started: <%s>", + name); + error = operations_->repair(table_name, table_name_size); + if (!error) + db->mark_table_repaired(table_name, table_name_size); + if (!share->disable_keys) { + if (!error) + error = storage_reindex(); + } + GRN_LOG(ctx, GRN_LOG_NOTICE, + "Auto repair is done: <%s>: %s", + name, error == 0 ? "success" : "failure"); + } + } } ref_length = sizeof(grn_id); @@ -4294,18 +4728,26 @@ int ha_mroonga::storage_open_columns(void) for (int i = 0; i < n_columns; i++) { Field *field = table->field[i]; - const char *column_name = field->field_name; - int column_name_size = strlen(column_name); + mrn::ColumnName column_name(field->field_name); if (table_share->blob_fields) { blob_buffers[i].set_charset(field->charset()); } - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (strcmp(MRN_COLUMN_NAME_ID, column_name.mysql_name()) == 0) { continue; } +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + grn_columns[i] = NULL; + grn_column_ranges[i] = NULL; + continue; + } +#endif - grn_columns[i] = grn_obj_column(ctx, grn_table, - column_name, column_name_size); + grn_columns[i] = grn_obj_column(ctx, + grn_table, + column_name.c_str(), + column_name.length()); if (!grn_columns[i]) { error = ER_CANT_OPEN_FILE; my_message(error, ctx->errbuf, MYF(0)); @@ -4322,25 +4764,31 @@ int ha_mroonga::storage_open_columns(void) } if (error != 0) { - for (int i = 0; i < n_columns; i++) { - grn_obj *column = grn_columns[i]; - if (column) { - grn_obj_unlink(ctx, column); - } + storage_close_columns(); + } - grn_obj *range = grn_column_ranges[i]; - if (range) { - grn_obj_unlink(ctx, range); - } + DBUG_RETURN(error); +} + +void ha_mroonga::storage_close_columns(void) +{ + int n_columns = table->s->fields; + for (int i = 0; i < n_columns; i++) { + grn_obj *column = grn_columns[i]; + if (column) { + grn_obj_unlink(ctx, column); } - free(grn_columns); - grn_columns = NULL; - free(grn_column_ranges); - grn_column_ranges = NULL; + grn_obj *range = grn_column_ranges[i]; + if (range) { + grn_obj_unlink(ctx, range); + } } - DBUG_RETURN(error); + free(grn_columns); + grn_columns = NULL; + free(grn_column_ranges); + grn_column_ranges = NULL; } int ha_mroonga::storage_open_indexes(const char *name) @@ -4400,6 +4848,11 @@ int ha_mroonga::storage_open_indexes(const char *name) grn_index_tables[i] = grn_ctx_get(ctx, index_table_name.c_str(), index_table_name.length()); + if (ctx->rc == GRN_SUCCESS && !grn_index_tables[i]) { + grn_index_tables[i] = grn_ctx_get(ctx, + index_table_name.old_c_str(), + index_table_name.old_length()); + } if (ctx->rc == GRN_SUCCESS) { grn_index_columns[i] = grn_obj_column(ctx, grn_index_tables[i], @@ -4458,7 +4911,14 @@ int ha_mroonga::storage_open_indexes(const char *name) DBUG_RETURN(error); } -int ha_mroonga::open(const char *name, int mode, uint test_if_locked) +int ha_mroonga::open(const char *name, + int mode, + uint open_options +#ifdef MRN_HANDLER_OPEN_HAVE_TABLE_DEFINITION + , + const dd::Table *table_def +#endif + ) { int error = 0; MRN_DBUG_ENTER_METHOD(); @@ -4476,9 +4936,9 @@ int ha_mroonga::open(const char *name, int mode, uint test_if_locked) if (share->wrapper_mode) { - error = wrapper_open(name, mode, test_if_locked); + error = wrapper_open(name, mode, open_options); } else { - error = storage_open(name, mode, test_if_locked); + error = storage_open(name, mode, open_options); } if (error) @@ -4546,7 +5006,10 @@ int ha_mroonga::close() DBUG_RETURN(error); } - error = add_wrap_hton(share->table_name, share->hton); + if (thd) + { + error = add_wrap_hton(share->table_name, share->hton); + } bitmap_free(&multiple_column_key_bitmap); if (share->use_count == 1) { mrn_free_long_term_share(share->long_term_share); @@ -4605,7 +5068,7 @@ int ha_mroonga::generic_delete_table(const char *name, const char *table_name) error = drop_indexes(table_name); grn_obj *table_obj = grn_ctx_get(ctx, table_name, strlen(table_name)); - if (!ctx->rc) { + if (table_obj) { grn_obj_remove(ctx, table_obj); } if (ctx->rc) { @@ -4648,6 +5111,46 @@ int ha_mroonga::delete_table(const char *name) } } + if (!wrap_handlerton) { + bool open_table_to_get_wrap_handlerton = true; + if (mapper.is_internal_table_name()) { + open_table_to_get_wrap_handlerton = false; + } + if (open_table_to_get_wrap_handlerton) { + TABLE_LIST table_list; + table_list.init_one_table(mapper.db_name(), strlen(mapper.db_name()), + mapper.mysql_table_name(), + strlen(mapper.mysql_table_name()), + mapper.mysql_table_name(), + TL_WRITE); + mrn_open_mutex_lock(NULL); + TABLE_SHARE *tmp_table_share = + mrn_create_tmp_table_share(&table_list, name, &error); + error = 0; + mrn_open_mutex_unlock(NULL); + if (tmp_table_share) { + TABLE tmp_table; + tmp_table.s = tmp_table_share; +#ifdef WITH_PARTITION_STORAGE_ENGINE + tmp_table.part_info = NULL; +#endif + MRN_SHARE *tmp_share = mrn_get_share(name, &tmp_table, &error); + if (tmp_share) { + wrap_handlerton = tmp_share->hton; + mrn_free_long_term_share(tmp_share->long_term_share); + tmp_share->long_term_share = NULL; + mrn_free_share(tmp_share); + } + mrn_open_mutex_lock(NULL); + mrn_free_tmp_table_share(tmp_table_share); + mrn_open_mutex_unlock(NULL); + if (error) { + DBUG_RETURN(error); + } + } + } + } + if (wrap_handlerton) { error = wrapper_delete_table(name, wrap_handlerton, mapper.table_name()); @@ -4658,8 +5161,8 @@ int ha_mroonga::delete_table(const char *name) error = generic_delete_table(name, mapper.table_name()); } - if (!error && is_temporary_table_name(name)) { - mrn_db_manager->drop(name); + if (!error) { + error = operations_->clear(name, strlen(name)); } DBUG_RETURN(error); @@ -5032,6 +5535,70 @@ int ha_mroonga::rnd_end() DBUG_RETURN(error); } +#ifdef MRN_HANDLER_RECORDS_RETURN_ERROR +int ha_mroonga::wrapper_records(ha_rows *num_rows) +{ + int error = 0; + MRN_DBUG_ENTER_METHOD(); + MRN_SET_WRAP_SHARE_KEY(share, table->s); + MRN_SET_WRAP_TABLE_KEY(this, table); + error = wrap_handler->ha_records(num_rows); + MRN_SET_BASE_SHARE_KEY(share, table->s); + MRN_SET_BASE_TABLE_KEY(this, table); + DBUG_RETURN(error); +} + +int ha_mroonga::storage_records(ha_rows *num_rows) +{ + MRN_DBUG_ENTER_METHOD(); + int error = handler::records(num_rows); + DBUG_RETURN(error); +} + +int ha_mroonga::records(ha_rows *num_rows) +{ + MRN_DBUG_ENTER_METHOD(); + int error = 0; + if (share->wrapper_mode) { + error = wrapper_records(num_rows); + } else { + error = storage_records(num_rows); + } + DBUG_RETURN(error); +} +#else +ha_rows ha_mroonga::wrapper_records() +{ + ha_rows num_rows; + MRN_DBUG_ENTER_METHOD(); + MRN_SET_WRAP_SHARE_KEY(share, table->s); + MRN_SET_WRAP_TABLE_KEY(this, table); + num_rows = wrap_handler->records(); + MRN_SET_BASE_SHARE_KEY(share, table->s); + MRN_SET_BASE_TABLE_KEY(this, table); + DBUG_RETURN(num_rows); +} + +ha_rows ha_mroonga::storage_records() +{ + MRN_DBUG_ENTER_METHOD(); + ha_rows num_rows = handler::records(); + DBUG_RETURN(num_rows); +} + +ha_rows ha_mroonga::records() +{ + MRN_DBUG_ENTER_METHOD(); + ha_rows num_rows; + if (share->wrapper_mode) { + num_rows = wrapper_records(); + } else { + num_rows = storage_records(); + } + DBUG_RETURN(num_rows); +} +#endif + int ha_mroonga::wrapper_rnd_next(uchar *buf) { int error = 0; @@ -5273,7 +5840,15 @@ int ha_mroonga::wrapper_write_row(uchar *buf) { int error = 0; THD *thd = ha_thd(); + MRN_DBUG_ENTER_METHOD(); + + mrn::Operation operation(operations_, + "write", + table->s->table_name.str, + table->s->table_name.length); + + operation.record_target(record_id); MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); tmp_disable_binlog(thd); @@ -5388,6 +5963,11 @@ int ha_mroonga::storage_write_row(uchar *buf) DBUG_RETURN(error); } + mrn::Operation operation(operations_, + "write", + table->s->table_name.str, + table->s->table_name.length); + THD *thd = ha_thd(); int i; int n_columns = table->s->fields; @@ -5401,11 +5981,17 @@ int ha_mroonga::storage_write_row(uchar *buf) mrn::DebugColumnAccess debug_column_access(table, table->read_set); for (i = 0; i < n_columns; i++) { Field *field = table->field[i]; - const char *column_name = field->field_name; + +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif if (field->is_null()) continue; - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + mrn::ColumnName column_name(field->field_name); + if (strcmp(MRN_COLUMN_NAME_ID, column_name.c_str()) == 0) { push_warning_printf(thd, MRN_SEVERITY_WARNING, WARN_DATA_TRUNCATED, MRN_GET_ERR_MSG(WARN_DATA_TRUNCATED), @@ -5489,17 +6075,25 @@ int ha_mroonga::storage_write_row(uchar *buf) } DBUG_RETURN(error); } + operation.record_target(record_id); } grn_obj colbuf; GRN_VOID_INIT(&colbuf); for (i = 0; i < n_columns; i++) { Field *field = table->field[i]; - const char *column_name = field->field_name; if (field->is_null()) continue; +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif + + mrn::ColumnName column_name(field->field_name); + #ifdef MRN_HAVE_SPATIAL bool is_null_geometry_value = field->real_type() == MYSQL_TYPE_GEOMETRY && @@ -5509,39 +6103,63 @@ int ha_mroonga::storage_write_row(uchar *buf) } #endif - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (strcmp(MRN_COLUMN_NAME_ID, column_name.c_str()) == 0) { continue; } error = mrn_change_encoding(ctx, field->charset()); if (error) { - grn_obj_unlink(ctx, &colbuf); + GRN_OBJ_FIN(ctx, &colbuf); goto err; } error = generic_store_bulk(field, &colbuf); if (error) { - grn_obj_unlink(ctx, &colbuf); + GRN_OBJ_FIN(ctx, &colbuf); goto err; } - if (added && is_grn_zero_column_value(grn_columns[i], &colbuf)) { - // WORKAROUND: groonga can't index newly added '0' value for - // fix size column. So we add non-'0' value first then add - // real '0' value again. It will be removed when groonga - // supports 'null' value. - char *bytes = GRN_BULK_HEAD(&colbuf); - bytes[0] = '\1'; - grn_obj_set_value(ctx, grn_columns[i], record_id, &colbuf, GRN_OBJ_SET); - bytes[0] = '\0'; + + grn_obj *column = grn_columns[i]; + if (is_foreign_key_field(table->s->table_name.str, field->field_name)) { + grn_obj value; + GRN_RECORD_INIT(&value, 0, grn_obj_get_range(ctx, column)); + grn_rc cast_rc = grn_obj_cast(ctx, &colbuf, &value, GRN_FALSE); + if (cast_rc != GRN_SUCCESS) { + grn_obj inspected; + GRN_TEXT_INIT(&inspected, 0); + grn_inspect(ctx, &inspected, &colbuf); + error = HA_ERR_NO_REFERENCED_ROW; + GRN_PLUGIN_ERROR(ctx, GRN_INVALID_ARGUMENT, + "foreign record doesn't exist: <%s>:<%.*s>", + field->field_name, + static_cast(GRN_TEXT_LEN(&inspected)), + GRN_TEXT_VALUE(&inspected)); + GRN_OBJ_FIN(ctx, &value); + GRN_OBJ_FIN(ctx, &colbuf); + GRN_OBJ_FIN(ctx, &inspected); + goto err; + } + grn_obj_set_value(ctx, column, record_id, &value, GRN_OBJ_SET); + } else { + if (added && is_grn_zero_column_value(column, &colbuf)) { + // WORKAROUND: groonga can't index newly added '0' value for + // fix size column. So we add non-'0' value first then add + // real '0' value again. It will be removed when groonga + // supports 'null' value. + char *bytes = GRN_BULK_HEAD(&colbuf); + bytes[0] = '\1'; + grn_obj_set_value(ctx, column, record_id, &colbuf, GRN_OBJ_SET); + bytes[0] = '\0'; + } + grn_obj_set_value(ctx, column, record_id, &colbuf, GRN_OBJ_SET); } - grn_obj_set_value(ctx, grn_columns[i], record_id, &colbuf, GRN_OBJ_SET); if (ctx->rc) { - grn_obj_unlink(ctx, &colbuf); + GRN_OBJ_FIN(ctx, &colbuf); my_message(ER_ERROR_ON_WRITE, ctx->errbuf, MYF(0)); error = ER_ERROR_ON_WRITE; goto err; } } - grn_obj_unlink(ctx, &colbuf); + GRN_OBJ_FIN(ctx, &colbuf); error = storage_write_row_multiple_column_indexes(buf, record_id); if (error) { @@ -5862,6 +6480,12 @@ int ha_mroonga::wrapper_update_row(const uchar *old_data, uchar *new_data) int error = 0; THD *thd = ha_thd(); + + mrn::Operation operation(operations_, + "update", + table->s->table_name.str, + table->s->table_name.length); + MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); tmp_disable_binlog(thd); @@ -5999,6 +6623,12 @@ int ha_mroonga::storage_update_row(const uchar *old_data, uchar *new_data) DBUG_RETURN(error); } + mrn::Operation operation(operations_, + "update", + table->s->table_name.str, + table->s->table_name.length); + operation.record_target(record_id); + grn_obj colbuf; int i; uint j; @@ -6007,11 +6637,22 @@ int ha_mroonga::storage_update_row(const uchar *old_data, uchar *new_data) for (i = 0; i < n_columns; i++) { Field *field = table->field[i]; - const char *column_name = field->field_name; - if (bitmap_is_set(table->write_set, field->field_index)) { - if (field->is_null()) continue; - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif + + if (!bitmap_is_set(table->write_set, field->field_index)) + continue; + + if (field->is_null()) + continue; + + { + mrn::ColumnName column_name(field->field_name); + if (strcmp(MRN_COLUMN_NAME_ID, column_name.c_str()) == 0) { push_warning_printf(thd, MRN_SEVERITY_WARNING, WARN_DATA_TRUNCATED, MRN_GET_ERR_MSG(WARN_DATA_TRUNCATED), MRN_COLUMN_NAME_ID, @@ -6021,6 +6662,38 @@ int ha_mroonga::storage_update_row(const uchar *old_data, uchar *new_data) } } } + + if (!is_foreign_key_field(table->s->table_name.str, field->field_name)) + continue; + + { + grn_obj *column = grn_columns[i]; + grn_obj new_value; + GRN_VOID_INIT(&new_value); + { + mrn::DebugColumnAccess debug_column_access(table, table->read_set); + generic_store_bulk(field, &new_value); + } + grn_obj casted_value; + GRN_RECORD_INIT(&casted_value, 0, grn_obj_get_range(ctx, column)); + grn_rc cast_rc = grn_obj_cast(ctx, &new_value, &casted_value, GRN_FALSE); + GRN_OBJ_FIN(ctx, &casted_value); + if (cast_rc != GRN_SUCCESS) { + grn_obj inspected; + GRN_TEXT_INIT(&inspected, 0); + grn_inspect(ctx, &inspected, &new_value); + GRN_OBJ_FIN(ctx, &new_value); + error = HA_ERR_NO_REFERENCED_ROW; + GRN_PLUGIN_ERROR(ctx, GRN_INVALID_ARGUMENT, + "foreign record doesn't exist: <%s>:<%.*s>", + field->field_name, + static_cast(GRN_TEXT_LEN(&inspected)), + GRN_TEXT_VALUE(&inspected)); + GRN_OBJ_FIN(ctx, &inspected); + DBUG_RETURN(error); + } + GRN_OBJ_FIN(ctx, &new_value); + } } KEY *pkey_info = NULL; @@ -6044,14 +6717,21 @@ int ha_mroonga::storage_update_row(const uchar *old_data, uchar *new_data) GRN_VOID_INIT(&colbuf); for (i = 0; i < n_columns; i++) { Field *field = table->field[i]; - const char *column_name = field->field_name; + +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif + if (bitmap_is_set(table->write_set, field->field_index)) { mrn::DebugColumnAccess debug_column_access(table, table->read_set); DBUG_PRINT("info", ("mroonga: update column %d(%d)",i,field->field_index)); if (field->is_null()) continue; - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + mrn::ColumnName column_name(field->field_name); + if (strcmp(MRN_COLUMN_NAME_ID, column_name.c_str()) == 0) { continue; } @@ -6059,30 +6739,43 @@ int ha_mroonga::storage_update_row(const uchar *old_data, uchar *new_data) if (error) goto err; + bool is_pkey = false; bool on_duplicate_key_update = (inserting_with_update && ignoring_duplicated_key); - if (!on_duplicate_key_update && pkey_info) { - bool have_pkey = false; + if (pkey_info && !on_duplicate_key_update) { for (j = 0; j < KEY_N_KEY_PARTS(pkey_info); j++) { Field *pkey_field = pkey_info->key_part[j].field; - if (strcmp(pkey_field->field_name, column_name) == 0) { - if (!replacing_) { - char message[MRN_BUFFER_SIZE]; - snprintf(message, MRN_BUFFER_SIZE, - "data truncated for primary key column: <%s>", - column_name); - push_warning(thd, MRN_SEVERITY_WARNING, - WARN_DATA_TRUNCATED, message); - } - have_pkey = true; + if (strcmp(pkey_field->field_name, column_name.c_str()) == 0) { + is_pkey = true; + break; } } - if (have_pkey) { - continue; - } } generic_store_bulk(field, &colbuf); + if (is_pkey) { + bool is_multiple_column_index = KEY_N_KEY_PARTS(pkey_info) > 1; + bool is_same_value; + if (is_multiple_column_index) { + is_same_value = false; + } else { + grn_id found_record_id = grn_table_get(ctx, + grn_table, + GRN_BULK_HEAD(&colbuf), + GRN_BULK_VSIZE(&colbuf)); + is_same_value = (record_id == found_record_id); + } + if (!is_same_value && !replacing_) { + char message[MRN_BUFFER_SIZE]; + snprintf(message, MRN_BUFFER_SIZE, + "data truncated for primary key column: <%s>", + column_name.c_str()); + push_warning(thd, MRN_SEVERITY_WARNING, + WARN_DATA_TRUNCATED, message); + } + continue; + } + grn_obj_set_value(ctx, grn_columns[i], record_id, &colbuf, GRN_OBJ_SET); if (ctx->rc) { grn_obj_unlink(ctx, &colbuf); @@ -6340,6 +7033,12 @@ int ha_mroonga::wrapper_delete_row(const uchar *buf) int error = 0; THD *thd= ha_thd(); + + mrn::Operation operation(operations_, + "delete", + table->s->table_name.str, + table->s->table_name.length); + MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); tmp_disable_binlog(thd); @@ -6429,6 +7128,69 @@ int ha_mroonga::storage_delete_row(const uchar *buf) DBUG_RETURN(0); } + mrn::Operation operation(operations_, + "delete", + table->s->table_name.str, + table->s->table_name.length); + operation.record_target(record_id); + + { + grn_id referencing_child_table_id = GRN_ID_NIL; + grn_hash *columns = grn_hash_create(ctx, NULL, sizeof(grn_id), 0, + GRN_OBJ_TABLE_HASH_KEY|GRN_HASH_TINY); + grn_table_columns(ctx, grn_table, "", 0, + reinterpret_cast(columns)); + GRN_HASH_EACH_BEGIN(ctx, columns, cursor, id) { + void *key; + grn_hash_cursor_get_key(ctx, cursor, &key); + grn_id column_id = *static_cast(key); + grn_obj *column = grn_ctx_at(ctx, column_id); + if (!column) + continue; + + if (column->header.type != GRN_COLUMN_INDEX) + continue; + + grn_ii_cursor *ii_cursor = + grn_ii_cursor_open(ctx, + reinterpret_cast(column), + record_id, + GRN_ID_NIL, + GRN_ID_MAX, + 0, + 0); + if (!ii_cursor) + continue; + + if (grn_ii_cursor_next(ctx, ii_cursor)) { + referencing_child_table_id = grn_obj_get_range(ctx, column); + } + + grn_ii_cursor_close(ctx, ii_cursor); + + if (referencing_child_table_id != GRN_ID_NIL) + break; + } GRN_HASH_EACH_END(ctx, cursor); + grn_hash_close(ctx, columns); + + if (referencing_child_table_id != GRN_ID_NIL) { + grn_obj *referencing_child_table = + grn_ctx_at(ctx, referencing_child_table_id); + char name[GRN_TABLE_MAX_KEY_SIZE]; + int name_size; + name_size = grn_obj_name(ctx, + referencing_child_table, + name, + GRN_TABLE_MAX_KEY_SIZE); + error = HA_ERR_ROW_IS_REFERENCED; + GRN_PLUGIN_ERROR(ctx, GRN_INVALID_ARGUMENT, + "one or more child rows exist in <%.*s>", + name_size, + name); + DBUG_RETURN(error); + } + } + storage_store_fields_for_prep_update(buf, NULL, record_id); { mrn::Lock lock(&(share->record_mutex), have_unique_index()); @@ -6799,6 +7561,13 @@ ha_rows ha_mroonga::storage_records_in_range(uint key_nr, key_range *range_min, grn_ii *ii = reinterpret_cast(index_column); row_count = grn_ii_estimate_size_for_lexicon_cursor(ctx, ii, cursor); grn_table_cursor_close(ctx, cursor); + + unsigned int max_n_lexicon_records = + grn_table_size(ctx, grn_index_tables[key_nr]); + if (cursor_limit >= 0 && + static_cast(cursor_limit) < max_n_lexicon_records) { + row_count++; + } } DBUG_RETURN(row_count); } @@ -6960,7 +7729,7 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key, enum ha_rkey_function find_flag) { MRN_DBUG_ENTER_METHOD(); - check_count_skip(keypart_map, 0, false); + check_count_skip(keypart_map); int error = 0; @@ -6976,6 +7745,29 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key, clear_cursor_geo(); clear_empty_value_records(); + switch (find_flag) { + case HA_READ_BEFORE_KEY: + flags |= GRN_CURSOR_LT | GRN_CURSOR_DESCENDING; + break; + case HA_READ_PREFIX_LAST: + flags |= GRN_CURSOR_PREFIX | GRN_CURSOR_DESCENDING; + break; + case HA_READ_PREFIX_LAST_OR_PREV: + flags |= GRN_CURSOR_LE | GRN_CURSOR_DESCENDING; + break; + case HA_READ_AFTER_KEY: + flags |= GRN_CURSOR_GT | GRN_CURSOR_ASCENDING; + break; + case HA_READ_KEY_OR_NEXT: + flags |= GRN_CURSOR_GE | GRN_CURSOR_ASCENDING; + break; + case HA_READ_KEY_EXACT: + flags |= GRN_CURSOR_LE | GRN_CURSOR_GE; + break; + default: + break; + } + bool is_multiple_column_index = KEY_N_KEY_PARTS(key_info) > 1; if (is_multiple_column_index) { mrn_change_encoding(ctx, NULL); @@ -6987,13 +7779,21 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key, "multiple column index key length=<%u>", key_length, key_info->key_length)); if (key_length == key_info->key_length) { - if (find_flag == HA_READ_BEFORE_KEY || - find_flag == HA_READ_PREFIX_LAST_OR_PREV) { + switch (find_flag) { + case HA_READ_BEFORE_KEY: + case HA_READ_PREFIX_LAST_OR_PREV: key_max = key_max_entity; storage_encode_multiple_column_key(key_info, key, key_length, key_max, &size_max); - } else { + break; + case HA_READ_PREFIX_LAST: + key_min = key_min_entity; + storage_encode_multiple_column_key(key_info, + key, key_length, + key_min, &size_min); + break; + default: key_min = key_min_entity; storage_encode_multiple_column_key(key_info, key, key_length, @@ -7002,13 +7802,102 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key, key_max = key_min; size_max = size_min; } + break; } } else { - flags |= GRN_CURSOR_PREFIX; - key_min = key_min_entity; - storage_encode_multiple_column_key(key_info, - key, key_length, - key_min, &size_min); + const uchar *prev_key = NULL; + uint prev_key_length = 0; + if ((keypart_map >> 1) > 0) { + prev_key = key; + prev_key_length = + mrn_calculate_key_len(table, active_index, key, keypart_map >> 1); + } + switch (find_flag) { + case HA_READ_BEFORE_KEY: + if (prev_key) { + flags |= GRN_CURSOR_GE; + key_min = key_min_entity; + storage_encode_multiple_column_key_range(key_info, + prev_key, prev_key_length, + NULL, 0, + key_min, &size_min, + NULL, NULL); + } + key_max = key_max_entity; + storage_encode_multiple_column_key_range(key_info, + key, key_length, + NULL, 0, + key_max, &size_max, + NULL, NULL); + break; + case HA_READ_PREFIX_LAST: + key_min = key_min_entity; + storage_encode_multiple_column_key(key_info, + key, key_length, + key_min, &size_min); + break; + case HA_READ_PREFIX_LAST_OR_PREV: + if (prev_key) { + flags |= GRN_CURSOR_GE; + key_min = key_min_entity; + storage_encode_multiple_column_key_range(key_info, + prev_key, prev_key_length, + NULL, 0, + key_min, &size_min, + NULL, NULL); + } + key_max = key_max_entity; + storage_encode_multiple_column_key_range(key_info, + NULL, 0, + key, key_length, + NULL, NULL, + key_max, &size_max); + break; + case HA_READ_AFTER_KEY: + key_min = key_min_entity; + storage_encode_multiple_column_key_range(key_info, + NULL, 0, + key, key_length, + NULL, NULL, + key_min, &size_min); + if (prev_key) { + flags |= GRN_CURSOR_LE; + key_max = key_max_entity; + storage_encode_multiple_column_key_range(key_info, + NULL, 0, + prev_key, prev_key_length, + NULL, NULL, + key_max, &size_max); + } + break; + case HA_READ_KEY_OR_NEXT: + key_min = key_min_entity; + storage_encode_multiple_column_key_range(key_info, + key, key_length, + NULL, 0, + key_min, &size_min, + NULL, NULL); + if (prev_key) { + flags |= GRN_CURSOR_LE; + key_max = key_max_entity; + storage_encode_multiple_column_key_range(key_info, + NULL, 0, + prev_key, prev_key_length, + NULL, NULL, + key_max, &size_max); + } + break; + case HA_READ_KEY_EXACT: + key_min = key_min_entity; + key_max = key_max_entity; + storage_encode_multiple_column_key_range(key_info, + key, key_length, + key, key_length, + key_min, &size_min, + key_max, &size_max); + default: + break; + } } } else if (mrn_is_geo_key(key_info)) { error = mrn_change_encoding(ctx, key_info->key_part->field->charset()); @@ -7055,23 +7944,6 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key, } } - switch (find_flag) { - case HA_READ_BEFORE_KEY: - flags |= GRN_CURSOR_LT | GRN_CURSOR_DESCENDING; - break; - case HA_READ_PREFIX_LAST_OR_PREV: - flags |= GRN_CURSOR_LE | GRN_CURSOR_DESCENDING; - break; - case HA_READ_AFTER_KEY: - flags |= GRN_CURSOR_GT | GRN_CURSOR_ASCENDING; - break; - case HA_READ_KEY_OR_NEXT: - flags |= GRN_CURSOR_GE | GRN_CURSOR_ASCENDING; - break; - default: - break; - } - uint pkey_nr = table->s->primary_key; if (key_nr == pkey_nr) { DBUG_PRINT("info", ("mroonga: use primary key")); @@ -7509,222 +8381,6 @@ int ha_mroonga::index_next_same(uchar *buf, const uchar *key, uint keylen) DBUG_RETURN(error); } -int ha_mroonga::wrapper_read_range_first(const key_range *start_key, - const key_range *end_key, - bool eq_range, bool sorted) -{ - int error = 0; - MRN_DBUG_ENTER_METHOD(); - KEY *key_info = &(table->key_info[active_index]); - if (mrn_is_geo_key(key_info)) { - clear_cursor_geo(); - error = generic_geo_open_cursor(start_key->key, start_key->flag); - if (!error) { - error = wrapper_get_next_geo_record(table->record[0]); - } - DBUG_RETURN(error); - } - MRN_SET_WRAP_SHARE_KEY(share, table->s); - MRN_SET_WRAP_TABLE_KEY(this, table); - if (fulltext_searching) - set_pk_bitmap(); - error = wrap_handler->read_range_first(start_key, end_key, eq_range, - sorted); - MRN_SET_BASE_SHARE_KEY(share, table->s); - MRN_SET_BASE_TABLE_KEY(this, table); - DBUG_RETURN(error); -} - -int ha_mroonga::storage_read_range_first(const key_range *start_key, - const key_range *end_key, - bool eq_range, bool sorted) -{ - MRN_DBUG_ENTER_METHOD(); - check_count_skip(start_key ? start_key->keypart_map : 0, - end_key ? end_key->keypart_map : 0, false); - int flags = 0, error; - uint size_min = 0, size_max = 0; - uchar *key_min = NULL, *key_max = NULL; - uchar key_min_entity[MRN_MAX_KEY_SIZE]; - uchar key_max_entity[MRN_MAX_KEY_SIZE]; - KEY *key_info = &(table->s->key_info[active_index]); - - clear_cursor(); - - bool is_multiple_column_index = KEY_N_KEY_PARTS(key_info) > 1; - if (is_multiple_column_index) { - mrn_change_encoding(ctx, NULL); - if (start_key && end_key && - start_key->length == end_key->length && - memcmp(start_key->key, end_key->key, start_key->length) == 0) { - flags |= GRN_CURSOR_PREFIX; - key_min = key_min_entity; - storage_encode_multiple_column_key(key_info, - start_key->key, start_key->length, - key_min, &size_min); - } else { - key_min = key_min_entity; - key_max = key_max_entity; - storage_encode_multiple_column_key_range(key_info, - start_key, end_key, - key_min, &size_min, - key_max, &size_max); - if (size_min == 0) { - key_min = NULL; - } - if (size_max == 0) { - key_max = NULL; - } - } - } else { - Field *field = key_info->key_part[0].field; - const char *column_name = field->field_name; - error = mrn_change_encoding(ctx, field->charset()); - if (error) - DBUG_RETURN(error); - if (start_key) { - key_min = key_min_entity; - storage_encode_key(field, start_key->key, key_min_entity, - &size_min); - if (start_key->flag == HA_READ_KEY_EXACT) { - // for _id - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { - grn_id found_record_id = *((grn_id *)key_min); - if (grn_table_at(ctx, grn_table, found_record_id) != GRN_ID_NIL) { // found - storage_store_fields(table->record[0], found_record_id); - table->status = 0; - cursor = NULL; - record_id = found_record_id; - DBUG_RETURN(0); - } else { - table->status = STATUS_NOT_FOUND; - cursor = NULL; - record_id = GRN_ID_NIL; - DBUG_RETURN(HA_ERR_END_OF_FILE); - } - } - } - } - if (end_key) { - key_max = key_max_entity; - storage_encode_key(field, end_key->key, key_max, &size_max); - } - } - - if (start_key) { - switch (start_key->flag) { - case HA_READ_AFTER_KEY: - flags |= GRN_CURSOR_GT | GRN_CURSOR_ASCENDING; - break; - case HA_READ_KEY_OR_NEXT: - flags |= GRN_CURSOR_GE | GRN_CURSOR_ASCENDING; - break; - default: - break; - } - } - if (end_key) { - switch (end_key->flag) { - case HA_READ_BEFORE_KEY: - flags |= GRN_CURSOR_LT | GRN_CURSOR_ASCENDING; - break; - case HA_READ_AFTER_KEY: - flags |= GRN_CURSOR_GE | GRN_CURSOR_ASCENDING; - break; - default: - break; - } - } - - uint pkey_nr = table->s->primary_key; - if (active_index == pkey_nr) { - DBUG_PRINT("info", ("mroonga: use primary key")); - cursor = grn_table_cursor_open(ctx, grn_table, - key_min, size_min, key_max, size_max, - 0, -1, flags); - } else { - if (is_multiple_column_index) { - DBUG_PRINT("info", ("mroonga: use multiple column key%u", active_index)); - } else { - DBUG_PRINT("info", ("mroonga: use key%u", active_index)); - } - index_table_cursor = grn_table_cursor_open(ctx, - grn_index_tables[active_index], - key_min, size_min, - key_max, size_max, - 0, -1, flags); - cursor = grn_index_cursor_open(ctx, index_table_cursor, - grn_index_columns[active_index], - 0, GRN_ID_MAX, 0); - } - if (ctx->rc) { - my_message(ER_ERROR_ON_READ, ctx->errbuf, MYF(0)); - DBUG_RETURN(ER_ERROR_ON_READ); - } - error = storage_get_next_record(table->record[0]); - DBUG_RETURN(error); -} - -int ha_mroonga::read_range_first(const key_range *start_key, - const key_range *end_key, - bool eq_range, bool sorted) -{ - MRN_DBUG_ENTER_METHOD(); - int error = 0; - if (share->wrapper_mode) - { - error = wrapper_read_range_first(start_key, end_key, eq_range, - sorted); - } else { - error = storage_read_range_first(start_key, end_key, eq_range, sorted); - } - DBUG_RETURN(error); -} - -int ha_mroonga::wrapper_read_range_next() -{ - int error = 0; - MRN_DBUG_ENTER_METHOD(); - KEY *key_info = &(table->key_info[active_index]); - if (mrn_is_geo_key(key_info)) { - error = wrapper_get_next_geo_record(table->record[0]); - DBUG_RETURN(error); - } - MRN_SET_WRAP_SHARE_KEY(share, table->s); - MRN_SET_WRAP_TABLE_KEY(this, table); - if (fulltext_searching) - set_pk_bitmap(); - error = wrap_handler->read_range_next(); - MRN_SET_BASE_SHARE_KEY(share, table->s); - MRN_SET_BASE_TABLE_KEY(this, table); - DBUG_RETURN(error); -} - -int ha_mroonga::storage_read_range_next() -{ - MRN_DBUG_ENTER_METHOD(); - - if (cursor == NULL) { - DBUG_RETURN(HA_ERR_END_OF_FILE); - } - int error = storage_get_next_record(count_skip ? NULL : table->record[0]); - - DBUG_RETURN(error); -} - -int ha_mroonga::read_range_next() -{ - MRN_DBUG_ENTER_METHOD(); - int error = 0; - if (share->wrapper_mode) - { - error = wrapper_read_range_next(); - } else { - error = storage_read_range_next(); - } - DBUG_RETURN(error); -} - int ha_mroonga::generic_ft_init() { MRN_DBUG_ENTER_METHOD(); @@ -7749,257 +8405,63 @@ int ha_mroonga::generic_ft_init() if (sorted_result) { if (grn_table->header.type == GRN_TABLE_NO_KEY) { mrn_ft_info->id_accessor = grn_obj_column(ctx, sorted_result, - MRN_COLUMN_NAME_ID, - strlen(MRN_COLUMN_NAME_ID)); - } else { - mrn_ft_info->key_accessor = grn_obj_column(ctx, sorted_result, - MRN_COLUMN_NAME_KEY, - strlen(MRN_COLUMN_NAME_KEY)); - } - } else { - mrn_ft_info->key_accessor = grn_obj_column(ctx, mrn_ft_info->result, - MRN_COLUMN_NAME_KEY, - strlen(MRN_COLUMN_NAME_KEY)); - } - } - DBUG_RETURN(error); -} - -int ha_mroonga::wrapper_ft_init() -{ - MRN_DBUG_ENTER_METHOD(); - int error = generic_ft_init(); - DBUG_RETURN(error); -} - -int ha_mroonga::storage_ft_init() -{ - MRN_DBUG_ENTER_METHOD(); - int error = generic_ft_init(); - record_id = GRN_ID_NIL; - DBUG_RETURN(error); -} - -int ha_mroonga::ft_init() -{ - MRN_DBUG_ENTER_METHOD(); - int error = 0; - if (share->wrapper_mode) - { - error = wrapper_ft_init(); - } else { - error = storage_ft_init(); - } - DBUG_RETURN(error); -} - -void ha_mroonga::generic_ft_init_ext_add_conditions_fast_order_limit( - struct st_mrn_ft_info *info, grn_obj *expression) -{ - MRN_DBUG_ENTER_METHOD(); - - Item *where = - MRN_SELECT_LEX_GET_WHERE_COND(table->pos_in_table_list->select_lex); - - bool is_storage_mode = !(share->wrapper_mode); - mrn::ConditionConverter converter(info->ctx, grn_table, is_storage_mode); - converter.convert(where, expression); - - DBUG_VOID_RETURN; -} - -bool ha_mroonga::generic_ft_init_ext_parse_pragma_d(struct st_mrn_ft_info *info, - const char *keyword, - uint keyword_length, - grn_operator *default_operator, - uint *consumed_keyword_length) -{ - MRN_DBUG_ENTER_METHOD(); - - grn_bool succeeded = true; - if (keyword_length >= 1 && keyword[0] == '+') { - *default_operator = GRN_OP_AND; - *consumed_keyword_length = 1; - } else if (keyword_length >= 1 && keyword[0] == '-') { - *default_operator = GRN_OP_AND_NOT; - *consumed_keyword_length = 1; - } else if (keyword_length >= 2 && memcmp(keyword, "OR", 2) == 0) { - *default_operator = GRN_OP_OR; - *consumed_keyword_length = 2; - } else { - succeeded = false; - } - - DBUG_RETURN(succeeded); -} - -void ha_mroonga::generic_ft_init_ext_parse_pragma_w_append_section( - struct st_mrn_ft_info *info, - grn_obj *index_column, - grn_obj *match_columns, - uint section, - grn_obj *section_value_buffer, - int weight, - uint n_weights) -{ - MRN_DBUG_ENTER_METHOD(); - - grn_expr_append_obj(info->ctx, match_columns, index_column, GRN_OP_PUSH, 1); - GRN_UINT32_SET(info->ctx, section_value_buffer, section); - grn_expr_append_const(info->ctx, match_columns, section_value_buffer, - GRN_OP_PUSH, 1); - grn_expr_append_op(info->ctx, match_columns, GRN_OP_GET_MEMBER, 2); - - if (weight != 1) { - grn_expr_append_const_int(info->ctx, match_columns, weight, - GRN_OP_PUSH, 1); - grn_expr_append_op(info->ctx, match_columns, GRN_OP_STAR, 2); - } - - if (n_weights >= 2) { - grn_expr_append_op(info->ctx, match_columns, GRN_OP_OR, 2); - } - - DBUG_VOID_RETURN; -} - -bool ha_mroonga::generic_ft_init_ext_parse_pragma_w(struct st_mrn_ft_info *info, - const char *keyword, - uint keyword_length, - grn_obj *index_column, - grn_obj *match_columns, - uint *consumed_keyword_length, - grn_obj *tmp_objects) -{ - MRN_DBUG_ENTER_METHOD(); - - *consumed_keyword_length = 0; - - uint n_sections = KEY_N_KEY_PARTS(info->key_info); - - grn_obj section_value_buffer; - GRN_UINT32_INIT(§ion_value_buffer, 0); - - MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(bool, specified_sections, n_sections); - for (uint i = 0; i < n_sections; ++i) { - specified_sections[i] = false; - } - - uint n_weights = 0; - while (keyword_length >= 1) { - if (n_weights >= 1) { - if (keyword[0] != ',') { - break; - } - uint n_used_keyword_length = 1; - *consumed_keyword_length += n_used_keyword_length; - keyword_length -= n_used_keyword_length; - keyword += n_used_keyword_length; - if (keyword_length == 0) { - break; - } - } - - uint section = 0; - if ('1' <= keyword[0] && keyword[0] <= '9') { - const char *section_start = keyword; - const char *keyword_end = keyword + keyword_length; - const char *keyword_rest; - section = grn_atoui(section_start, keyword_end, &keyword_rest); - if (section_start == keyword_rest) { - break; - } - if (!(0 < section && section <= n_sections)) { - break; + MRN_COLUMN_NAME_ID, + strlen(MRN_COLUMN_NAME_ID)); + } else { + mrn_ft_info->key_accessor = grn_obj_column(ctx, sorted_result, + MRN_COLUMN_NAME_KEY, + strlen(MRN_COLUMN_NAME_KEY)); } - section -= 1; - specified_sections[section] = true; - uint n_used_keyword_length = keyword_rest - keyword; - *consumed_keyword_length += n_used_keyword_length; - keyword_length -= n_used_keyword_length; - keyword += n_used_keyword_length; } else { - break; - } - - int weight = 1; - if (keyword_length >= 2 && keyword[0] == ':') { - const char *weight_start = keyword + 1; - const char *keyword_end = keyword + keyword_length; - const char *keyword_rest; - weight = grn_atoi(weight_start, keyword_end, &keyword_rest); - if (weight_start == keyword_rest) { - break; - } - uint n_used_keyword_length = keyword_rest - keyword; - *consumed_keyword_length += n_used_keyword_length; - keyword_length -= n_used_keyword_length; - keyword += n_used_keyword_length; + mrn_ft_info->key_accessor = grn_obj_column(ctx, mrn_ft_info->result, + MRN_COLUMN_NAME_KEY, + strlen(MRN_COLUMN_NAME_KEY)); } - - n_weights++; - - generic_ft_init_ext_parse_pragma_w_append_section(info, - index_column, - match_columns, - section, - §ion_value_buffer, - weight, - n_weights); } + DBUG_RETURN(error); +} - for (uint section = 0; section < n_sections; ++section) { - if (specified_sections[section]) { - continue; - } +int ha_mroonga::wrapper_ft_init() +{ + MRN_DBUG_ENTER_METHOD(); + int error = generic_ft_init(); + DBUG_RETURN(error); +} - ++n_weights; +int ha_mroonga::storage_ft_init() +{ + MRN_DBUG_ENTER_METHOD(); + int error = generic_ft_init(); + record_id = GRN_ID_NIL; + DBUG_RETURN(error); +} - int default_weight = 1; - generic_ft_init_ext_parse_pragma_w_append_section(info, - index_column, - match_columns, - section, - §ion_value_buffer, - default_weight, - n_weights); +int ha_mroonga::ft_init() +{ + MRN_DBUG_ENTER_METHOD(); + int error = 0; + if (share->wrapper_mode) + { + error = wrapper_ft_init(); + } else { + error = storage_ft_init(); } - MRN_FREE_VARIABLE_LENGTH_ARRAYS(specified_sections); - - GRN_OBJ_FIN(info->ctx, §ion_value_buffer); - - DBUG_RETURN(n_weights > 0); + DBUG_RETURN(error); } -grn_expr_flags ha_mroonga::expr_flags_in_boolean_mode() +void ha_mroonga::generic_ft_init_ext_add_conditions_fast_order_limit( + struct st_mrn_ft_info *info, grn_obj *expression) { MRN_DBUG_ENTER_METHOD(); - ulonglong syntax_flags = MRN_BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT; -#ifdef MRN_SUPPORT_THDVAR_SET - syntax_flags = THDVAR(ha_thd(), boolean_mode_syntax_flags); -#endif - grn_expr_flags expression_flags = 0; - if (syntax_flags == MRN_BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT) { - expression_flags = GRN_EXPR_SYNTAX_QUERY | GRN_EXPR_ALLOW_LEADING_NOT; - } else { - if (syntax_flags & MRN_BOOLEAN_MODE_SYNTAX_FLAG_SYNTAX_SCRIPT) { - expression_flags |= GRN_EXPR_SYNTAX_SCRIPT; - } else { - expression_flags |= GRN_EXPR_SYNTAX_QUERY; - } - if (syntax_flags & MRN_BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_COLUMN) { - expression_flags |= GRN_EXPR_ALLOW_COLUMN; - } - if (syntax_flags & MRN_BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_UPDATE) { - expression_flags |= GRN_EXPR_ALLOW_UPDATE; - } - if (syntax_flags & MRN_BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_LEADING_NOT) { - expression_flags |= GRN_EXPR_ALLOW_LEADING_NOT; - } - } + Item *where = + MRN_SELECT_LEX_GET_WHERE_COND(table->pos_in_table_list->select_lex); + + bool is_storage_mode = !(share->wrapper_mode); + mrn::ConditionConverter converter(info->ctx, grn_table, is_storage_mode); + converter.convert(where, expression); - DBUG_RETURN(expression_flags); + DBUG_VOID_RETURN; } grn_rc ha_mroonga::generic_ft_init_ext_prepare_expression_in_boolean_mode( @@ -8007,107 +8469,17 @@ grn_rc ha_mroonga::generic_ft_init_ext_prepare_expression_in_boolean_mode( String *key, grn_obj *index_column, grn_obj *match_columns, - grn_obj *expression, - grn_obj *tmp_objects) + grn_obj *expression) { MRN_DBUG_ENTER_METHOD(); - grn_rc rc = GRN_SUCCESS; - - const char *keyword, *keyword_original; - uint keyword_length, keyword_length_original; - grn_operator default_operator = GRN_OP_OR; - grn_bool weight_specified = false; - keyword = keyword_original = key->ptr(); - keyword_length = keyword_length_original = key->length(); - // WORKAROUND: support only "D" and "W" pragmas. - if (keyword_length >= 2 && keyword[0] == '*') { - bool parsed = false; - bool done = false; - keyword++; - keyword_length--; - while (!done) { - uint consumed_keyword_length = 0; - switch (keyword[0]) { - case 'D': - if (generic_ft_init_ext_parse_pragma_d(info, - keyword + 1, - keyword_length - 1, - &default_operator, - &consumed_keyword_length)) { - parsed = true; - consumed_keyword_length += 1; - keyword += consumed_keyword_length; - keyword_length -= consumed_keyword_length; - } else { - done = true; - } - break; - case 'W': - if (generic_ft_init_ext_parse_pragma_w(info, - keyword + 1, - keyword_length - 1, - index_column, - match_columns, - &consumed_keyword_length, - tmp_objects)) { - parsed = true; - weight_specified = true; - consumed_keyword_length += 1; - keyword += consumed_keyword_length; - keyword_length -= consumed_keyword_length; - } else { - done = true; - } - break; - default: - done = true; - break; - } - } - if (!parsed) { - keyword = keyword_original; - keyword_length = keyword_length_original; - } - } - // WORKAROUND: ignore the first '+' to support "+apple macintosh" pattern. - while (keyword_length > 0 && keyword[0] == ' ') { - keyword++; - keyword_length--; - } - if (keyword_length > 0 && keyword[0] == '+') { - keyword++; - keyword_length--; - } - if (!weight_specified) { - grn_expr_append_obj(info->ctx, match_columns, index_column, GRN_OP_PUSH, 1); - } - rc = grn_expr_parse(info->ctx, expression, - keyword, keyword_length, - match_columns, GRN_OP_MATCH, default_operator, - expr_flags_in_boolean_mode()); - if (rc) { - char error_message[MRN_MESSAGE_BUFFER_SIZE]; - snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, - "failed to parse fulltext search keyword: <%.*s>: <%s>", - keyword_length_original, keyword_original, - info->ctx->errbuf); - ulong action = THDVAR(ha_thd(), action_on_fulltext_query_error); - switch (static_cast(action)) { - case MRN_ACTION_ON_ERROR_ERROR: - my_message(ER_PARSE_ERROR, error_message, MYF(0)); - break; - case MRN_ACTION_ON_ERROR_ERROR_AND_LOG: - my_message(ER_PARSE_ERROR, error_message, MYF(0)); - GRN_LOG(info->ctx, GRN_LOG_ERROR, "%s", error_message); - break; - case MRN_ACTION_ON_ERROR_IGNORE: - break; - case MRN_ACTION_ON_ERROR_IGNORE_AND_LOG: - GRN_LOG(info->ctx, GRN_LOG_ERROR, "%s", error_message); - break; - } - } + mrn::QueryParser query_parser(info->ctx, + ha_thd(), + expression, + index_column, + KEY_N_KEY_PARTS(info->key_info), + match_columns); + grn_rc rc = query_parser.parse(key->ptr(), key->length()); DBUG_RETURN(rc); } @@ -8117,8 +8489,7 @@ grn_rc ha_mroonga::generic_ft_init_ext_prepare_expression_in_normal_mode( String *key, grn_obj *index_column, grn_obj *match_columns, - grn_obj *expression, - grn_obj *tmp_objects) + grn_obj *expression) { MRN_DBUG_ENTER_METHOD(); @@ -8152,6 +8523,18 @@ struct st_mrn_ft_info *ha_mroonga::generic_ft_init_ext_select(uint flags, info->result = grn_table_create(info->ctx, NULL, 0, NULL, GRN_OBJ_TABLE_HASH_KEY | GRN_OBJ_WITH_SUBREC, grn_table, 0); + if (!info->result) { + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "[mroonga][ft-init] failed to create a table " + "to store matched records for one search: <%s>", + ctx->errbuf); + my_message(ER_ERROR_ON_READ, error_message, MYF(0)); + GRN_LOG(ctx, GRN_LOG_ERROR, "%s", error_message); + delete info; + DBUG_RETURN(NULL); + } + info->score_column = grn_obj_column(info->ctx, info->result, MRN_COLUMN_NAME_SCORE, strlen(MRN_COLUMN_NAME_SCORE)); @@ -8177,8 +8560,6 @@ struct st_mrn_ft_info *ha_mroonga::generic_ft_init_ext_select(uint flags, grn_obj *expression, *expression_variable; GRN_EXPR_CREATE_FOR_QUERY(info->ctx, info->table, expression, expression_variable); - grn_obj tmp_objects; - GRN_PTR_INIT(&tmp_objects, GRN_OBJ_VECTOR, GRN_ID_NIL); grn_rc rc = GRN_SUCCESS; if (flags & FT_BOOL) { @@ -8186,15 +8567,13 @@ struct st_mrn_ft_info *ha_mroonga::generic_ft_init_ext_select(uint flags, key, index_column, match_columns, - expression, - &tmp_objects); + expression); } else { rc = generic_ft_init_ext_prepare_expression_in_normal_mode(info, key, index_column, match_columns, - expression, - &tmp_objects); + expression); } if (rc == GRN_SUCCESS) { @@ -8210,12 +8589,6 @@ struct st_mrn_ft_info *ha_mroonga::generic_ft_init_ext_select(uint flags, grn_obj_unlink(info->ctx, expression); grn_obj_unlink(info->ctx, match_columns); - uint n_tmp_objects = GRN_BULK_VSIZE(&tmp_objects) / sizeof(grn_obj *); - for (uint i = 0; i < n_tmp_objects; ++i) { - grn_obj_unlink(info->ctx, GRN_PTR_VALUE_AT(&tmp_objects, i)); - } - grn_obj_unlink(info->ctx, &tmp_objects); - DBUG_RETURN(info); } @@ -8223,7 +8596,7 @@ FT_INFO *ha_mroonga::generic_ft_init_ext(uint flags, uint key_nr, String *key) { MRN_DBUG_ENTER_METHOD(); - check_count_skip(0, 0, true); + check_count_skip(0); mrn_change_encoding(ctx, system_charset_info); grn_operator operation = GRN_OP_OR; @@ -8231,6 +8604,16 @@ FT_INFO *ha_mroonga::generic_ft_init_ext(uint flags, uint key_nr, String *key) matched_record_keys = grn_table_create(ctx, NULL, 0, NULL, GRN_OBJ_TABLE_HASH_KEY | GRN_OBJ_WITH_SUBREC, grn_table, 0); + if (!matched_record_keys) { + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "[mroonga][ft-init] " + "failed to create a table to store all matched records: <%s>", + ctx->errbuf); + my_message(ER_ERROR_ON_READ, error_message, MYF(0)); + GRN_LOG(ctx, GRN_LOG_ERROR, "%s", error_message); + DBUG_RETURN(NULL); + } } grn_table_sort_key *sort_keys = NULL; @@ -8238,8 +8621,10 @@ FT_INFO *ha_mroonga::generic_ft_init_ext(uint flags, uint key_nr, String *key) longlong limit = -1; check_fast_order_limit(&sort_keys, &n_sort_keys, &limit); - struct st_mrn_ft_info *info = - generic_ft_init_ext_select(flags, key_nr, key); + struct st_mrn_ft_info *info = generic_ft_init_ext_select(flags, key_nr, key); + if (!info) { + DBUG_RETURN(NULL); + } grn_rc rc; rc = grn_table_setoperation(ctx, matched_record_keys, info->result, @@ -8253,6 +8638,9 @@ FT_INFO *ha_mroonga::generic_ft_init_ext(uint flags, uint key_nr, String *key) GRN_LOG(ctx, GRN_LOG_ERROR, "%s", error_message); } if (fast_order_limit) { + if (sorted_result) { + grn_obj_close(ctx, sorted_result); + } sorted_result = grn_table_create(ctx, NULL, 0, NULL, GRN_OBJ_TABLE_NO_KEY, NULL, @@ -8291,20 +8679,31 @@ FT_INFO *ha_mroonga::generic_ft_init_ext(uint flags, uint key_nr, String *key) FT_INFO *ha_mroonga::wrapper_ft_init_ext(uint flags, uint key_nr, String *key) { MRN_DBUG_ENTER_METHOD(); + FT_INFO *info = generic_ft_init_ext(flags, key_nr, key); + if (!info) { + DBUG_RETURN(NULL); + } + struct st_mrn_ft_info *mrn_ft_info = (struct st_mrn_ft_info *)info; mrn_ft_info->please = &mrn_wrapper_ft_vft; #ifdef HA_CAN_FULLTEXT_EXT mrn_ft_info->could_you = &mrn_wrapper_ft_vft_ext; #endif ++wrap_ft_init_count; + DBUG_RETURN(info); } FT_INFO *ha_mroonga::storage_ft_init_ext(uint flags, uint key_nr, String *key) { MRN_DBUG_ENTER_METHOD(); + FT_INFO *info = generic_ft_init_ext(flags, key_nr, key); + if (!info) { + DBUG_RETURN(NULL); + } + struct st_mrn_ft_info *mrn_ft_info = (struct st_mrn_ft_info *)info; mrn_ft_info->please = &mrn_storage_ft_vft; #ifdef HA_CAN_FULLTEXT_EXT @@ -8453,7 +8852,8 @@ const Item *ha_mroonga::storage_cond_push(const Item *cond) const Item *reminder_cond = cond; if (!pushed_cond) { mrn::ConditionConverter converter(ctx, grn_table, true); - if (converter.find_match_against(cond) && converter.is_convertable(cond)) { + if (converter.count_match_against(cond) == 1 && + converter.is_convertable(cond)) { reminder_cond = NULL; } } @@ -8566,6 +8966,47 @@ bool ha_mroonga::have_unique_index() DBUG_RETURN(false); } +bool ha_mroonga::is_foreign_key_field(const char *table_name, + const char *field_name) +{ + MRN_DBUG_ENTER_METHOD(); + + grn_obj *table = grn_ctx_get(ctx, table_name, -1); + if (!table) { + DBUG_RETURN(false); + } + + mrn::ColumnName column_name(field_name); + grn_obj *column = grn_obj_column(ctx, + table, + column_name.c_str(), + column_name.length()); + if (!column) { + DBUG_RETURN(false); + } + + grn_obj *range = grn_ctx_at(ctx, grn_obj_get_range(ctx, column)); + if (!range) { + DBUG_RETURN(false); + } + + if (!mrn::grn::is_table(range)) { + DBUG_RETURN(false); + } + + grn_obj *foreign_index_column; + mrn::IndexColumnName index_column_name(table_name, field_name); + foreign_index_column = grn_obj_column(ctx, range, + index_column_name.c_str(), + index_column_name.length()); + if (foreign_index_column) { + grn_obj_unlink(ctx, foreign_index_column); + DBUG_RETURN(true); + } + + DBUG_RETURN(false); +} + void ha_mroonga::push_warning_unsupported_spatial_index_search(enum ha_rkey_function flag) { char search_name[MRN_BUFFER_SIZE]; @@ -8745,7 +9186,7 @@ void ha_mroonga::remove_related_files(const char *base_path) if (stat(entry->d_name, &file_status) != 0) { continue; } - if (!((file_status.st_mode & S_IFMT) & S_IFREG)) { + if (!((file_status.st_mode & S_IFMT) && S_IFREG)) { continue; } if (strncmp(entry->d_name, base_path, base_path_length) == 0) { @@ -8806,6 +9247,11 @@ int ha_mroonga::drop_index(MRN_SHARE *target_share, uint key_index) grn_obj *index_table = grn_ctx_get(ctx, index_table_name.c_str(), index_table_name.length()); + if (!index_table) { + index_table = grn_ctx_get(ctx, + index_table_name.old_c_str(), + index_table_name.old_length()); + } if (index_table) { target_name_length = grn_obj_name(ctx, index_table, target_name, GRN_TABLE_MAX_KEY_SIZE); @@ -8953,7 +9399,9 @@ int ha_mroonga::drop_indexes_normal(const char *table_name, grn_obj *table) DBUG_RETURN(error); } -int ha_mroonga::drop_indexes_multiple(const char *table_name, grn_obj *table) +int ha_mroonga::drop_indexes_multiple(const char *table_name, + grn_obj *table, + const char *index_table_name_separator) { MRN_DBUG_ENTER_METHOD(); @@ -8961,7 +9409,7 @@ int ha_mroonga::drop_indexes_multiple(const char *table_name, grn_obj *table) char index_table_name_prefix[GRN_TABLE_MAX_KEY_SIZE]; snprintf(index_table_name_prefix, GRN_TABLE_MAX_KEY_SIZE, - "%s%s", table_name, mrn::IndexTableName::SEPARATOR); + "%s%s", table_name, index_table_name_separator); grn_table_cursor *cursor = grn_table_cursor_open(ctx, grn_ctx_db(ctx), @@ -9050,7 +9498,12 @@ int ha_mroonga::drop_indexes(const char *table_name) error = drop_indexes_normal(table_name, table.get()); if (error == 0) { - error = drop_indexes_multiple(table_name, table.get()); + error = drop_indexes_multiple(table_name, table.get(), + mrn::IndexTableName::SEPARATOR); + } + if (error == 0) { + error = drop_indexes_multiple(table_name, table.get(), + mrn::IndexTableName::OLD_SEPARATOR); } DBUG_RETURN(error); @@ -9177,6 +9630,26 @@ grn_obj *ha_mroonga::find_tokenizer(const char *name, int name_length) DBUG_RETURN(tokenizer); } +bool ha_mroonga::have_custom_normalizer(KEY *key) const +{ + MRN_DBUG_ENTER_METHOD(); + +#ifdef MRN_SUPPORT_CUSTOM_OPTIONS + if (key->option_struct && key->option_struct->normalizer) { + DBUG_RETURN(true); + } +#endif + + if (key->comment.length > 0) { + mrn::ParametersParser parser(key->comment.str, + key->comment.length); + parser.parse(); + DBUG_RETURN(parser["normalizer"] != NULL); + } + + DBUG_RETURN(false); +} + grn_obj *ha_mroonga::find_normalizer(KEY *key) { MRN_DBUG_ENTER_METHOD(); @@ -9223,7 +9696,7 @@ grn_obj *ha_mroonga::find_normalizer(KEY *key, const char *name) DBUG_RETURN(normalizer); } -bool ha_mroonga::find_index_column_flags(KEY *key, grn_obj_flags *index_column_flags) +bool ha_mroonga::find_index_column_flags(KEY *key, grn_column_flags *index_column_flags) { MRN_DBUG_ENTER_METHOD(); bool found = false; @@ -9604,154 +10077,51 @@ bool ha_mroonga::should_normalize(Field *field) const DBUG_RETURN(need_normalize_p); } -bool ha_mroonga::is_temporary_table_name(const char *name) const -{ - MRN_DBUG_ENTER_METHOD(); - DBUG_PRINT("info", ("mroonga: table name = %s", name)); -#ifdef MRN_USE_MYSQL_DATA_HOME - bool temporary_table_name_p = false; - if (name[0] != '.') { - int len = strlen(name); - int mysql_data_home_len = strlen(mysql_data_home); - if (len < mysql_data_home_len || - strncmp(name, mysql_data_home, mysql_data_home_len) || - !strchr(&name[mysql_data_home_len], FN_LIBCHAR)) { - temporary_table_name_p = true; - } - } -#else - bool temporary_table_name_p = (name[0] != '.'); -#endif - DBUG_RETURN(temporary_table_name_p); -} - -void ha_mroonga::check_count_skip(key_part_map start_key_part_map, - key_part_map end_key_part_map, bool fulltext) +void ha_mroonga::check_count_skip(key_part_map target_key_part_map) { MRN_DBUG_ENTER_METHOD(); if (!is_enable_optimization()) { - DBUG_PRINT("info", ("mroonga: count skip: optimization is disabled")); + GRN_LOG(ctx, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] optimization is disabled"); count_skip = false; DBUG_VOID_RETURN; } - st_select_lex *select_lex = table->pos_in_table_list->select_lex; - - if ( - thd_sql_command(ha_thd()) == SQLCOM_SELECT && - select_lex->item_list.elements == 1 && - !select_lex->group_list.elements && - !MRN_SELECT_LEX_GET_HAVING_COND(select_lex) && - select_lex->table_list.elements == 1 - ) { - Item *info = (Item *) select_lex->item_list.first_node()->info; - if ( - info->type() != Item::SUM_FUNC_ITEM || - ((Item_sum *) info)->sum_func() != Item_sum::COUNT_FUNC || - ((Item_sum *) info)->nest_level || - ((Item_sum *) info)->aggr_level || - ((Item_sum *) info)->max_arg_level != -1 || - ((Item_sum *) info)->max_sum_func_level != -1 - ) { - DBUG_PRINT("info", ("mroonga: count skip: sum func is not match")); - count_skip = false; - DBUG_VOID_RETURN; - } + if (thd_sql_command(ha_thd()) != SQLCOM_SELECT) { + GRN_LOG(ctx, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] not SELECT"); + count_skip = false; + DBUG_VOID_RETURN; + } - uint i = 0; - Item *where; - if (fulltext) { - DBUG_PRINT("info", ("mroonga: count skip: fulltext")); - where = MRN_SELECT_LEX_GET_WHERE_COND(select_lex); - if (!where || - where->type() != Item::FUNC_ITEM || - ((Item_func *)where)->functype() != Item_func::FT_FUNC) { - DBUG_PRINT("info", ("mroonga: count skip: ft func is not match")); - count_skip = false; - DBUG_VOID_RETURN; - } - if (select_lex->select_n_where_fields != 1) { - DBUG_PRINT("info", - ("mroonga: count skip: " - "where clause is not fulltext search only")); - count_skip = false; - DBUG_VOID_RETURN; - } - if (share->wrapper_mode && - !(wrap_handler->ha_table_flags() & HA_NO_TRANSACTIONS)) { - DBUG_PRINT("info", ("mroonga: count skip: transactional wrapper mode")); - count_skip = false; - DBUG_VOID_RETURN; - } - DBUG_PRINT("info", ("mroonga: count skip: skip enabled")); - count_skip = true; - mrn_count_skip++; - DBUG_VOID_RETURN; - } else if (share->wrapper_mode) { - DBUG_PRINT("info", ("mroonga: count skip: wrapper mode")); - count_skip = false; - DBUG_VOID_RETURN; - } else { - DBUG_PRINT("info", ("mroonga: count skip: without fulltext")); - uint key_nr = active_index; - KEY *key_info = &(table->key_info[key_nr]); - KEY_PART_INFO *key_part = key_info->key_part; - for (where = MRN_SELECT_LEX_GET_WHERE_COND(select_lex); - where; - where = where->next) { - Item *target = where; - - if (where->type() == Item::FUNC_ITEM) { - Item_func *func_item = static_cast(where); - if (func_item->argument_count() == 0) { - break; - } - target = func_item->key_item(); - where = where->next; - if (func_item->arguments()[0] == where) { - uint n_args = func_item->argument_count(); - for (; n_args > 0; --n_args) { - where = where->next; - } - } - } + if (share->wrapper_mode && + !(wrap_handler->ha_table_flags() & HA_NO_TRANSACTIONS)) { + GRN_LOG(ctx, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] wrapped engine is transactional"); + count_skip = false; + DBUG_VOID_RETURN; + } - if (target->type() == Item::FIELD_ITEM) - { - Field *field = ((Item_field *)target)->field; - if (!field) - break; - if (field->table != table) - break; - uint j; - for (j = 0; j < KEY_N_KEY_PARTS(key_info); j++) { - if (key_part[j].field == field) - { - if (!(start_key_part_map >> j) && !(end_key_part_map >> j)) - j = KEY_N_KEY_PARTS(key_info); - else - i++; - break; - } - } - if (j >= KEY_N_KEY_PARTS(key_info)) - break; - } - if (i >= select_lex->select_n_where_fields) - { - DBUG_PRINT("info", ("mroonga: count skip: skip enabled")); - count_skip = true; - mrn_count_skip++; - DBUG_VOID_RETURN; - } - } - DBUG_PRINT("info", ("mroonga: count skip: skip disabled")); - } + st_select_lex *select_lex = table->pos_in_table_list->select_lex; + KEY *key_info = NULL; + if (active_index != MAX_KEY) { + key_info = &(table->key_info[active_index]); + } + mrn::CountSkipChecker checker(ctx, + table, + select_lex, + key_info, + target_key_part_map, + !share->wrapper_mode); + if (checker.check()) { + count_skip = true; + mrn_count_skip++; + DBUG_VOID_RETURN; + } else { + count_skip = false; + DBUG_VOID_RETURN; } - DBUG_PRINT("info", ("mroonga: count skip: select type is not match")); - count_skip = false; - DBUG_VOID_RETURN; } bool ha_mroonga::is_grn_zero_column_value(grn_obj *column, grn_obj *value) @@ -9861,15 +10231,22 @@ void ha_mroonga::check_fast_order_limit(grn_table_sort_key **sort_keys, if (!converter.is_convertable(where)) { DBUG_PRINT("info", ("mroonga: fast_order_limit = false: " - "not groonga layer condition search")); + "not Groonga layer condition search")); + fast_order_limit = false; + DBUG_VOID_RETURN; + } + unsigned int n_match_againsts = converter.count_match_against(where); + if (n_match_againsts == 0) { + DBUG_PRINT("info", + ("mroonga: fast_order_limit = false: " + "Groonga layer condition but not fulltext search")); fast_order_limit = false; DBUG_VOID_RETURN; } - match_against = converter.find_match_against(where); - if (!match_against) { + if (n_match_againsts > 1) { DBUG_PRINT("info", ("mroonga: fast_order_limit = false: " - "groonga layer condition but not fulltext search")); + "MATCH AGAINST must be only one")); fast_order_limit = false; DBUG_VOID_RETURN; } @@ -9890,8 +10267,7 @@ void ha_mroonga::check_fast_order_limit(grn_table_sort_key **sort_keys, if (item->type() == Item::FIELD_ITEM) { Field *field = static_cast(item)->field; - const char *column_name = field->field_name; - int column_name_size = strlen(column_name); + mrn::ColumnName column_name(field->field_name); if (should_normalize(field)) { @@ -9906,7 +10282,8 @@ void ha_mroonga::check_fast_order_limit(grn_table_sort_key **sort_keys, if (is_storage_mode) { (*sort_keys)[i].key = grn_obj_column(ctx, matched_record_keys, - column_name, column_name_size); + column_name.c_str(), + column_name.length()); } else { if (is_primary_key_field(field)) { (*sort_keys)[i].key = grn_obj_column(ctx, matched_record_keys, @@ -10365,6 +10742,20 @@ int ha_mroonga::generic_store_bulk_geometry(Field *field, grn_obj *buf) DBUG_RETURN(error); } +#ifdef MRN_HAVE_MYSQL_TYPE_JSON +int ha_mroonga::generic_store_bulk_json(Field *field, grn_obj *buf) +{ + MRN_DBUG_ENTER_METHOD(); + int error = 0; + String buffer; + Field_json *json = static_cast(field); + String *value = json->val_str(&buffer, NULL); + grn_obj_reinit(ctx, buf, GRN_DB_TEXT, 0); + GRN_TEXT_SET(ctx, buf, value->ptr(), value->length()); + DBUG_RETURN(error); +} +#endif + int ha_mroonga::generic_store_bulk(Field *field, grn_obj *buf) { MRN_DBUG_ENTER_METHOD(); @@ -10455,6 +10846,11 @@ int ha_mroonga::generic_store_bulk(Field *field, grn_obj *buf) case MYSQL_TYPE_GEOMETRY: error = generic_store_bulk_geometry(field, buf); break; +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + case MYSQL_TYPE_JSON: + error = generic_store_bulk_json(field, buf); + break; +#endif default: error = HA_ERR_UNSUPPORTED; break; @@ -10815,6 +11211,18 @@ void ha_mroonga::storage_store_field_geometry(Field *field, DBUG_VOID_RETURN; } +#ifdef MRN_HAVE_MYSQL_TYPE_JSON +void ha_mroonga::storage_store_field_json(Field *field, + const char *value, + uint value_length) +{ + MRN_DBUG_ENTER_METHOD(); + Field_json *json = static_cast(field); + json->store(value, value_length, field->charset()); + DBUG_VOID_RETURN; +} +#endif + void ha_mroonga::storage_store_field(Field *field, const char *value, uint value_length) { @@ -10898,6 +11306,11 @@ void ha_mroonga::storage_store_field(Field *field, case MYSQL_TYPE_GEOMETRY: storage_store_field_geometry(field, value, value_length); break; +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + case MYSQL_TYPE_JSON: + storage_store_field_json(field, value, value_length); + break; +#endif } } @@ -10906,6 +11319,10 @@ void ha_mroonga::storage_store_field_column(Field *field, bool is_primary_key, { MRN_DBUG_ENTER_METHOD(); + if (!grn_columns[nth_column]) { + DBUG_VOID_RETURN; + } + grn_obj *column = grn_columns[nth_column]; grn_id range_id = grn_obj_get_range(ctx, column); grn_obj *range = grn_column_ranges[nth_column]; @@ -11041,6 +11458,11 @@ void ha_mroonga::storage_store_fields_for_prep_update(const uchar *old_data, for (i = 0; i < n_columns; i++) { Field *field = table->field[i]; +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif if ( !bitmap_is_set(table->read_set, field->field_index) && !bitmap_is_set(table->write_set, field->field_index) && @@ -11658,8 +12080,10 @@ int ha_mroonga::storage_encode_multiple_column_key(KEY *key_info, } int ha_mroonga::storage_encode_multiple_column_key_range(KEY *key_info, - const key_range *start, - const key_range *end, + const uchar *start, + uint start_size, + const uchar *end, + uint end_size, uchar *min_buffer, uint *min_encoded_size, uchar *max_buffer, @@ -11671,14 +12095,14 @@ int ha_mroonga::storage_encode_multiple_column_key_range(KEY *key_info, uint encoded_key_size = codec.size(); if (start) { memset(min_buffer, 0, encoded_key_size); - error = codec.encode(start->key, start->length, + error = codec.encode(start, start_size, min_buffer, min_encoded_size); // TODO: handle error? *min_encoded_size = encoded_key_size; } if (end) { memset(max_buffer, 0xff, encoded_key_size); - error = codec.encode(end->key, end->length, + error = codec.encode(end, end_size, max_buffer, max_encoded_size); // TODO: handle error? *max_encoded_size = encoded_key_size; @@ -11686,6 +12110,40 @@ int ha_mroonga::storage_encode_multiple_column_key_range(KEY *key_info, DBUG_RETURN(error); } +int ha_mroonga::storage_encode_multiple_column_key_range(KEY *key_info, + const key_range *start, + const key_range *end, + uchar *min_buffer, + uint *min_encoded_size, + uchar *max_buffer, + uint *max_encoded_size) +{ + MRN_DBUG_ENTER_METHOD(); + + const uchar *start_data = NULL; + uint start_size = 0; + const uchar *end_data = NULL; + uint end_size = 0; + if (start) { + start_data = start->key; + start_size = start->length; + } + if (end) { + end_data = end->key; + end_size = end->length; + } + + int error = storage_encode_multiple_column_key_range(key_info, + start_data, start_size, + end_data, end_size, + min_buffer, + min_encoded_size, + max_buffer, + max_encoded_size); + + DBUG_RETURN(error); +} + int ha_mroonga::generic_reset() { MRN_DBUG_ENTER_METHOD(); @@ -12349,6 +12807,29 @@ int ha_mroonga::storage_delete_all_rows() { MRN_DBUG_ENTER_METHOD(); int error = generic_delete_all_rows(grn_table, __FUNCTION__); + if (!error) { + uint n_keys = table->s->keys; + for (uint i = 0; i < n_keys; i++) { + if (i == table->s->primary_key) { + continue; + } + + KEY *key_info = &(table->key_info[i]); + if (!(key_info->flags & HA_NOSAME)) { + continue; + } + + grn_obj *index_table = grn_index_tables[i]; + if (!index_table) { + continue; + } + + error = generic_delete_all_rows(index_table, __FUNCTION__); + if (error) { + break; + } + } + } DBUG_RETURN(error); } @@ -12512,6 +12993,10 @@ int ha_mroonga::truncate() } else { error = storage_truncate(); } + if (!error) { + operations_->clear(table->s->table_name.str, + table->s->table_name.length); + } DBUG_RETURN(error); } @@ -12592,6 +13077,7 @@ double ha_mroonga::read_time(uint index, uint ranges, ha_rows rows) DBUG_RETURN(time); } +#ifdef MRN_HANDLER_HAVE_KEYS_TO_USE_FOR_SCANNING const key_map *ha_mroonga::wrapper_keys_to_use_for_scanning() { const key_map *res; @@ -12622,6 +13108,7 @@ const key_map *ha_mroonga::keys_to_use_for_scanning() } DBUG_RETURN(key_map); } +#endif ha_rows ha_mroonga::wrapper_estimate_rows_upper_bound() { @@ -12776,11 +13263,16 @@ int ha_mroonga::wrapper_rename_index(const char *from, const char *to, for (i = 0; i < tmp_table_share->keys; i++) { const char *mysql_index_name = tmp_table_share->key_info[i].name; mrn::IndexTableName from_index_table_name(from_table_name, mysql_index_name); - mrn::IndexTableName to_index_table_name(to_table_name, mysql_index_name); + mrn::IndexTableName to_index_table_name(to_table_name, mysql_index_name); grn_obj *index_table; index_table = grn_ctx_get(ctx, from_index_table_name.c_str(), from_index_table_name.length()); + if (!index_table) { + index_table = grn_ctx_get(ctx, + from_index_table_name.old_c_str(), + from_index_table_name.old_length()); + } if (index_table) { rc = grn_table_rename(ctx, index_table, to_index_table_name.c_str(), @@ -12846,6 +13338,11 @@ int ha_mroonga::storage_rename_table(const char *from, const char *to, index_table = grn_ctx_get(ctx, from_index_table_name.c_str(), from_index_table_name.length()); + if (!index_table) { + index_table = grn_ctx_get(ctx, + from_index_table_name.old_c_str(), + from_index_table_name.old_length()); + } if (index_table) { rc = grn_table_rename(ctx, index_table, to_index_table_name.c_str(), @@ -12899,34 +13396,32 @@ int ha_mroonga::storage_rename_foreign_key(MRN_SHARE *tmp_share, MRN_DBUG_ENTER_METHOD(); for (i = 0; i < n_columns; ++i) { Field *field = tmp_table_share->field[i]; - const char *column_name = field->field_name; - uint column_name_size = strlen(column_name); - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (!is_foreign_key_field(from_table_name, field->field_name)) { continue; } - column = grn_obj_column(ctx, grn_table, - column_name, column_name_size); + grn_obj *grn_from_table = grn_ctx_get(ctx, from_table_name, -1); + mrn::ColumnName column_name(field->field_name); + column = grn_obj_column(ctx, + grn_from_table, + column_name.c_str(), + column_name.length()); if (!column) { continue; } grn_id ref_table_id = grn_obj_get_range(ctx, column); grn_obj *ref_table = grn_ctx_at(ctx, ref_table_id); - if (ref_table->header.type != GRN_TABLE_NO_KEY && - ref_table->header.type != GRN_TABLE_HASH_KEY && - ref_table->header.type != GRN_TABLE_PAT_KEY && - ref_table->header.type != GRN_TABLE_DAT_KEY) { - continue; - } - mrn::IndexColumnName from_index_column_name(from_table_name, column_name); + mrn::IndexColumnName from_index_column_name(from_table_name, + column_name.c_str()); ref_column = grn_obj_column(ctx, ref_table, from_index_column_name.c_str(), from_index_column_name.length()); if (!ref_column) { continue; } - mrn::IndexColumnName to_index_column_name(to_table_name, column_name); + mrn::IndexColumnName to_index_column_name(to_table_name, + column_name.c_str()); rc = grn_column_rename(ctx, ref_column, to_index_column_name.c_str(), to_index_column_name.length()); @@ -13109,6 +13604,11 @@ int ha_mroonga::generic_disable_index(int i, KEY *key_info) grn_obj *index_table = grn_ctx_get(ctx, index_table_name.c_str(), index_table_name.length()); + if (!index_table) { + index_table = grn_ctx_get(ctx, + index_table_name.old_c_str(), + index_table_name.old_length()); + } if (index_table) { grn_obj_remove(ctx, index_table); } @@ -13125,6 +13625,42 @@ int ha_mroonga::generic_disable_index(int i, KEY *key_info) DBUG_RETURN(error); } +int ha_mroonga::wrapper_disable_indexes_mroonga(uint mode) +{ + int error = 0; + MRN_DBUG_ENTER_METHOD(); + if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) { + uint i; + for (i = 0; i < table_share->keys; i++) { + if (i == table->s->primary_key) { + continue; + } + if (share->wrap_key_nr[i] < MAX_KEY) { + continue; + } + if (!grn_index_tables[i]) { + DBUG_PRINT("info", ("mroonga: keys are disabled already %u", i)); + DBUG_RETURN(0); + } + } + KEY *key_info = table_share->key_info; + for (i = 0; i < table_share->keys; i++) { + if (!(key_info[i].flags & HA_FULLTEXT) && + !mrn_is_geo_key(&key_info[i])) { + continue; + } + + int sub_error = generic_disable_index(i, key_info); + if (error != 0 && sub_error != 0) { + error = sub_error; + } + } + } else { + error = HA_ERR_WRONG_COMMAND; + } + DBUG_RETURN(error); +} + int ha_mroonga::wrapper_disable_indexes(uint mode) { int error = 0; @@ -13138,35 +13674,7 @@ int ha_mroonga::wrapper_disable_indexes(uint mode) error = 0; } if (!error) { - if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) { - uint i; - for (i = 0; i < table_share->keys; i++) { - if (i == table->s->primary_key) { - continue; - } - if (share->wrap_key_nr[i] < MAX_KEY) { - continue; - } - if (!grn_index_tables[i]) { - DBUG_PRINT("info", ("mroonga: keys are disabled already %u", i)); - DBUG_RETURN(0); - } - } - KEY *key_info = table_share->key_info; - for (i = 0; i < table_share->keys; i++) { - if (!(key_info[i].flags & HA_FULLTEXT) && - !mrn_is_geo_key(&key_info[i])) { - continue; - } - - int sub_error = generic_disable_index(i, key_info); - if (error != 0 && sub_error != 0) { - error = sub_error; - } - } - } else { - error = HA_ERR_WRONG_COMMAND; - } + error = wrapper_disable_indexes_mroonga(mode); } DBUG_RETURN(error); } @@ -13220,9 +13728,9 @@ int ha_mroonga::disable_indexes(uint mode) DBUG_RETURN(error); } -int ha_mroonga::wrapper_enable_indexes(uint mode) +int ha_mroonga::wrapper_enable_indexes_mroonga(uint mode) { - int error = 0, tmp_error = 0; + int error = 0; MRN_DBUG_ENTER_METHOD(); if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) { uint i, j; @@ -13293,8 +13801,17 @@ int ha_mroonga::wrapper_enable_indexes(uint mode) MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables); MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns); } else { - tmp_error = HA_ERR_WRONG_COMMAND; + error = HA_ERR_WRONG_COMMAND; } + DBUG_RETURN(error); +} + +int ha_mroonga::wrapper_enable_indexes(uint mode) +{ + int error = 0; + MRN_DBUG_ENTER_METHOD(); + + int mroonga_error = wrapper_enable_indexes_mroonga(mode); MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); @@ -13302,7 +13819,7 @@ int ha_mroonga::wrapper_enable_indexes(uint mode) MRN_SET_BASE_SHARE_KEY(share, table->s); MRN_SET_BASE_TABLE_KEY(this, table); if (error == HA_ERR_WRONG_COMMAND) { - error = tmp_error; + error = mroonga_error; } DBUG_RETURN(error); } @@ -13416,10 +13933,10 @@ int ha_mroonga::storage_check(THD* thd, HA_CHECK_OPT* check_opt) { MRN_DBUG_ENTER_METHOD(); mrn::DatabaseRepairer repairer(ctx, thd); - if (repairer.repair()) { - DBUG_RETURN(HA_ADMIN_OK); - } else { + if (repairer.is_corrupt()) { DBUG_RETURN(HA_ADMIN_CORRUPT); + } else { + DBUG_RETURN(HA_ADMIN_OK); } } @@ -13575,10 +14092,16 @@ int ha_mroonga::wrapper_recreate_indexes(THD *thd) "%s.%s", index_table_name.c_str(), INDEX_COLUMN_NAME); remove_grn_obj_force(index_column_full_name); remove_grn_obj_force(index_table_name.c_str()); + + char index_column_full_old_name[MRN_MAX_PATH_SIZE]; + snprintf(index_column_full_old_name, MRN_MAX_PATH_SIZE, + "%s.%s", index_table_name.old_c_str(), INDEX_COLUMN_NAME); + remove_grn_obj_force(index_column_full_old_name); + remove_grn_obj_force(index_table_name.old_c_str()); + mrn_set_bitmap_by_key(table->read_set, &key_info[i]); } - error = wrapper_create_index(table_share->normalized_path.str, table, - NULL, share, mapper.table_name()); + error = wrapper_create_index(table_share->normalized_path.str, table, share); if (error) DBUG_RETURN(error); error = wrapper_open_indexes(table_share->normalized_path.str); @@ -13627,6 +14150,12 @@ int ha_mroonga::storage_recreate_indexes(THD *thd) "%s.%s", index_table_name.c_str(), INDEX_COLUMN_NAME); remove_grn_obj_force(index_column_full_name); remove_grn_obj_force(index_table_name.c_str()); + + char index_column_full_old_name[MRN_MAX_PATH_SIZE]; + snprintf(index_column_full_old_name, MRN_MAX_PATH_SIZE, + "%s.%s", index_table_name.old_c_str(), INDEX_COLUMN_NAME); + remove_grn_obj_force(index_column_full_old_name); + remove_grn_obj_force(index_table_name.old_c_str()); } int error; @@ -13969,8 +14498,8 @@ enum_alter_inplace_result ha_mroonga::wrapper_check_if_supported_inplace_alter( ( Alter_inplace_info::ADD_COLUMN | Alter_inplace_info::DROP_COLUMN | - Alter_inplace_info::ALTER_COLUMN_TYPE | - Alter_inplace_info::ALTER_COLUMN_ORDER | + MRN_ALTER_INPLACE_INFO_ALTER_STORED_COLUMN_TYPE | + MRN_ALTER_INPLACE_INFO_ALTER_STORED_COLUMN_ORDER | Alter_inplace_info::ALTER_COLUMN_NULLABLE | Alter_inplace_info::ALTER_COLUMN_NOT_NULLABLE | Alter_inplace_info::ALTER_COLUMN_STORAGE_TYPE | @@ -14082,15 +14611,22 @@ enum_alter_inplace_result ha_mroonga::storage_check_if_supported_inplace_alter( Alter_inplace_info *ha_alter_info) { MRN_DBUG_ENTER_METHOD(); + Alter_inplace_info::HA_ALTER_FLAGS explicitly_unsupported_flags = + Alter_inplace_info::ADD_FOREIGN_KEY | + Alter_inplace_info::DROP_FOREIGN_KEY; Alter_inplace_info::HA_ALTER_FLAGS supported_flags = Alter_inplace_info::ADD_INDEX | Alter_inplace_info::DROP_INDEX | Alter_inplace_info::ADD_UNIQUE_INDEX | Alter_inplace_info::DROP_UNIQUE_INDEX | - Alter_inplace_info::ADD_COLUMN | + MRN_ALTER_INPLACE_INFO_ADD_VIRTUAL_COLUMN | + MRN_ALTER_INPLACE_INFO_ADD_STORED_BASE_COLUMN | + MRN_ALTER_INPLACE_INFO_ADD_STORED_GENERATED_COLUMN | Alter_inplace_info::DROP_COLUMN | Alter_inplace_info::ALTER_COLUMN_NAME; - if (ha_alter_info->handler_flags & supported_flags) { + if (ha_alter_info->handler_flags & explicitly_unsupported_flags) { + DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); + } else if (ha_alter_info->handler_flags & supported_flags) { DBUG_RETURN(HA_ALTER_INPLACE_EXCLUSIVE_LOCK); } else { DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); @@ -14284,18 +14820,11 @@ bool ha_mroonga::wrapper_inplace_alter_table( need_fill_index = true; } if (!error && need_fill_index) { - my_ptrdiff_t ptr_diff = PTR_BYTE_DIFF(table->record[0], altered_table->record[0]); - uint n_columns = altered_table->s->fields; - for (i = 0; i < n_columns; ++i) { - Field *field = altered_table->field[i]; - field->move_field_offset(ptr_diff); - } + my_ptrdiff_t diff = + PTR_BYTE_DIFF(table->record[0], altered_table->record[0]); + mrn::TableFieldsOffsetMover mover(altered_table, diff); error = wrapper_fill_indexes(ha_thd(), altered_table->key_info, index_columns, ha_alter_info->key_count); - for (i = 0; i < n_columns; ++i) { - Field *field = altered_table->field[i]; - field->move_field_offset(-ptr_diff); - } } bitmap_set_all(table->read_set); @@ -14354,31 +14883,12 @@ bool ha_mroonga::wrapper_inplace_alter_table( DBUG_RETURN(result); } -bool ha_mroonga::storage_inplace_alter_table_index( +bool ha_mroonga::storage_inplace_alter_table_add_index( TABLE *altered_table, Alter_inplace_info *ha_alter_info) { MRN_DBUG_ENTER_METHOD(); - bool have_error = false; - int error = 0; - uint n_keys; - uint i, j = 0; - KEY *key_info = table_share->key_info; - mrn::PathMapper mapper(share->table_name); - n_keys = ha_alter_info->index_drop_count; - for (i = 0; i < n_keys; ++i) { - KEY *key = ha_alter_info->index_drop_buffer[i]; - while (strcmp(key_info[j].name, key->name)) { - ++j; - } - error = drop_index(share, j); - if (error) - DBUG_RETURN(true); - grn_index_tables[j] = NULL; - grn_index_columns[j] = NULL; - } - MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_tables, ha_alter_info->key_count); MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_columns, @@ -14424,11 +14934,11 @@ bool ha_mroonga::storage_inplace_alter_table_index( KEY *p_key_info = &table->key_info[table_share->primary_key]; mrn_set_bitmap_by_key(table->read_set, p_key_info); } - n_keys = ha_alter_info->index_add_count; - for (i = 0; i < n_keys; ++i) { + int error = 0; + uint n_keys = ha_alter_info->index_add_count; + for (uint i = 0; i < n_keys; ++i) { uint key_pos = ha_alter_info->index_add_buffer[i]; - KEY *key = - &altered_table->key_info[key_pos]; + KEY *key = &altered_table->key_info[key_pos]; if (share->disable_keys && !(key->flags & HA_NOSAME)) { continue; // key is disabled } @@ -14437,6 +14947,7 @@ bool ha_mroonga::storage_inplace_alter_table_index( break; } DBUG_PRINT("info", ("mroonga: add key pos=%u", key_pos)); + mrn::PathMapper mapper(share->table_name); if ((error = storage_create_index(table, mapper.table_name(), grn_table, tmp_share, key, index_tables, index_columns, key_pos))) @@ -14464,12 +14975,9 @@ bool ha_mroonga::storage_inplace_alter_table_index( } } if (!error && have_multiple_column_index) { - my_ptrdiff_t ptr_diff = PTR_BYTE_DIFF(table->record[0], altered_table->record[0]); - uint n_columns = altered_table->s->fields; - for (i = 0; i < n_columns; ++i) { - Field *field = altered_table->field[i]; - field->move_field_offset(ptr_diff); - } + my_ptrdiff_t diff = + PTR_BYTE_DIFF(table->record[0], altered_table->record[0]); + mrn::TableFieldsOffsetMover mover(altered_table, diff); error = storage_add_index_multiple_columns(altered_table->key_info, ha_alter_info->key_count, index_tables, @@ -14480,17 +14988,14 @@ bool ha_mroonga::storage_inplace_alter_table_index( } else if (error) { my_message(error, "failed to create multiple column index", MYF(0)); } - for (i = 0; i < n_columns; ++i) { - Field *field = altered_table->field[i]; - field->move_field_offset(-ptr_diff); - } } bitmap_set_all(table->read_set); + bool have_error = false; if (error) { n_keys = ha_alter_info->index_add_count; - for (i = 0; i < n_keys; ++i) { + for (uint i = 0; i < n_keys; ++i) { uint key_pos = ha_alter_info->index_add_buffer[i]; KEY *key = &altered_table->key_info[key_pos]; @@ -14513,6 +15018,33 @@ bool ha_mroonga::storage_inplace_alter_table_index( DBUG_RETURN(have_error); } +bool ha_mroonga::storage_inplace_alter_table_drop_index( + TABLE *altered_table, + Alter_inplace_info *ha_alter_info) +{ + MRN_DBUG_ENTER_METHOD(); + + bool have_error = false; + uint n_keys; + uint i, j = 0; + KEY *key_info = table_share->key_info; + mrn::PathMapper mapper(share->table_name); + n_keys = ha_alter_info->index_drop_count; + for (i = 0; i < n_keys; ++i) { + KEY *key = ha_alter_info->index_drop_buffer[i]; + while (strcmp(key_info[j].name, key->name) != 0) { + ++j; + } + int error = drop_index(share, j); + if (error != 0) + DBUG_RETURN(true); + grn_index_tables[j] = NULL; + grn_index_columns[j] = NULL; + } + + DBUG_RETURN(have_error); +} + bool ha_mroonga::storage_inplace_alter_table_add_column( TABLE *altered_table, Alter_inplace_info *ha_alter_info) @@ -14566,9 +15098,14 @@ bool ha_mroonga::storage_inplace_alter_table_add_column( } Field *field = altered_table->s->field[i]; - const char *column_name = field->field_name; - int column_name_size = strlen(column_name); +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif + + mrn::ColumnName column_name(field->field_name); int error = mrn_add_column_param(tmp_share, field, i); if (error) { have_error = true; @@ -14593,20 +15130,114 @@ bool ha_mroonga::storage_inplace_alter_table_add_column( char *col_path = NULL; // we don't specify path grn_obj *column_obj = - grn_column_create(ctx, table_obj, column_name, column_name_size, + grn_column_create(ctx, table_obj, + column_name.c_str(), + column_name.length(), col_path, col_flags, col_type); if (ctx->rc) { error = ER_WRONG_COLUMN_NAME; my_message(error, ctx->errbuf, MYF(0)); have_error = true; - } - if (column_obj) { - grn_obj_unlink(ctx, column_obj); + break; } - if (have_error) { - break; +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field)) { +# ifndef MRN_MARIADB_P + MY_BITMAP generated_column_bitmap; + if (bitmap_init(&generated_column_bitmap, NULL, + altered_table->s->fields, false)) { + error = HA_ERR_OUT_OF_MEM; + my_message(ER_OUTOFMEMORY, + "mroonga: storage: " + "failed to allocate memory for getting generated value", + MYF(0)); + have_error = true; + grn_obj_remove(ctx, column_obj); + break; + } + mrn::SmartBitmap smart_generated_column_bitmap(&generated_column_bitmap); + bitmap_set_bit(&generated_column_bitmap, field->field_index); +# endif + + my_ptrdiff_t diff = + PTR_BYTE_DIFF(table->record[0], altered_table->record[0]); + mrn::TableFieldsOffsetMover mover(altered_table, diff); + + error = storage_rnd_init(true); + if (error) { + have_error = true; + grn_obj_remove(ctx, column_obj); + break; + } + + Field *altered_field = altered_table->field[i]; + grn_obj new_value; + GRN_VOID_INIT(&new_value); + mrn::SmartGrnObj smart_new_value(ctx, &new_value); + while (!have_error) { + int next_error = storage_rnd_next(table->record[0]); + if (next_error == HA_ERR_END_OF_FILE) { + break; + } else if (next_error != 0) { + error = next_error; + have_error = true; + grn_obj_remove(ctx, column_obj); + break; + } + +# ifdef MRN_MARIADB_P + MRN_GENERATED_COLUMNS_UPDATE_VIRTUAL_FIELD(altered_table, altered_field); +# else + if (update_generated_write_fields(&generated_column_bitmap, altered_table)) { + error = ER_ERROR_ON_WRITE; + my_message(error, + "mroonga: storage: " + "failed to update generated value for updating column", + MYF(0)); + have_error = true; + grn_obj_remove(ctx, column_obj); + break; + } +# endif + + error = mrn_change_encoding(ctx, altered_field->charset()); + if (error) { + my_message(error, + "mroonga: storage: " + "failed to change encoding to store generated value", + MYF(0)); + have_error = true; + grn_obj_remove(ctx, column_obj); + break; + } + error = generic_store_bulk(altered_field, &new_value); + if (error) { + my_message(error, + "mroonga: storage: " + "failed to get generated value for updating column", + MYF(0)); + have_error = true; + grn_obj_remove(ctx, column_obj); + break; + } + + grn_obj_set_value(ctx, column_obj, record_id, &new_value, GRN_OBJ_SET); + if (ctx->rc) { + error = ER_ERROR_ON_WRITE; + my_message(error, ctx->errbuf, MYF(0)); + break; + } + } + + int end_error = storage_rnd_end(); + if (end_error != 0 && error == 0) { + error = end_error; + grn_obj_remove(ctx, column_obj); + break; + } } +#endif } grn_obj_unlink(ctx, table_obj); @@ -14736,16 +15367,14 @@ bool ha_mroonga::storage_inplace_alter_table( have_error = true; } - Alter_inplace_info::HA_ALTER_FLAGS index_related_flags = - Alter_inplace_info::ADD_INDEX | + Alter_inplace_info::HA_ALTER_FLAGS drop_index_related_flags = Alter_inplace_info::DROP_INDEX | - Alter_inplace_info::ADD_UNIQUE_INDEX | Alter_inplace_info::DROP_UNIQUE_INDEX | - Alter_inplace_info::ADD_PK_INDEX | Alter_inplace_info::DROP_PK_INDEX; if (!have_error && - (ha_alter_info->handler_flags & index_related_flags)) { - have_error = storage_inplace_alter_table_index(altered_table, ha_alter_info); + (ha_alter_info->handler_flags & drop_index_related_flags)) { + have_error = storage_inplace_alter_table_drop_index(altered_table, + ha_alter_info); } Alter_inplace_info::HA_ALTER_FLAGS add_column_related_flags = @@ -14769,6 +15398,16 @@ bool ha_mroonga::storage_inplace_alter_table( have_error = storage_inplace_alter_table_rename_column(altered_table, ha_alter_info); } + Alter_inplace_info::HA_ALTER_FLAGS add_index_related_flags = + Alter_inplace_info::ADD_INDEX | + Alter_inplace_info::ADD_UNIQUE_INDEX | + Alter_inplace_info::ADD_PK_INDEX; + if (!have_error && + (ha_alter_info->handler_flags & add_index_related_flags)) { + have_error = storage_inplace_alter_table_add_index(altered_table, + ha_alter_info); + } + DBUG_RETURN(have_error); } @@ -15874,26 +16513,22 @@ char *ha_mroonga::storage_get_foreign_key_create_info() create_info_str.length(0); for (i = 0; i < n_columns; ++i) { Field *field = table_share->field[i]; - const char *column_name = field->field_name; - uint column_name_size = strlen(column_name); - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (!is_foreign_key_field(table_share->table_name.str, + field->field_name)) { continue; } - column = grn_obj_column(ctx, grn_table, - column_name, column_name_size); + mrn::ColumnName column_name(field->field_name); + column = grn_obj_column(ctx, + grn_table, + column_name.c_str(), + column_name.length()); if (!column) { continue; } grn_id ref_table_id = grn_obj_get_range(ctx, column); grn_obj *ref_table = grn_ctx_at(ctx, ref_table_id); - if (ref_table->header.type != GRN_TABLE_NO_KEY && - ref_table->header.type != GRN_TABLE_HASH_KEY && - ref_table->header.type != GRN_TABLE_PAT_KEY && - ref_table->header.type != GRN_TABLE_DAT_KEY) { - continue; - } char ref_table_buff[NAME_LEN + 1]; int ref_table_name_length = grn_obj_name(ctx, ref_table, ref_table_buff, NAME_LEN); @@ -15903,14 +16538,18 @@ char *ha_mroonga::storage_get_foreign_key_create_info() DBUG_RETURN(NULL); } create_info_str.q_append(",\n CONSTRAINT ", 15); - append_identifier(ha_thd(), &create_info_str, column_name, - column_name_size); + append_identifier(ha_thd(), + &create_info_str, + column_name.c_str(), + column_name.length()); if (create_info_str.reserve(14)) { DBUG_RETURN(NULL); } create_info_str.q_append(" FOREIGN KEY (", 14); - append_identifier(ha_thd(), &create_info_str, column_name, - column_name_size); + append_identifier(ha_thd(), + &create_info_str, + column_name.c_str(), + column_name.length()); if (create_info_str.reserve(13)) { DBUG_RETURN(NULL); } @@ -16081,37 +16720,35 @@ int ha_mroonga::storage_get_foreign_key_list(THD *thd, MRN_DBUG_ENTER_METHOD(); for (i = 0; i < n_columns; ++i) { Field *field = table_share->field[i]; - const char *column_name = field->field_name; - uint column_name_size = strlen(column_name); - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (!is_foreign_key_field(table_share->table_name.str, field->field_name)) { continue; } - column = grn_obj_column(ctx, grn_table, - column_name, column_name_size); + mrn::ColumnName column_name(field->field_name); + column = grn_obj_column(ctx, + grn_table, + column_name.c_str(), + column_name.length()); if (!column) { continue; } grn_id ref_table_id = grn_obj_get_range(ctx, column); grn_obj *ref_table = grn_ctx_at(ctx, ref_table_id); - if (ref_table->header.type != GRN_TABLE_NO_KEY && - ref_table->header.type != GRN_TABLE_HASH_KEY && - ref_table->header.type != GRN_TABLE_PAT_KEY && - ref_table->header.type != GRN_TABLE_DAT_KEY) { - continue; - } FOREIGN_KEY_INFO f_key_info; - f_key_info.foreign_id = thd_make_lex_string(thd, NULL, column_name, - column_name_size, TRUE); + f_key_info.foreign_id = thd_make_lex_string(thd, + NULL, + column_name.c_str(), + column_name.length(), + TRUE); f_key_info.foreign_db = thd_make_lex_string(thd, NULL, - table_share->db.str, - table_share->db.length, - TRUE); + table_share->db.str, + table_share->db.length, + TRUE); f_key_info.foreign_table = thd_make_lex_string(thd, NULL, - table_share->table_name.str, - table_share->table_name.length, - TRUE); + table_share->table_name.str, + table_share->table_name.length, + TRUE); f_key_info.referenced_db = f_key_info.foreign_db; char ref_table_buff[NAME_LEN + 1]; @@ -16124,14 +16761,22 @@ int ha_mroonga::storage_get_foreign_key_list(THD *thd, ref_table_buff, ref_table_name_length, TRUE); +#ifdef MRN_FOREIGN_KEY_USE_METHOD_ENUM + f_key_info.update_method = FK_OPTION_RESTRICT; + f_key_info.delete_method = FK_OPTION_RESTRICT; +#else f_key_info.update_method = thd_make_lex_string(thd, NULL, "RESTRICT", 8, TRUE); f_key_info.delete_method = thd_make_lex_string(thd, NULL, "RESTRICT", 8, TRUE); +#endif f_key_info.referenced_key_name = thd_make_lex_string(thd, NULL, "PRIMARY", 7, TRUE); - LEX_STRING *field_name = thd_make_lex_string(thd, NULL, column_name, - column_name_size, TRUE); + LEX_STRING *field_name = thd_make_lex_string(thd, + NULL, + column_name.c_str(), + column_name.length(), + TRUE); f_key_info.foreign_fields.push_back(field_name); char ref_path[FN_REFLEN + 1]; @@ -16333,6 +16978,7 @@ void ha_mroonga::free_foreign_key_create_info(char* str) DBUG_VOID_RETURN; } +#ifdef MRN_RBR_UPDATE_NEED_ALL_COLUMNS bool ha_mroonga::check_written_by_row_based_binlog() { MRN_DBUG_ENTER_METHOD(); @@ -16366,6 +17012,7 @@ bool ha_mroonga::check_written_by_row_based_binlog() DBUG_RETURN(true); } +#endif #ifdef MRN_HAVE_HA_REBIND_PSI void ha_mroonga::wrapper_unbind_psi() @@ -16495,3 +17142,20 @@ my_bool ha_mroonga::register_query_cache_table(THD *thd, #ifdef __cplusplus } #endif + +namespace mrn { + namespace variables { + ulonglong get_boolean_mode_syntax_flags(THD *thd) { + ulonglong flags = BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT; +#ifdef MRN_SUPPORT_THDVAR_SET + flags = THDVAR(thd, boolean_mode_syntax_flags); +#endif + return flags; + } + + ActionOnError get_action_on_fulltext_query_error(THD *thd) { + ulong action = THDVAR(thd, action_on_fulltext_query_error); + return static_cast(action); + } + } +} diff --git a/storage/mroonga/ha_mroonga.def b/storage/mroonga/ha_mroonga.def index 5770cde72..7f8394fe4 100644 --- a/storage/mroonga/ha_mroonga.def +++ b/storage/mroonga/ha_mroonga.def @@ -13,3 +13,6 @@ EXPORTS mroonga_escape mroonga_escape_init mroonga_escape_deinit + mroonga_normalize + mroonga_normalize_init + mroonga_normalize_deinit diff --git a/storage/mroonga/ha_mroonga.hpp b/storage/mroonga/ha_mroonga.hpp index 37059210d..253391396 100644 --- a/storage/mroonga/ha_mroonga.hpp +++ b/storage/mroonga/ha_mroonga.hpp @@ -32,6 +32,14 @@ extern "C" { #include #include "mrn_mysql_compat.h" +#include +#include + +#if __cplusplus >= 201402 +# define mrn_override override +#else +# define mrn_override +#endif #if (MYSQL_VERSION_ID >= 50514 && MYSQL_VERSION_ID < 50600) # define MRN_HANDLER_HAVE_FINAL_ADD_INDEX 1 @@ -102,6 +110,13 @@ extern "C" { # define MRN_HAVE_HA_EXTRA_PREPARE_FOR_FORCED_CLOSE #endif +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +#define MRN_HAVE_HA_EXTRA_SKIP_SERIALIZABLE_DD_VIEW +#define MRN_HAVE_HA_EXTRA_BEGIN_ALTER_COPY +#define MRN_HAVE_HA_EXTRA_END_ALTER_COPY +#define MRN_HAVE_HA_EXTRA_NO_AUTOINC_LOCKING +#endif + #if MYSQL_VERSION_ID >= 50607 && \ (!defined(MRN_MARIADB_P) || MYSQL_VERSION_ID < 100008) # define MRN_HAVE_HA_EXTRA_EXPORT @@ -196,6 +211,10 @@ extern "C" { # define MRN_FOREIGN_KEY_USE_CONST_STRING #endif +#if MYSQL_VERSION_ID >= 100203 && defined(MRN_MARIADB_P) +# define MRN_FOREIGN_KEY_USE_METHOD_ENUM +#endif + #if MYSQL_VERSION_ID < 50706 || defined(MRN_MARIADB_P) # define MRN_HANDLER_IS_FATAL_ERROR_HAVE_FLAGS #endif @@ -204,6 +223,45 @@ extern "C" { # define MRN_HANDLER_HAVE_RESET_AUTO_INCREMENT #endif +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 50709) || \ + (defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100203) +# define MRN_ALTER_INPLACE_INFO_ALTER_STORED_COLUMN_TYPE \ + Alter_inplace_info::ALTER_STORED_COLUMN_TYPE +# define MRN_ALTER_INPLACE_INFO_ALTER_STORED_COLUMN_ORDER \ + Alter_inplace_info::ALTER_STORED_COLUMN_ORDER +#else +# define MRN_ALTER_INPLACE_INFO_ALTER_STORED_COLUMN_TYPE \ + Alter_inplace_info::ALTER_COLUMN_TYPE +# define MRN_ALTER_INPLACE_INFO_ALTER_STORED_COLUMN_ORDER \ + Alter_inplace_info::ALTER_COLUMN_ORDER +#endif + +#if MYSQL_VERSION_ID >= 50700 && !defined(MRN_MARIADB_P) +# define MRN_HANDLER_RECORDS_RETURN_ERROR +#endif + +#if MYSQL_VERSION_ID < 80002 || defined(MRN_MARIADB_P) +# define MRN_HANDLER_HAVE_KEYS_TO_USE_FOR_SCANNING +#endif + +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +# define MRN_ST_MYSQL_PLUGIN_HAVE_CHECK_UNINSTALL +#endif + +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +# define MRN_HANDLER_OPEN_HAVE_TABLE_DEFINITION +# define MRN_HANDLER_CREATE_HAVE_TABLE_DEFINITION +#endif + +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +# define MRN_HANDLERTON_CREATE_HAVE_PARTITIONED +#endif + +#if defined(HAVE_PSI_INTERFACE) && \ + (MYSQL_VERSION_ID < 80002 || defined(MRN_MARIADB_P)) +# define MRN_HAVE_PSI_SERVER +#endif + class ha_mroonga; /* structs */ @@ -347,6 +405,8 @@ private: // for ft in where clause test Item_func_match *current_ft_item; + mrn::Operations *operations_; + public: ha_mroonga(handlerton *hton, TABLE_SHARE *share_arg); ~ha_mroonga(); @@ -357,8 +417,20 @@ public: ulonglong table_flags() const; // required ulong index_flags(uint idx, uint part, bool all_parts) const; // required - int create(const char *name, TABLE *form, HA_CREATE_INFO *info); // required - int open(const char *name, int mode, uint test_if_locked); // required + // required + int create(const char *name, TABLE *form, HA_CREATE_INFO *info +#ifdef MRN_HANDLER_CREATE_HAVE_TABLE_DEFINITION + , + dd::Table *table_def +#endif + ) mrn_override; + // required + int open(const char *name, int mode, uint open_options +#ifdef MRN_HANDLER_OPEN_HAVE_TABLE_DEFINITION + , + const dd::Table *table_def +#endif + ) mrn_override; #ifndef MRN_HANDLER_HAVE_HA_CLOSE int close(); // required #endif @@ -419,11 +491,6 @@ public: #endif int index_next_same(uchar *buf, const uchar *key, uint keylen); - int read_range_first(const key_range *start_key, - const key_range *end_key, - bool eq_range, bool sorted); - int read_range_next(); - int ft_init(); FT_INFO *ft_init_ext(uint flags, uint inx, String *key); int ft_read(uchar *buf); @@ -469,7 +536,9 @@ public: int truncate(); double scan_time(); double read_time(uint index, uint ranges, ha_rows rows); +#ifdef MRN_HANDLER_HAVE_KEYS_TO_USE_FOR_SCANNING const key_map *keys_to_use_for_scanning(); +#endif ha_rows estimate_rows_upper_bound(); void update_create_info(HA_CREATE_INFO* create_info); int rename_table(const char *from, const char *to); @@ -518,6 +587,11 @@ public: int start_stmt(THD *thd, thr_lock_type lock_type); protected: +#ifdef MRN_HANDLER_RECORDS_RETURN_ERROR + int records(ha_rows *num_rows); +#else + ha_rows records(); +#endif #ifdef MRN_HANDLER_HAVE_HA_RND_NEXT int rnd_next(uchar *buf); #endif @@ -580,6 +654,9 @@ private: bool have_unique_index(); + bool is_foreign_key_field(const char *table_name, + const char *field_name); + void push_warning_unsupported_spatial_index_search(enum ha_rkey_function flag); void clear_cursor(); void clear_cursor_geo(); @@ -592,7 +669,8 @@ private: void remove_grn_obj_force(const char *name); int drop_index(MRN_SHARE *target_share, uint key_index); int drop_indexes_normal(const char *table_name, grn_obj *table); - int drop_indexes_multiple(const char *table_name, grn_obj *table); + int drop_indexes_multiple(const char *table_name, grn_obj *table, + const char *index_table_name_separator); int drop_indexes(const char *table_name); bool find_column_flags(Field *field, MRN_SHARE *mrn_share, int i, grn_obj_flags *column_flags); @@ -600,9 +678,10 @@ private: int error_code); grn_obj *find_tokenizer(KEY *key, MRN_SHARE *mrn_share, int i); grn_obj *find_tokenizer(const char *name, int name_length); + bool have_custom_normalizer(KEY *key) const; grn_obj *find_normalizer(KEY *key); grn_obj *find_normalizer(KEY *key, const char *name); - bool find_index_column_flags(KEY *key, grn_obj_flags *index_column_flags); + bool find_index_column_flags(KEY *key, grn_column_flags *index_column_flags); bool find_token_filters(KEY *key, grn_obj *token_filters); bool find_token_filters_put(grn_obj *token_filters, const char *token_filter_name, @@ -622,9 +701,7 @@ private: bool is_dry_write(); bool is_enable_optimization(); bool should_normalize(Field *field) const; - bool is_temporary_table_name(const char *name) const; - void check_count_skip(key_part_map start_key_part_map, - key_part_map end_key_part_map, bool fulltext); + void check_count_skip(key_part_map target_key_part_map); bool is_grn_zero_column_value(grn_obj *column, grn_obj *value); bool is_primary_key_field(Field *field) const; void check_fast_order_limit(grn_table_sort_key **sort_keys, int *n_sort_keys, @@ -652,6 +729,9 @@ private: int generic_store_bulk_new_decimal(Field *field, grn_obj *buf); int generic_store_bulk_blob(Field *field, grn_obj *buf); int generic_store_bulk_geometry(Field *field, grn_obj *buf); +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + int generic_store_bulk_json(Field *field, grn_obj *buf); +#endif int generic_store_bulk(Field *field, grn_obj *buf); void storage_store_field_string(Field *field, @@ -687,6 +767,10 @@ private: const char *value, uint value_length); void storage_store_field_geometry(Field *field, const char *value, uint value_length); +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + void storage_store_field_json(Field *field, + const char *value, uint value_length); +#endif void storage_store_field(Field *field, const char *value, uint value_length); void storage_store_field_column(Field *field, bool is_primary_key, int nth_column, grn_id record_id); @@ -731,6 +815,15 @@ private: int storage_encode_multiple_column_key(KEY *key_info, const uchar *key, uint key_length, uchar *buffer, uint *encoded_length); + int storage_encode_multiple_column_key_range(KEY *key_info, + const uchar *start, + uint start_size, + const uchar *end, + uint end_size, + uchar *min_buffer, + uint *min_encoded_size, + uchar *max_buffer, + uint *max_encoded_size); int storage_encode_multiple_column_key_range(KEY *key_info, const key_range *start, const key_range *end, @@ -758,9 +851,7 @@ private: grn_obj **index_tables, grn_obj **index_columns, MRN_SHARE *tmp_share); - int wrapper_create_index(const char *name, TABLE *table, - HA_CREATE_INFO *info, MRN_SHARE *tmp_share, - const char *grn_table_name); + int wrapper_create_index(const char *name, TABLE *table, MRN_SHARE *tmp_share); int storage_create_validate_pseudo_column(TABLE *table); #ifdef MRN_SUPPORT_FOREIGN_KEYS bool storage_create_foreign_key(TABLE *table, const char *grn_table_name, @@ -778,16 +869,18 @@ private: int storage_create_indexes(TABLE *table, const char *grn_table_name, grn_obj *grn_table, MRN_SHARE *tmp_share); int close_databases(); - int ensure_database_open(const char *name); + int ensure_database_open(const char *name, mrn::Database **db=NULL); int ensure_database_remove(const char *name); int wrapper_delete_table(const char *name, handlerton *wrap_handlerton, const char *table_name); int generic_delete_table(const char *name, const char *table_name); - int wrapper_open(const char *name, int mode, uint test_if_locked); + int wrapper_open(const char *name, int mode, uint open_options); int wrapper_open_indexes(const char *name); - int storage_open(const char *name, int mode, uint test_if_locked); + int storage_reindex(); + int storage_open(const char *name, int mode, uint open_options); int open_table(const char *name); int storage_open_columns(void); + void storage_close_columns(void); int storage_open_indexes(const char *name); void wrapper_overwrite_index_bits(); int wrapper_close(); @@ -872,6 +965,13 @@ private: void storage_info_variable(); void storage_info_variable_records(); void storage_info_variable_data_file_length(); +#ifdef MRN_HANDLER_RECORDS_RETURN_ERROR + int wrapper_records(ha_rows *num_rows); + int storage_records(ha_rows *num_rows); +#else + ha_rows wrapper_records(); + ha_rows storage_records(); +#endif int wrapper_rnd_init(bool scan); int storage_rnd_init(bool scan); int wrapper_rnd_end(); @@ -914,14 +1014,6 @@ private: int storage_index_last(uchar *buf); int wrapper_index_next_same(uchar *buf, const uchar *key, uint keylen); int storage_index_next_same(uchar *buf, const uchar *key, uint keylen); - int wrapper_read_range_first(const key_range *start_key, - const key_range *end_key, - bool eq_range, bool sorted); - int storage_read_range_first(const key_range *start_key, - const key_range *end_key, - bool eq_range, bool sorted); - int wrapper_read_range_next(); - int storage_read_range_next(); int generic_ft_init(); int wrapper_ft_init(); int storage_ft_init(); @@ -929,41 +1021,18 @@ private: FT_INFO *storage_ft_init_ext(uint flags, uint key_nr, String *key); void generic_ft_init_ext_add_conditions_fast_order_limit( struct st_mrn_ft_info *info, grn_obj *expression); - bool generic_ft_init_ext_parse_pragma_d(struct st_mrn_ft_info *info, - const char *keyword, - uint keyword_length, - grn_operator *default_operator, - uint *consumed_keyword_length); - void generic_ft_init_ext_parse_pragma_w_append_section( - struct st_mrn_ft_info *info, - grn_obj *index_column, - grn_obj *match_columns, - uint section, - grn_obj *section_value_buffer, - int weight, - uint n_weights); - bool generic_ft_init_ext_parse_pragma_w(struct st_mrn_ft_info *info, - const char *keyword, - uint keyword_length, - grn_obj *index_column, - grn_obj *match_columns, - uint *consumed_keyword_length, - grn_obj *tmp_objects); - grn_expr_flags expr_flags_in_boolean_mode(); grn_rc generic_ft_init_ext_prepare_expression_in_boolean_mode( struct st_mrn_ft_info *info, String *key, grn_obj *index_column, grn_obj *match_columns, - grn_obj *expression, - grn_obj *tmp_objects); + grn_obj *expression); grn_rc generic_ft_init_ext_prepare_expression_in_normal_mode( struct st_mrn_ft_info *info, String *key, grn_obj *index_column, grn_obj *match_columns, - grn_obj *expression, - grn_obj *tmp_objects); + grn_obj *expression); struct st_mrn_ft_info *generic_ft_init_ext_select(uint flags, uint key_nr, String *key); @@ -1041,8 +1110,10 @@ private: 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); +#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(); +#endif ha_rows wrapper_estimate_rows_upper_bound(); ha_rows storage_estimate_rows_upper_bound(); void wrapper_update_create_info(HA_CREATE_INFO* create_info); @@ -1069,8 +1140,10 @@ private: bool wrapper_auto_repair(int error) const; bool storage_auto_repair(int error) const; int generic_disable_index(int i, KEY *key_info); + int wrapper_disable_indexes_mroonga(uint mode); int wrapper_disable_indexes(uint mode); int storage_disable_indexes(uint mode); + int wrapper_enable_indexes_mroonga(uint mode); int wrapper_enable_indexes(uint mode); int storage_enable_indexes(uint mode); int wrapper_check(THD* thd, HA_CHECK_OPT* check_opt); @@ -1111,8 +1184,10 @@ private: Alter_inplace_info *ha_alter_info); bool wrapper_inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alter_info); - bool storage_inplace_alter_table_index(TABLE *altered_table, - Alter_inplace_info *ha_alter_info); + bool storage_inplace_alter_table_add_index(TABLE *altered_table, + Alter_inplace_info *ha_alter_info); + bool storage_inplace_alter_table_drop_index(TABLE *altered_table, + Alter_inplace_info *ha_alter_info); bool storage_inplace_alter_table_add_column(TABLE *altered_table, Alter_inplace_info *ha_alter_info); bool storage_inplace_alter_table_drop_column(TABLE *altered_table, @@ -1208,7 +1283,9 @@ private: void storage_free_foreign_key_create_info(char* str); void wrapper_set_keys_in_use(); void storage_set_keys_in_use(); +#ifdef MRN_RBR_UPDATE_NEED_ALL_COLUMNS bool check_written_by_row_based_binlog(); +#endif #ifdef MRN_HAVE_HA_REBIND_PSI void wrapper_unbind_psi(); void storage_unbind_psi(); diff --git a/storage/mroonga/lib/libmrn_need_mysql_sources.am b/storage/mroonga/lib/libmrn_need_mysql_sources.am index 575f38adb..e8c03c63a 100644 --- a/storage/mroonga/lib/libmrn_need_mysql_sources.am +++ b/storage/mroonga/lib/libmrn_need_mysql_sources.am @@ -28,4 +28,23 @@ libmrn_need_mysql_la_SOURCES = \ mrn_value_decoder.cpp \ mrn_value_decoder.hpp \ mrn_database_repairer.cpp \ - mrn_database_repairer.hpp + mrn_database_repairer.hpp \ + mrn_context_pool.cpp \ + mrn_context_pool.hpp \ + mrn_operations.cpp \ + mrn_operations.hpp \ + mrn_operation.cpp \ + mrn_operation.hpp \ + mrn_database.cpp \ + mrn_database.hpp \ + mrn_column_name.cpp \ + mrn_column_name.hpp \ + mrn_count_skip_checker.cpp \ + mrn_count_skip_checker.hpp \ + mrn_query_parser.cpp \ + mrn_query_parser.hpp \ + mrn_current_thread.hpp \ + mrn_smart_bitmap.cpp \ + mrn_smart_bitmap.hpp \ + mrn_table_fields_offset_mover.cpp \ + mrn_table_fields_offset_mover.hpp diff --git a/storage/mroonga/lib/mrn_column_name.cpp b/storage/mroonga/lib/mrn_column_name.cpp new file mode 100644 index 000000000..e469ad2fd --- /dev/null +++ b/storage/mroonga/lib/mrn_column_name.cpp @@ -0,0 +1,63 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2016 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-1301 USA +*/ + +#include +#include + +#include "mrn_column_name.hpp" + +#include + +#include + +// for debug +#define MRN_CLASS_NAME "mrn::ColumnName" + +namespace mrn { + ColumnName::ColumnName(const char *mysql_name) + : mysql_name_(mysql_name) { + encode(); + } + + const char *ColumnName::mysql_name() { + return mysql_name_; + } + + const char *ColumnName::c_str() { + return name_; + } + + size_t ColumnName::length() { + return length_; + } + + void ColumnName::encode() { + MRN_DBUG_ENTER_METHOD(); + uint errors; + length_ = mrn_strconvert(system_charset_info, + mysql_name_, + strlen(mysql_name_), + &my_charset_filename, + name_, + MRN_MAX_PATH_SIZE, + &errors); + name_[length_] = '\0'; + DBUG_VOID_RETURN; + } +} diff --git a/storage/mroonga/lib/mrn_column_name.hpp b/storage/mroonga/lib/mrn_column_name.hpp new file mode 100644 index 000000000..ed8fb67e5 --- /dev/null +++ b/storage/mroonga/lib/mrn_column_name.hpp @@ -0,0 +1,38 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2016 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-1301 USA +*/ + +#pragma once + +#include + +namespace mrn { + class ColumnName { + public: + ColumnName(const char *mysql_name); + const char *mysql_name(); + const char *c_str(); + size_t length(); + private: + const char *mysql_name_; + char name_[MRN_MAX_PATH_SIZE]; + size_t length_; + + void encode(); + }; +} diff --git a/storage/mroonga/lib/mrn_condition_converter.cpp b/storage/mroonga/lib/mrn_condition_converter.cpp index 1527a5469..6df601d62 100644 --- a/storage/mroonga/lib/mrn_condition_converter.cpp +++ b/storage/mroonga/lib/mrn_condition_converter.cpp @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2 -*- */ /* - Copyright(C) 2013-2014 Kouhei Sutou + Copyright(C) 2013-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -175,7 +175,7 @@ namespace mrn { bool convertable = false; - enum_field_types field_type = field_item->field_type(); + enum_field_types field_type = field_item->field->real_type(); NormalizedType normalized_type = normalize_field_type(field_type); switch (normalized_type) { case STRING_TYPE: @@ -185,7 +185,12 @@ namespace mrn { } break; case INT_TYPE: - convertable = value_item->type() == Item::INT_ITEM; + if (field_type == MYSQL_TYPE_ENUM) { + convertable = (value_item->type() == Item::STRING_ITEM || + value_item->type() == Item::INT_ITEM); + } else { + convertable = value_item->type() == Item::INT_ITEM; + } break; case TIME_TYPE: if (is_valid_time_value(field_item, value_item)) { @@ -206,7 +211,7 @@ namespace mrn { bool convertable = false; - enum_field_types field_type = field_item->field_type(); + enum_field_types field_type = field_item->field->type(); NormalizedType normalized_type = normalize_field_type(field_type); switch (normalized_type) { case STRING_TYPE: @@ -251,7 +256,7 @@ namespace mrn { bool error; Item *real_value_item = value_item->real_item(); - switch (field_item->field_type()) { + switch (field_item->field->type()) { case MYSQL_TYPE_TIME: error = real_value_item->get_time(mysql_time); break; @@ -352,6 +357,11 @@ namespace mrn { case MYSQL_TYPE_GEOMETRY: type = UNSUPPORTED_TYPE; break; +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + case MYSQL_TYPE_JSON: + type = STRING_TYPE; + break; +#endif } DBUG_RETURN(type); @@ -404,11 +414,11 @@ namespace mrn { DBUG_RETURN(have); } - const Item_func *ConditionConverter::find_match_against(const Item *item) { + unsigned int ConditionConverter::count_match_against(const Item *item) { MRN_DBUG_ENTER_METHOD(); if (!item) { - DBUG_RETURN(NULL); + DBUG_RETURN(0); } switch (item->type()) { @@ -416,14 +426,13 @@ namespace mrn { if (is_storage_mode_) { Item_cond *cond_item = (Item_cond *)item; if (cond_item->functype() == Item_func::COND_AND_FUNC) { + unsigned int n_match_againsts = 0; List_iterator iterator(*((cond_item)->argument_list())); const Item *sub_item; while ((sub_item = iterator++)) { - const Item_func *match_against = find_match_against(sub_item); - if (match_against) { - DBUG_RETURN(match_against); - } + n_match_againsts += count_match_against(sub_item); } + DBUG_RETURN(n_match_againsts); } } break; @@ -432,7 +441,7 @@ namespace mrn { const Item_func *func_item = (const Item_func *)item; switch (func_item->functype()) { case Item_func::FT_FUNC: - DBUG_RETURN(func_item); + DBUG_RETURN(1); break; default: break; @@ -443,7 +452,7 @@ namespace mrn { break; } - DBUG_RETURN(NULL); + DBUG_RETURN(0); } void ConditionConverter::convert(const Item *where, grn_obj *expression) { @@ -560,7 +569,7 @@ namespace mrn { grn_obj *expression) { MRN_DBUG_ENTER_METHOD(); - enum_field_types field_type = field_item->field_type(); + enum_field_types field_type = field_item->field->real_type(); NormalizedType normalized_type = normalize_field_type(field_type); switch (normalized_type) { @@ -574,7 +583,21 @@ namespace mrn { break; case INT_TYPE: grn_obj_reinit(ctx_, &value_, GRN_DB_INT64, 0); - GRN_INT64_SET(ctx_, &value_, const_item->val_int()); + if (field_type == MYSQL_TYPE_ENUM) { + if (const_item->type() == Item::STRING_ITEM) { + String *string; + string = const_item->val_str(NULL); + Field_enum *enum_field = static_cast(field_item->field); + int enum_value = find_type(string->c_ptr(), + enum_field->typelib, + FIND_TYPE_BASIC); + GRN_INT64_SET(ctx_, &value_, enum_value); + } else { + GRN_INT64_SET(ctx_, &value_, const_item->val_int()); + } + } else { + GRN_INT64_SET(ctx_, &value_, const_item->val_int()); + } break; case TIME_TYPE: grn_obj_reinit(ctx_, &value_, GRN_DB_TIME, 0); diff --git a/storage/mroonga/lib/mrn_condition_converter.hpp b/storage/mroonga/lib/mrn_condition_converter.hpp index 3a7fbd048..f8a48b620 100644 --- a/storage/mroonga/lib/mrn_condition_converter.hpp +++ b/storage/mroonga/lib/mrn_condition_converter.hpp @@ -33,7 +33,7 @@ namespace mrn { ~ConditionConverter(); bool is_convertable(const Item *item); - const Item_func *find_match_against(const Item *item); + unsigned int count_match_against(const Item *item); // caller must check "where" can be convertable by // is_convertable(). This method doesn't validate "where". void convert(const Item *where, grn_obj *expression); diff --git a/storage/mroonga/lib/mrn_context_pool.cpp b/storage/mroonga/lib/mrn_context_pool.cpp new file mode 100644 index 000000000..d297ee9a3 --- /dev/null +++ b/storage/mroonga/lib/mrn_context_pool.cpp @@ -0,0 +1,120 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "mrn_context_pool.hpp" +#include "mrn_lock.hpp" + +#include + +namespace mrn { + // for debug +#define MRN_CLASS_NAME "mrn::ContextPool::Impl" + + class ContextPool::Impl { + public: + Impl(mysql_mutex_t *mutex) + : mutex_(mutex), + pool_(NULL), + last_pull_time_(0) { + } + + ~Impl(void) { + clear(); + } + + grn_ctx *pull(void) { + MRN_DBUG_ENTER_METHOD(); + grn_ctx *ctx = NULL; + + { + time_t now; + time(&now); + + mrn::Lock lock(mutex_); + if (pool_) { + ctx = static_cast(pool_->data); + list_pop(pool_); + if ((now - last_pull_time_) >= CLEAR_THREATHOLD_IN_SECONDS) { + clear(); + } + } + last_pull_time_ = now; + } + + if (!ctx) { + ctx = grn_ctx_open(0); + } + + DBUG_RETURN(ctx); + } + + void release(grn_ctx *ctx) { + MRN_DBUG_ENTER_METHOD(); + + { + mrn::Lock lock(mutex_); + list_push(pool_, ctx); + grn_ctx_use(ctx, NULL); + } + + DBUG_VOID_RETURN; + } + + private: + static const unsigned int CLEAR_THREATHOLD_IN_SECONDS = 60 * 5; + + mysql_mutex_t *mutex_; + LIST *pool_; + time_t last_pull_time_; + + void clear(void) { + MRN_DBUG_ENTER_METHOD(); + while (pool_) { + grn_ctx *ctx = static_cast(pool_->data); + grn_ctx_close(ctx); + list_pop(pool_); + } + DBUG_VOID_RETURN; + } + }; + + // For debug +#undef MRN_CLASS_NAME +#define MRN_CLASS_NAME "mrn::ContextPool" + + ContextPool::ContextPool(mysql_mutex_t *mutex) + : impl_(new Impl(mutex)) { + } + + ContextPool::~ContextPool(void) { + delete impl_; + } + + grn_ctx *ContextPool::pull(void) { + MRN_DBUG_ENTER_METHOD(); + grn_ctx *ctx = impl_->pull(); + DBUG_RETURN(ctx); + } + + void ContextPool::release(grn_ctx *ctx) { + MRN_DBUG_ENTER_METHOD(); + impl_->release(ctx); + DBUG_VOID_RETURN; + } +} diff --git a/storage/mroonga/lib/mrn_context_pool.hpp b/storage/mroonga/lib/mrn_context_pool.hpp new file mode 100644 index 000000000..4c64933ac --- /dev/null +++ b/storage/mroonga/lib/mrn_context_pool.hpp @@ -0,0 +1,41 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef MRN_CONTEXT_POOL_HPP_ +#define MRN_CONTEXT_POOL_HPP_ + +#include + +#include + +namespace mrn { + class ContextPool { + public: + ContextPool(mysql_mutex_t *mutex); + ~ContextPool(void); + grn_ctx *pull(void); + void release(grn_ctx *context); + + private: + class Impl; + Impl *impl_; + }; +} + +#endif /* MRN_CONTEXT_POOL_HPP_ */ diff --git a/storage/mroonga/lib/mrn_count_skip_checker.cpp b/storage/mroonga/lib/mrn_count_skip_checker.cpp new file mode 100644 index 000000000..216f3b7b7 --- /dev/null +++ b/storage/mroonga/lib/mrn_count_skip_checker.cpp @@ -0,0 +1,303 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2010-2013 Kentoku SHIBA + Copyright(C) 2011-2017 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-1301 USA +*/ + +#include "mrn_count_skip_checker.hpp" + +#include + +// for debug +#define MRN_CLASS_NAME "mrn::CountSkipChecker" + +namespace mrn { + CountSkipChecker::CountSkipChecker(grn_ctx *ctx, + TABLE *table, + SELECT_LEX *select_lex, + KEY *key_info, + key_part_map target_key_part_map, + bool is_storage_mode) + : ctx_(ctx), + table_(table), + select_lex_(select_lex), + key_info_(key_info), + target_key_part_map_(target_key_part_map), + is_storage_mode_(is_storage_mode) { + } + + CountSkipChecker::~CountSkipChecker() { + } + + bool CountSkipChecker::check() { + MRN_DBUG_ENTER_METHOD(); + + if (select_lex_->item_list.elements != 1) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] not only one item: %u", + select_lex_->item_list.elements); + DBUG_RETURN(false); + } + if (select_lex_->group_list.elements > 0) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] have groups: %u", + select_lex_->group_list.elements); + DBUG_RETURN(false); + } + if (MRN_SELECT_LEX_GET_HAVING_COND(select_lex_)) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] have HAVING"); + DBUG_RETURN(false); + } + if (select_lex_->table_list.elements != 1) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] not only one table: %u", + select_lex_->table_list.elements); + DBUG_RETURN(false); + } + + Item *info = static_cast(select_lex_->item_list.first_node()->info); + if (info->type() != Item::SUM_FUNC_ITEM) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] item isn't sum function: %u", + info->type()); + DBUG_RETURN(false); + } + Item_sum *sum_item = static_cast(info); + if (sum_item->sum_func() != Item_sum::COUNT_FUNC) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] not COUNT: %u", + sum_item->sum_func()); + DBUG_RETURN(false); + } + if (ITEM_SUM_GET_NEST_LEVEL(sum_item) != 0 || + ITEM_SUM_GET_AGGR_LEVEL(sum_item) != 0 || + ITEM_SUM_GET_MAX_AGGR_LEVEL(sum_item) != -1 || + sum_item->max_sum_func_level != -1) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] not simple COUNT(*): %d:%d:%d:%d", + ITEM_SUM_GET_NEST_LEVEL(sum_item), + ITEM_SUM_GET_AGGR_LEVEL(sum_item), + ITEM_SUM_GET_MAX_AGGR_LEVEL(sum_item), + sum_item->max_sum_func_level); + DBUG_RETURN(false); + } + + Item *where = MRN_SELECT_LEX_GET_WHERE_COND(select_lex_); + if (!where) { + if (is_storage_mode_) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][true] no condition"); + DBUG_RETURN(true); + } else { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] no condition with wrapper mode"); + DBUG_RETURN(false); + } + } + + bool skippable = is_skippable(where); + DBUG_RETURN(skippable); + } + + bool CountSkipChecker::is_skippable(Item *where) { + MRN_DBUG_ENTER_METHOD(); + + bool skippable = false; + switch (where->type()) { + case Item::COND_ITEM: + { + Item_cond *cond_item = static_cast(where); + skippable = is_skippable(cond_item); + if (skippable) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][true] skippable multiple conditions"); + } + } + break; + case Item::FUNC_ITEM: + { + Item_func *func_item = static_cast(where); + if (func_item->functype() == Item_func::FT_FUNC) { + if (select_lex_->select_n_where_fields == 1) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][true] " + "only one full text search condition"); + DBUG_RETURN(true); + } else { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] " + "full text search condition and more conditions: %u", + select_lex_->select_n_where_fields); + DBUG_RETURN(false); + } + } else { + skippable = is_skippable(func_item); + if (skippable) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][true] skippable condition"); + } + } + } + break; + default: + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] unsupported top level item: %u", + where->type()); + break; + } + + DBUG_RETURN(skippable); + } + + bool CountSkipChecker::is_skippable(Item_cond *cond_item) { + MRN_DBUG_ENTER_METHOD(); + + List_iterator iterator(*(cond_item->argument_list())); + Item *sub_item; + while ((sub_item = iterator++)) { + if (sub_item->type() != Item::FUNC_ITEM) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] " + "sub condition isn't function item: %u", + sub_item->type()); + DBUG_RETURN(false); + } + if (!is_skippable(static_cast(sub_item))) { + DBUG_RETURN(false); + } + } + DBUG_RETURN(true); + } + + bool CountSkipChecker::is_skippable(Item_func *func_item) { + MRN_DBUG_ENTER_METHOD(); + + switch (func_item->functype()) { + case Item_func::EQ_FUNC: + case Item_func::EQUAL_FUNC: + case Item_func::NE_FUNC: + case Item_func::LT_FUNC: + case Item_func::LE_FUNC: + case Item_func::GE_FUNC: + case Item_func::GT_FUNC: + { + Item **arguments = func_item->arguments(); + Item *left_item = arguments[0]; + if (left_item->type() != Item::FIELD_ITEM) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] not field: %u:%u", + func_item->functype(), + left_item->type()); + DBUG_RETURN(false); + } + + bool skippable = is_skippable(static_cast(left_item)); + DBUG_RETURN(skippable); + } + break; + case Item_func::BETWEEN: + { + Item **arguments = func_item->arguments(); + Item *target_item = arguments[0]; + if (target_item->type() != Item::FIELD_ITEM) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] BETWEEN target isn't field: %u", + target_item->type()); + DBUG_RETURN(false); + } + + bool skippable = is_skippable(static_cast(target_item)); + DBUG_RETURN(skippable); + } + break; + case Item_func::MULT_EQUAL_FUNC: +#ifdef MRN_HAVE_ITEM_EQUAL_FIELDS_ITERATOR + { + Item_equal *equal_item = static_cast(func_item); + Item_equal_fields_iterator iterator(*equal_item); + Item *field_item; + while ((field_item = iterator++)) { + bool skippable = is_skippable(static_cast(field_item)); + if (!skippable) { + DBUG_RETURN(skippable); + } + } + DBUG_RETURN(true); + } +#endif + break; + default: + break; + } + + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] unsupported function item: %u", + func_item->functype()); + DBUG_RETURN(false); + } + + bool CountSkipChecker::is_skippable(Item_field *field_item) { + MRN_DBUG_ENTER_METHOD(); + + Field *field = field_item->field; + if (!field) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] field is missing"); + DBUG_RETURN(false); + } + + if (field->table != table_) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] external table's field"); + DBUG_RETURN(false); + } + + if (!key_info_) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] no active index: <%s>:<%s>", + *(field->table_name), + field->field_name); + DBUG_RETURN(false); + } + + uint i; + KEY_PART_INFO *key_part = key_info_->key_part; + for (i = 0; i < KEY_N_KEY_PARTS(key_info_); i++) { + if (key_part[i].field == field) { + if ((target_key_part_map_ >> i) & 1) { + DBUG_RETURN(true); + } else { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] " + "field's index are out of key part map: %u:%lu: <%s>:<%s>", + i, + target_key_part_map_, + *(field->table_name), + field->field_name); + DBUG_RETURN(false); + } + } + } + + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] field isn't indexed: <%s>:<%s>", + *(field->table_name), + field->field_name); + DBUG_RETURN(false); + } +} diff --git a/storage/mroonga/lib/mrn_count_skip_checker.hpp b/storage/mroonga/lib/mrn_count_skip_checker.hpp new file mode 100644 index 000000000..b813ecdcc --- /dev/null +++ b/storage/mroonga/lib/mrn_count_skip_checker.hpp @@ -0,0 +1,57 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2016 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-1301 USA +*/ + +#ifndef MRN_COUNT_SKIP_CHECKER_HPP_ +#define MRN_COUNT_SKIP_CHECKER_HPP_ + +#include + +#include + +#include + +namespace mrn { + class CountSkipChecker { + public: + CountSkipChecker(grn_ctx *ctx, + TABLE *table, + SELECT_LEX *select_lex, + KEY *key_info, + key_part_map target_key_part_map, + bool is_storage_mode); + ~CountSkipChecker(); + + bool check(); + + private: + grn_ctx *ctx_; + TABLE *table_; + SELECT_LEX *select_lex_; + KEY *key_info_; + key_part_map target_key_part_map_; + bool is_storage_mode_; + + bool is_skippable(Item *where); + bool is_skippable(Item_cond *cond_item); + bool is_skippable(Item_func *func_item); + bool is_skippable(Item_field *field_item); + }; +} + +#endif /* MRN_COUNT_SKIP_CHECKER_HPP_ */ diff --git a/storage/mroonga/lib/mrn_current_thread.hpp b/storage/mroonga/lib/mrn_current_thread.hpp new file mode 100644 index 000000000..367057fce --- /dev/null +++ b/storage/mroonga/lib/mrn_current_thread.hpp @@ -0,0 +1,27 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 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-1301 USA +*/ + +#pragma once + +#include +#include + +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +# include +#endif diff --git a/storage/mroonga/lib/mrn_database.cpp b/storage/mroonga/lib/mrn_database.cpp new file mode 100644 index 000000000..52e315e1b --- /dev/null +++ b/storage/mroonga/lib/mrn_database.cpp @@ -0,0 +1,89 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include "mrn_database.hpp" +#include "mrn_operations.hpp" + +// for debug +#define MRN_CLASS_NAME "mrn::Database" + +namespace mrn { + Database::Database(grn_ctx *ctx, grn_obj *db) + : ctx_(ctx), + db_(db), + broken_table_names_(NULL), + is_broken_(false) { + Operations operations(ctx_); + broken_table_names_ = operations.collect_processing_table_names(); + is_broken_ = operations.is_locked(); + } + + Database::~Database(void) { + close(); + } + + void Database::close() { + MRN_DBUG_ENTER_METHOD(); + if (db_) { + grn_hash_close(ctx_, broken_table_names_); + broken_table_names_ = NULL; + grn_obj_close(ctx_, db_); + db_ = NULL; + } + DBUG_VOID_RETURN; + } + + grn_rc Database::remove() { + MRN_DBUG_ENTER_METHOD(); + grn_rc rc = GRN_SUCCESS; + if (db_) { + grn_hash_close(ctx_, broken_table_names_); + broken_table_names_ = NULL; + rc = grn_obj_remove(ctx_, db_); + if (rc == GRN_SUCCESS) { + db_ = NULL; + } + } + DBUG_RETURN(rc); + } + + grn_obj *Database::get() { + MRN_DBUG_ENTER_METHOD(); + DBUG_RETURN(db_); + } + + bool Database::is_broken() { + MRN_DBUG_ENTER_METHOD(); + DBUG_RETURN(is_broken_); + } + + bool Database::is_broken_table(const char *name, size_t name_size) { + MRN_DBUG_ENTER_METHOD(); + grn_id id = grn_hash_get(ctx_, broken_table_names_, name, name_size, NULL); + DBUG_RETURN(id != GRN_ID_NIL); + } + + void Database::mark_table_repaired(const char *name, size_t name_size) { + MRN_DBUG_ENTER_METHOD(); + grn_hash_delete(ctx_, broken_table_names_, name, name_size, NULL); + DBUG_VOID_RETURN; + } +} diff --git a/storage/mroonga/lib/mrn_database.hpp b/storage/mroonga/lib/mrn_database.hpp new file mode 100644 index 000000000..c2c7e460b --- /dev/null +++ b/storage/mroonga/lib/mrn_database.hpp @@ -0,0 +1,47 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef MRN_DATABASE_HPP_ +#define MRN_DATABASE_HPP_ + +#include + +namespace mrn { + class Database { + public: + Database(grn_ctx *ctx, grn_obj *db); + ~Database(void); + + void close(); + grn_rc remove(); + grn_obj *get(); + + bool is_broken(); + bool is_broken_table(const char *name, size_t name_size); + void mark_table_repaired(const char *name, size_t name_size); + + private: + grn_ctx *ctx_; + grn_obj *db_; + grn_hash *broken_table_names_; + bool is_broken_; + }; +} + +#endif /* MRN_DATABASE_HPP_ */ diff --git a/storage/mroonga/lib/mrn_database_manager.cpp b/storage/mroonga/lib/mrn_database_manager.cpp index 753d1551f..d52d2639d 100644 --- a/storage/mroonga/lib/mrn_database_manager.cpp +++ b/storage/mroonga/lib/mrn_database_manager.cpp @@ -56,9 +56,9 @@ namespace mrn { if (cache_) { void *db_address; GRN_HASH_EACH(ctx_, cache_, id, NULL, 0, &db_address, { - grn_obj *db; + Database *db; memcpy(&db, db_address, sizeof(grn_obj *)); - grn_obj_unlink(ctx_, db); + delete db; }); grn_hash_close(ctx_, cache_); } @@ -80,7 +80,7 @@ namespace mrn { DBUG_RETURN(true); } - int DatabaseManager::open(const char *path, grn_obj **db) { + int DatabaseManager::open(const char *path, Database **db) { MRN_DBUG_ENTER_METHOD(); int error = 0; @@ -100,36 +100,54 @@ namespace mrn { mapper.db_name(), strlen(mapper.db_name()), &db_address); if (id == GRN_ID_NIL) { + grn_obj *grn_db; struct stat db_stat; if (stat(mapper.db_path(), &db_stat)) { GRN_LOG(ctx_, GRN_LOG_INFO, "database not found. creating...: <%s>", mapper.db_path()); if (path[0] == FN_CURLIB && - (path[1] == FN_LIBCHAR || path[1] == FN_LIBCHAR2)) { + mrn_is_directory_separator(path[1])) { ensure_database_directory(); } - *db = grn_db_create(ctx_, mapper.db_path(), NULL); + grn_db = grn_db_create(ctx_, mapper.db_path(), NULL); if (ctx_->rc) { error = ER_CANT_CREATE_TABLE; my_message(error, ctx_->errbuf, MYF(0)); DBUG_RETURN(error); } } else { - *db = grn_db_open(ctx_, mapper.db_path()); + grn_db = grn_db_open(ctx_, mapper.db_path()); if (ctx_->rc) { error = ER_CANT_OPEN_FILE; my_message(error, ctx_->errbuf, MYF(0)); DBUG_RETURN(error); } } + *db = new Database(ctx_, grn_db); grn_hash_add(ctx_, cache_, mapper.db_name(), strlen(mapper.db_name()), &db_address, NULL); - memcpy(db_address, db, sizeof(grn_obj *)); - error = ensure_normalizers_registered(*db); + memcpy(db_address, db, sizeof(Database *)); + error = ensure_normalizers_registered((*db)->get()); + if (!error) { + if ((*db)->is_broken()) { + error = ER_CANT_OPEN_FILE; + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: database: open: " + "The database maybe broken. " + "We recommend you to recreate the database. " + "If the database isn't broken, " + "you can remove this error by running " + "'groonga %s table_remove mroonga_operations' " + "on server. But the latter isn't recommended.", + mapper.db_path()); + my_message(error, error_message, MYF(0)); + } + } } else { - memcpy(db, db_address, sizeof(grn_obj *)); - grn_ctx_use(ctx_, *db); + memcpy(db, db_address, sizeof(Database *)); + grn_ctx_use(ctx_, (*db)->get()); } DBUG_RETURN(error); @@ -150,10 +168,11 @@ namespace mrn { DBUG_VOID_RETURN; } - grn_obj *db = NULL; - memcpy(&db, db_address, sizeof(grn_obj *)); + Database *db = NULL; + memcpy(&db, db_address, sizeof(Database *)); + grn_ctx_use(ctx_, db->get()); if (db) { - grn_obj_close(ctx_, db); + delete db; } grn_hash_delete_by_id(ctx_, cache_, id, NULL); @@ -173,29 +192,35 @@ namespace mrn { mapper.db_name(), strlen(mapper.db_name()), &db_address); - grn_obj *db = NULL; + Database *db = NULL; if (id == GRN_ID_NIL) { struct stat dummy; if (stat(mapper.db_path(), &dummy) == 0) { - db = grn_db_open(ctx_, mapper.db_path()); + grn_obj *grn_db = grn_db_open(ctx_, mapper.db_path()); + db = new Database(ctx_, grn_db); } } else { - memcpy(&db, db_address, sizeof(grn_obj *)); + memcpy(&db, db_address, sizeof(Database *)); + grn_ctx_use(ctx_, db->get()); } if (!db) { DBUG_RETURN(false); } - if (grn_obj_remove(ctx_, db) == GRN_SUCCESS) { + if (db->remove() == GRN_SUCCESS) { if (id != GRN_ID_NIL) { grn_hash_delete_by_id(ctx_, cache_, id, NULL); } + delete db; DBUG_RETURN(true); } else { GRN_LOG(ctx_, GRN_LOG_ERROR, "failed to drop database: <%s>: <%s>", mapper.db_path(), ctx_->errbuf); + if (id == GRN_ID_NIL) { + delete db; + } DBUG_RETURN(false); } } @@ -223,22 +248,28 @@ namespace mrn { break; } void *db_address; - grn_obj *db; + Database *db; grn_hash_cursor_get_value(ctx_, cursor, &db_address); - memcpy(&db, db_address, sizeof(grn_obj *)); + memcpy(&db, db_address, sizeof(Database *)); + grn_ctx_use(ctx_, db->get()); grn_rc rc = grn_hash_cursor_delete(ctx_, cursor, NULL); if (rc) { error = ER_ERROR_ON_READ; my_message(error, ctx_->errbuf, MYF(0)); break; } - grn_obj_close(ctx_, db); + delete db; } grn_hash_cursor_close(ctx_, cursor); DBUG_RETURN(error); } + const char *DatabaseManager::error_message() { + MRN_DBUG_ENTER_METHOD(); + DBUG_RETURN(ctx_->errbuf); + } + void DatabaseManager::mkdir_p(const char *directory) { MRN_DBUG_ENTER_METHOD(); @@ -246,8 +277,7 @@ namespace mrn { char sub_directory[MRN_MAX_PATH_SIZE]; sub_directory[0] = '\0'; while (true) { - if (directory[i] == FN_LIBCHAR || - directory[i] == FN_LIBCHAR2 || + if (mrn_is_directory_separator(directory[i]) || directory[i] == '\0') { sub_directory[i] = '\0'; struct stat directory_status; @@ -290,8 +320,10 @@ namespace mrn { const char *last_path_separator; last_path_separator = strrchr(path_prefix, FN_LIBCHAR); +#ifdef FN_LIBCHAR2 if (!last_path_separator) last_path_separator = strrchr(path_prefix, FN_LIBCHAR2); +#endif if (!last_path_separator) DBUG_VOID_RETURN; if (path_prefix == last_path_separator) diff --git a/storage/mroonga/lib/mrn_database_manager.hpp b/storage/mroonga/lib/mrn_database_manager.hpp index 76c76dab6..877b7ca88 100644 --- a/storage/mroonga/lib/mrn_database_manager.hpp +++ b/storage/mroonga/lib/mrn_database_manager.hpp @@ -22,6 +22,8 @@ #ifndef MRN_DATABASE_MANAGER_HPP_ #define MRN_DATABASE_MANAGER_HPP_ +#include "mrn_database.hpp" + #include namespace mrn { @@ -30,10 +32,11 @@ namespace mrn { DatabaseManager(grn_ctx *ctx, mysql_mutex_t *mutex); ~DatabaseManager(void); bool init(void); - int open(const char *path, grn_obj **db); + int open(const char *path, Database **db); void close(const char *path); bool drop(const char *path); int clear(void); + const char *error_message(); private: grn_ctx *ctx_; diff --git a/storage/mroonga/lib/mrn_database_repairer.cpp b/storage/mroonga/lib/mrn_database_repairer.cpp index f04c027f8..47badbd8b 100644 --- a/storage/mroonga/lib/mrn_database_repairer.cpp +++ b/storage/mroonga/lib/mrn_database_repairer.cpp @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2 -*- */ /* - Copyright(C) 2015 Kouhei Sutou + Copyright(C) 2015-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -36,6 +36,16 @@ #endif namespace mrn { + struct CheckResult { + CheckResult() : + is_crashed(false), + is_corrupt(false) { + } + + bool is_crashed; + bool is_corrupt; + }; + DatabaseRepairer::DatabaseRepairer(grn_ctx *ctx, THD *thd) : ctx_(ctx), thd_(thd), @@ -53,10 +63,19 @@ namespace mrn { bool DatabaseRepairer::is_crashed(void) { MRN_DBUG_ENTER_METHOD(); - bool is_crashed = false; - each_database(&DatabaseRepairer::is_crashed_body, &is_crashed); + CheckResult result; + each_database(&DatabaseRepairer::check_body, &result); + + DBUG_RETURN(result.is_crashed); + } + + bool DatabaseRepairer::is_corrupt(void) { + MRN_DBUG_ENTER_METHOD(); + + CheckResult result; + each_database(&DatabaseRepairer::check_body, &result); - DBUG_RETURN(is_crashed); + DBUG_RETURN(result.is_corrupt); } bool DatabaseRepairer::repair(void) { @@ -81,9 +100,19 @@ namespace mrn { DBUG_VOID_RETURN; } - do { - each_database_body(data.cFileName, each_body_func, user_data); - } while (FindNextFile(finder, &data) != 0); + grn_ctx ctx; + grn_rc rc = grn_ctx_init(&ctx, 0); + if (rc == GRN_SUCCESS) { + do { + each_database_body(data.cFileName, &ctx, each_body_func, user_data); + } while (FindNextFile(finder, &data) != 0); + grn_ctx_fin(&ctx); + } else { + GRN_LOG(ctx_, GRN_LOG_WARNING, + "[mroonga][database][repairer][each] " + "failed to initialize grn_ctx: %d: %s", + rc, grn_rc_to_string(rc)); + } FindClose(finder); #else DIR *dir = opendir(base_directory_); @@ -91,8 +120,18 @@ namespace mrn { DBUG_VOID_RETURN; } - while (struct dirent *entry = readdir(dir)) { - each_database_body(entry->d_name, each_body_func, user_data); + grn_ctx ctx; + grn_rc rc = grn_ctx_init(&ctx, 0); + if (rc == GRN_SUCCESS) { + while (struct dirent *entry = readdir(dir)) { + each_database_body(entry->d_name, &ctx, each_body_func, user_data); + } + grn_ctx_fin(&ctx); + } else { + GRN_LOG(ctx_, GRN_LOG_WARNING, + "[mroonga][database][repairer][each] " + "failed to initialize grn_ctx: %d: %s", + rc, grn_rc_to_string(rc)); } closedir(dir); #endif @@ -101,6 +140,7 @@ namespace mrn { } void DatabaseRepairer::each_database_body(const char *base_path, + grn_ctx *ctx, EachBodyFunc each_body_func, void *user_data) { MRN_DBUG_ENTER_METHOD(); @@ -123,14 +163,14 @@ namespace mrn { char db_path[MRN_MAX_PATH_SIZE]; snprintf(db_path, MRN_MAX_PATH_SIZE, "%s%c%s", base_directory_, FN_LIBCHAR, base_path); - grn_obj *db = grn_db_open(ctx_, db_path); + grn_obj *db = grn_db_open(ctx, db_path); if (!db) { DBUG_VOID_RETURN; } - (this->*each_body_func)(db, db_path, user_data); + (this->*each_body_func)(ctx, db, db_path, user_data); - grn_obj_close(ctx_, db); + grn_obj_close(ctx, db); DBUG_VOID_RETURN; } @@ -150,8 +190,7 @@ namespace mrn { size_t raw_path_prefix_length = strlen(raw_path_prefix); size_t separator_position = raw_path_prefix_length; for (; separator_position > 0; separator_position--) { - if (base_directory_buffer_[separator_position] == FN_LIBCHAR || - base_directory_buffer_[separator_position] == FN_LIBCHAR2) { + if (mrn_is_directory_separator(base_directory_buffer_[separator_position])) { break; } } @@ -169,34 +208,46 @@ namespace mrn { DBUG_VOID_RETURN; } - void DatabaseRepairer::is_crashed_body(grn_obj *db, - const char *db_path, - void *user_data) { + void DatabaseRepairer::check_body(grn_ctx *ctx, + grn_obj *db, + const char *db_path, + void *user_data) { MRN_DBUG_ENTER_METHOD(); - bool *is_crashed = static_cast(user_data); + CheckResult *result = static_cast(user_data); - if (grn_obj_is_locked(ctx_, db)) { - *is_crashed = true; + if (grn_obj_is_locked(ctx, db)) { + result->is_crashed = true; + result->is_corrupt = true; DBUG_VOID_RETURN; } grn_table_cursor *cursor; - cursor = grn_table_cursor_open(ctx_, db, + cursor = grn_table_cursor_open(ctx, db, NULL, 0, NULL, 0, 0, -1, GRN_CURSOR_BY_ID); if (!cursor) { - *is_crashed = true; + result->is_crashed = true; + result->is_corrupt = true; DBUG_VOID_RETURN; } grn_id id; - while ((id = grn_table_cursor_next(ctx_, cursor)) != GRN_ID_NIL) { - grn_obj *object = grn_ctx_at(ctx_, id); + while ((id = grn_table_cursor_next(ctx, cursor)) != GRN_ID_NIL) { + if (grn_id_is_builtin(ctx, id)) { + continue; + } + + grn_obj *object = grn_ctx_at(ctx, id); if (!object) { - continue; + if (ctx->rc == GRN_SUCCESS) { + continue; + } else { + result->is_corrupt = true; + break; + } } switch (object->header.type) { @@ -207,37 +258,40 @@ namespace mrn { case GRN_COLUMN_FIX_SIZE: case GRN_COLUMN_VAR_SIZE: case GRN_COLUMN_INDEX: - grn_obj_is_locked(ctx_, object); - *is_crashed = true; + if (grn_obj_is_locked(ctx_, object)) { + result->is_crashed = true; + result->is_corrupt = true; + } break; default: break; } - grn_obj_unlink(ctx_, object); + grn_obj_unlink(ctx, object); - if (*is_crashed) { + if (result->is_crashed || result->is_corrupt) { break; } } - grn_table_cursor_close(ctx_, cursor); + grn_table_cursor_close(ctx, cursor); DBUG_VOID_RETURN; } - void DatabaseRepairer::repair_body(grn_obj *db, + void DatabaseRepairer::repair_body(grn_ctx *ctx, + grn_obj *db, const char *db_path, void *user_data) { MRN_DBUG_ENTER_METHOD(); bool *succeeded = static_cast(user_data); - if (grn_db_recover(ctx_, db) != GRN_SUCCESS) { + if (grn_db_recover(ctx, db) != GRN_SUCCESS) { push_warning_printf(thd_, MRN_SEVERITY_WARNING, ER_NOT_KEYFILE, "mroonga: repair: " "Failed to recover database: <%s>: <%s>", - db_path, ctx_->errbuf); + db_path, ctx->errbuf); *succeeded = false; } diff --git a/storage/mroonga/lib/mrn_database_repairer.hpp b/storage/mroonga/lib/mrn_database_repairer.hpp index 12e2bbc9c..d46ae8380 100644 --- a/storage/mroonga/lib/mrn_database_repairer.hpp +++ b/storage/mroonga/lib/mrn_database_repairer.hpp @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2 -*- */ /* - Copyright(C) 2015 Kouhei Sutou + Copyright(C) 2015-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -28,6 +28,7 @@ namespace mrn { DatabaseRepairer(grn_ctx *ctx, THD *thd); ~DatabaseRepairer(void); bool is_crashed(void); + bool is_corrupt(void); bool repair(void); private: @@ -40,18 +41,26 @@ namespace mrn { size_t path_prefix_length_; size_t mrn_db_file_suffix_length_; - typedef void (DatabaseRepairer::*EachBodyFunc)(grn_obj *db, + typedef void (DatabaseRepairer::*EachBodyFunc)(grn_ctx *ctx, + grn_obj *db, const char *db_path, void *user_data); void each_database(EachBodyFunc each_body_func, void *user_data); void each_database_body(const char *base_path, + grn_ctx *ctx, EachBodyFunc each_body_func, void *user_data); void detect_paths(void); - void is_crashed_body(grn_obj *db, const char *db_path, void *user_data); - void repair_body(grn_obj *db, const char *db_path, void *user_data); + void check_body(grn_ctx *ctx, + grn_obj *db, + const char *db_path, + void *user_data); + void repair_body(grn_ctx *ctx, + grn_obj *db, + const char *db_path, + void *user_data); }; } diff --git a/storage/mroonga/lib/mrn_index_table_name.cpp b/storage/mroonga/lib/mrn_index_table_name.cpp index a4a687c79..1cc510ad7 100644 --- a/storage/mroonga/lib/mrn_index_table_name.cpp +++ b/storage/mroonga/lib/mrn_index_table_name.cpp @@ -1,7 +1,7 @@ /* -*- c-basic-offset: 2 -*- */ /* Copyright(C) 2011 Kentoku SHIBA - Copyright(C) 2011-2012 Kouhei Sutou + 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 @@ -26,7 +26,8 @@ #define MRN_CLASS_NAME "mrn::IndexTableName" namespace mrn { - const char *IndexTableName::SEPARATOR = "-"; + const char *IndexTableName::SEPARATOR = "#"; + const char *IndexTableName::OLD_SEPARATOR = "-"; bool IndexTableName::is_custom_name(const char *table_name, size_t table_name_length, @@ -43,9 +44,12 @@ namespace mrn { DBUG_RETURN(true); } - if (strncmp(SEPARATOR, - index_table_name + table_name_length, - strlen(SEPARATOR)) != 0) { + if ((strncmp(OLD_SEPARATOR, + index_table_name + table_name_length, + strlen(OLD_SEPARATOR)) != 0) && + (strncmp(SEPARATOR, + index_table_name + table_name_length, + strlen(SEPARATOR)) != 0)) { DBUG_RETURN(true); } @@ -63,6 +67,12 @@ namespace mrn { encoded_mysql_index_name_multibyte + MRN_MAX_KEY_SIZE, mysql_index_name_multibyte, mysql_index_name_multibyte + strlen(mysql_index_name_)); + snprintf(old_name_, MRN_MAX_KEY_SIZE, + "%s%s%s", + table_name_, + OLD_SEPARATOR, + encoded_mysql_index_name_multibyte); + old_length_ = strlen(old_name_); snprintf(name_, MRN_MAX_KEY_SIZE, "%s%s%s", table_name_, @@ -79,6 +89,14 @@ namespace mrn { return length_; } + const char *IndexTableName::old_c_str() { + return old_name_; + } + + size_t IndexTableName::old_length() { + return old_length_; + } + uint IndexTableName::encode(uchar *encoded_start, uchar *encoded_end, const uchar *mysql_string_start, diff --git a/storage/mroonga/lib/mrn_index_table_name.hpp b/storage/mroonga/lib/mrn_index_table_name.hpp index c4f162286..abaccfae2 100644 --- a/storage/mroonga/lib/mrn_index_table_name.hpp +++ b/storage/mroonga/lib/mrn_index_table_name.hpp @@ -1,7 +1,7 @@ /* -*- c-basic-offset: 2 -*- */ /* Copyright(C) 2011 Kentoku SHIBA - Copyright(C) 2011-2012 Kouhei Sutou + 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 @@ -27,6 +27,7 @@ namespace mrn { class IndexTableName { public: static const char *SEPARATOR; + static const char *OLD_SEPARATOR; static bool is_custom_name(const char *table_name, size_t table_name_length, @@ -36,9 +37,13 @@ namespace mrn { IndexTableName(const char *table_name, const char *mysql_index_name); const char *c_str(); size_t length(); + const char *old_c_str(); + size_t old_length(); private: const char *table_name_; const char *mysql_index_name_; + char old_name_[MRN_MAX_KEY_SIZE]; + size_t old_length_; char name_[MRN_MAX_KEY_SIZE]; size_t length_; diff --git a/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp b/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp index c7ef9dd58..0038a7fe3 100644 --- a/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp +++ b/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp @@ -288,6 +288,7 @@ namespace mrn { decode_long_long_int(current_grn_key, &grn_time); TimeConverter time_converter; MYSQL_TIME mysql_time; + mysql_time.neg = FALSE; mysql_time.time_type = MYSQL_TIMESTAMP_DATETIME; time_converter.grn_time_to_mysql_time(grn_time, &mysql_time); long long int mysql_datetime_packed = @@ -518,6 +519,14 @@ namespace mrn { *data_type = TYPE_BYTE_SEQUENCE; *data_size = key_part->length; break; +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + case MYSQL_TYPE_JSON: + // TODO + DBUG_PRINT("info", ("mroonga: MYSQL_TYPE_JSON")); + *data_type = TYPE_BYTE_SEQUENCE; + *data_size = key_part->length; + break; +#endif } DBUG_VOID_RETURN; } diff --git a/storage/mroonga/lib/mrn_multiple_column_key_codec.hpp b/storage/mroonga/lib/mrn_multiple_column_key_codec.hpp index 2b3f935d4..14003cda9 100644 --- a/storage/mroonga/lib/mrn_multiple_column_key_codec.hpp +++ b/storage/mroonga/lib/mrn_multiple_column_key_codec.hpp @@ -20,11 +20,11 @@ #ifndef MRN_MULTIPLE_COLUMN_KEY_CODEC_HPP_ #define MRN_MULTIPLE_COLUMN_KEY_CODEC_HPP_ -#include - #include #include +#include + namespace mrn { class MultipleColumnKeyCodec { public: diff --git a/storage/mroonga/lib/mrn_operation.cpp b/storage/mroonga/lib/mrn_operation.cpp new file mode 100644 index 000000000..2dab41108 --- /dev/null +++ b/storage/mroonga/lib/mrn_operation.cpp @@ -0,0 +1,51 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include "mrn_operation.hpp" + +// for debug +#define MRN_CLASS_NAME "mrn::Operation" + +namespace mrn { + Operation::Operation(mrn::Operations *operations, + const char *type, + const char *table_name, + size_t table_name_size) + : operations_(operations), + id_(operations_->start(type, table_name, table_name_size)) { + } + + Operation::~Operation() { + MRN_DBUG_ENTER_METHOD(); + + operations_->finish(id_); + + DBUG_VOID_RETURN; + } + + void Operation::record_target(grn_id record_id) { + MRN_DBUG_ENTER_METHOD(); + + operations_->record_target(id_, record_id); + + DBUG_VOID_RETURN; + } +} diff --git a/storage/mroonga/lib/mrn_operation.hpp b/storage/mroonga/lib/mrn_operation.hpp new file mode 100644 index 000000000..899c92e95 --- /dev/null +++ b/storage/mroonga/lib/mrn_operation.hpp @@ -0,0 +1,42 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef MRN_OPERATION_HPP_ +#define MRN_OPERATION_HPP_ + +#include + +namespace mrn { + class Operation { + public: + Operation(mrn::Operations *operations, + const char *type, + const char *table_name, + size_t table_name_size); + ~Operation(); + + void record_target(grn_id record_id); + + private: + mrn::Operations *operations_; + grn_id id_; + }; +} + +#endif /* MRN_OPERATION_HPP_ */ diff --git a/storage/mroonga/lib/mrn_operations.cpp b/storage/mroonga/lib/mrn_operations.cpp new file mode 100644 index 000000000..572907cdc --- /dev/null +++ b/storage/mroonga/lib/mrn_operations.cpp @@ -0,0 +1,401 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include "mrn_operations.hpp" + +// for debug +#define MRN_CLASS_NAME "mrn::Operations" + +#define TABLE_NAME "mroonga_operations" +#define COLUMN_TYPE_NAME "type" +#define COLUMN_TABLE_NAME "table" +#define COLUMN_RECORD_NAME "record" + +namespace mrn { + Operations::Operations(grn_ctx *ctx) + : ctx_(ctx) { + MRN_DBUG_ENTER_METHOD(); + + GRN_TEXT_INIT(&text_buffer_, GRN_OBJ_DO_SHALLOW_COPY); + GRN_UINT32_INIT(&id_buffer_, 0); + + table_ = grn_ctx_get(ctx_, TABLE_NAME, -1); + if (!table_) { + table_ = grn_table_create(ctx_, + TABLE_NAME, strlen(TABLE_NAME), + NULL, + GRN_OBJ_TABLE_NO_KEY | GRN_OBJ_PERSISTENT, + NULL, NULL); + columns_.type_ = + grn_column_create(ctx_, table_, + COLUMN_TYPE_NAME, strlen(COLUMN_TYPE_NAME), + NULL, + GRN_OBJ_COLUMN_SCALAR | GRN_OBJ_PERSISTENT, + grn_ctx_at(ctx_, GRN_DB_SHORT_TEXT)); + columns_.table_ = + grn_column_create(ctx_, table_, + COLUMN_TABLE_NAME, strlen(COLUMN_TABLE_NAME), + NULL, + GRN_OBJ_COLUMN_SCALAR | GRN_OBJ_PERSISTENT, + grn_ctx_at(ctx_, GRN_DB_SHORT_TEXT)); + columns_.record_ = + grn_column_create(ctx_, table_, + COLUMN_RECORD_NAME, strlen(COLUMN_RECORD_NAME), + NULL, + GRN_OBJ_COLUMN_SCALAR | GRN_OBJ_PERSISTENT, + grn_ctx_at(ctx_, GRN_DB_UINT32)); + } else { + columns_.type_ = grn_ctx_get(ctx_, TABLE_NAME "." COLUMN_TYPE_NAME, -1); + columns_.table_ = grn_ctx_get(ctx_, TABLE_NAME "." COLUMN_TABLE_NAME, -1); + columns_.record_ = grn_ctx_get(ctx_, TABLE_NAME "." COLUMN_RECORD_NAME, -1); + } + + is_enabled_recording_ = true; + + DBUG_VOID_RETURN; + } + + Operations::~Operations() { + MRN_DBUG_ENTER_METHOD(); + + GRN_OBJ_FIN(ctx_, &id_buffer_); + GRN_OBJ_FIN(ctx_, &text_buffer_); + + DBUG_VOID_RETURN; + } + + bool Operations::is_locked() { + MRN_DBUG_ENTER_METHOD(); + + if (grn_obj_is_locked(ctx_, table_) > 0) + DBUG_RETURN(true); + + if (grn_obj_is_locked(ctx_, columns_.type_) > 0) + DBUG_RETURN(true); + + if (grn_obj_is_locked(ctx_, columns_.table_) > 0) + DBUG_RETURN(true); + + if (grn_obj_is_locked(ctx_, columns_.record_) > 0) + DBUG_RETURN(true); + + DBUG_RETURN(false); + } + + grn_id Operations::start(const char *type, + const char *table_name, size_t table_name_size) { + MRN_DBUG_ENTER_METHOD(); + + if (!is_enabled_recording_) { + DBUG_RETURN(GRN_ID_NIL); + } + + grn_id id = grn_table_add(ctx_, table_, NULL, 0, NULL); + + GRN_TEXT_SETS(ctx_, &text_buffer_, type); + grn_obj_set_value(ctx_, columns_.type_, id, &text_buffer_, GRN_OBJ_SET); + + GRN_TEXT_SET(ctx_, &text_buffer_, table_name, table_name_size); + grn_obj_set_value(ctx_, columns_.table_, id, &text_buffer_, GRN_OBJ_SET); + + DBUG_RETURN(id); + } + + void Operations::record_target(grn_id id, grn_id record_id) { + MRN_DBUG_ENTER_METHOD(); + + if (!is_enabled_recording_) { + DBUG_VOID_RETURN; + } + + GRN_UINT32_SET(ctx_, &id_buffer_, record_id); + grn_obj_set_value(ctx_, columns_.record_, id, &id_buffer_, GRN_OBJ_SET); + + DBUG_VOID_RETURN; + } + + void Operations::finish(grn_id id) { + MRN_DBUG_ENTER_METHOD(); + + if (!is_enabled_recording_) { + DBUG_VOID_RETURN; + } + + grn_table_delete_by_id(ctx_, table_, id); + + DBUG_VOID_RETURN; + } + + void Operations::enable_recording() { + MRN_DBUG_ENTER_METHOD(); + + is_enabled_recording_ = true; + + DBUG_VOID_RETURN; + } + + void Operations::disable_recording() { + MRN_DBUG_ENTER_METHOD(); + + is_enabled_recording_ = false; + + DBUG_VOID_RETURN; + } + + grn_hash *Operations::collect_processing_table_names() { + MRN_DBUG_ENTER_METHOD(); + + grn_hash *table_names = + grn_hash_create(ctx_, NULL, GRN_TABLE_MAX_KEY_SIZE, 0, + GRN_OBJ_TABLE_HASH_KEY | GRN_OBJ_KEY_VAR_SIZE); + + grn_table_cursor *cursor; + cursor = grn_table_cursor_open(ctx_, table_, NULL, 0, NULL, 0, 0, -1, 0); + if (!cursor) { + GRN_LOG(ctx_, GRN_LOG_NOTICE, + "[operations] failed to open cursor: %s", + ctx_->errbuf); + DBUG_RETURN(table_names); + } + + grn_id id; + while ((id = grn_table_cursor_next(ctx_, cursor))) { + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.table_, id, &text_buffer_); + if (GRN_TEXT_LEN(&text_buffer_) > 0) { + grn_hash_add(ctx_, table_names, + GRN_TEXT_VALUE(&text_buffer_), + GRN_TEXT_LEN(&text_buffer_), + NULL, + NULL); + } + } + grn_table_cursor_close(ctx_, cursor); + + DBUG_RETURN(table_names); + } + + int Operations::repair(const char *table_name, size_t table_name_size) { + MRN_DBUG_ENTER_METHOD(); + + int error = 0; + + grn_table_cursor *cursor; + cursor = grn_table_cursor_open(ctx_, table_, NULL, 0, NULL, 0, 0, -1, 0); + if (!cursor) { + error = HA_ERR_CRASHED_ON_USAGE; + if (ctx_->rc) { + my_message(error, ctx_->errbuf, MYF(0)); + } else { + my_message(error, + "mroonga: repair: " + "failed to open cursor for operations table", + MYF(0)); + } + DBUG_RETURN(error); + } + + grn_obj *target_table = grn_ctx_get(ctx_, table_name, table_name_size); + if (!target_table) { + GRN_LOG(ctx_, GRN_LOG_WARNING, + "table doesn't exist for auto repair: <%.*s>", + static_cast(table_name_size), table_name); + } + + grn_id id; + while ((id = grn_table_cursor_next(ctx_, cursor))) { + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.table_, id, &text_buffer_); + if (!((static_cast(GRN_TEXT_LEN(&text_buffer_)) == + table_name_size) && + memcmp(GRN_TEXT_VALUE(&text_buffer_), + table_name, + table_name_size) == 0)) { + continue; + } + + if (!target_table) { + grn_rc rc = grn_table_cursor_delete(ctx_, cursor); + if (rc != GRN_SUCCESS) { + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.type_, id, &text_buffer_); + GRN_TEXT_PUTC(ctx_, &text_buffer_, '\0'); + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: repair: failed to delete an orphan operation: " + "[%u]: <%.*s>[%s]: <%s>(%d)", + id, + static_cast(table_name_size), table_name, + GRN_TEXT_VALUE(&text_buffer_), + ctx_->errbuf, + rc); + my_message(error, error_message, MYF(0)); + break; + } + continue; + } + + GRN_BULK_REWIND(&id_buffer_); + grn_obj_get_value(ctx_, columns_.record_, id, &id_buffer_); + grn_id record_id = GRN_UINT32_VALUE(&id_buffer_); + if (record_id == GRN_ID_NIL) { + grn_rc rc = grn_table_cursor_delete(ctx_, cursor); + if (rc != GRN_SUCCESS) { + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.type_, id, &text_buffer_); + GRN_TEXT_PUTC(ctx_, &text_buffer_, '\0'); + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: repair: " + "failed to delete an operation that has no related record: " + "[%u]: <%.*s>[%s]: <%s>(%d)", + id, + static_cast(table_name_size), table_name, + GRN_TEXT_VALUE(&text_buffer_), + ctx_->errbuf, + rc); + my_message(error, error_message, MYF(0)); + break; + } + continue; + } + + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.type_, id, &text_buffer_); + GRN_TEXT_PUTC(ctx_, &text_buffer_, '\0'); + if (strcmp(GRN_TEXT_VALUE(&text_buffer_), "write") == 0 || + strcmp(GRN_TEXT_VALUE(&text_buffer_), "delete") == 0) { + grn_rc rc = grn_table_delete_by_id(ctx_, target_table, record_id); + if (rc != GRN_SUCCESS) { + error = HA_ERR_CRASHED_ON_USAGE; + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: repair: failed to delete an incomplete record: " + "[%u]: <%.*s>[%u]: <%s>(%d)", + id, + static_cast(table_name_size), table_name, + record_id, + ctx_->errbuf, + rc); + my_message(error, error_message, MYF(0)); + break; + } + + rc = grn_table_cursor_delete(ctx_, cursor); + if (rc != GRN_SUCCESS) { + error = HA_ERR_CRASHED_ON_USAGE; + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: repair: failed to delete an incomplete operation: " + "[%u]: <%.*s>[%u][%s]: <%s>(%d)", + id, + static_cast(table_name_size), table_name, + record_id, + GRN_TEXT_VALUE(&text_buffer_), + ctx_->errbuf, + rc); + my_message(error, error_message, MYF(0)); + break; + } + } else if (strcmp(GRN_TEXT_VALUE(&text_buffer_), "update") == 0) { + error = HA_ERR_CRASHED_ON_USAGE; + my_message(error, + "mroonga: repair: can't recover from crash while updating", + MYF(0)); + break; + } else { + error = HA_ERR_CRASHED_ON_USAGE; + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: repair: unknown operation type: " + "[%u]: <%.*s>[%u]: <%s>", + id, + static_cast(table_name_size), table_name, + record_id, + GRN_TEXT_VALUE(&text_buffer_)); + my_message(error, error_message, MYF(0)); + break; + } + } + grn_table_cursor_close(ctx_, cursor); + + DBUG_RETURN(error); + } + + int Operations::clear(const char *table_name, size_t table_name_size) { + MRN_DBUG_ENTER_METHOD(); + + int error = 0; + + grn_table_cursor *cursor; + cursor = grn_table_cursor_open(ctx_, table_, NULL, 0, NULL, 0, 0, -1, 0); + if (!cursor) { + error = HA_ERR_CRASHED_ON_USAGE; + if (ctx_->rc) { + my_message(error, ctx_->errbuf, MYF(0)); + } else { + my_message(error, + "mroonga: clear: " + "failed to open cursor for operations table", + MYF(0)); + } + DBUG_RETURN(error); + } + + grn_id id; + while ((id = grn_table_cursor_next(ctx_, cursor))) { + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.table_, id, &text_buffer_); + if ((static_cast(GRN_TEXT_LEN(&text_buffer_)) == + table_name_size) && + memcmp(GRN_TEXT_VALUE(&text_buffer_), + table_name, + table_name_size) == 0) { + grn_rc rc = grn_table_cursor_delete(ctx_, cursor); + if (rc != GRN_SUCCESS) { + error = HA_ERR_CRASHED_ON_USAGE; + GRN_BULK_REWIND(&id_buffer_); + grn_obj_get_value(ctx_, columns_.record_, id, &id_buffer_); + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.type_, id, &text_buffer_); + GRN_TEXT_PUTC(ctx_, &text_buffer_, '\0'); + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: clear: failed to delete an operation: " + "[%u]: <%.*s>[%u][%s]: <%s>(%d)", + id, + static_cast(table_name_size), table_name, + GRN_UINT32_VALUE(&id_buffer_), + GRN_TEXT_VALUE(&text_buffer_), + ctx_->errbuf, + rc); + my_message(error, error_message, MYF(0)); + break; + } + } + } + grn_table_cursor_close(ctx_, cursor); + + DBUG_RETURN(error); + } +} diff --git a/storage/mroonga/lib/mrn_operations.hpp b/storage/mroonga/lib/mrn_operations.hpp new file mode 100644 index 000000000..762a5ee9d --- /dev/null +++ b/storage/mroonga/lib/mrn_operations.hpp @@ -0,0 +1,60 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef MRN_OPERATIONS_HPP_ +#define MRN_OPERATIONS_HPP_ + +#include + +namespace mrn { + class Operations { + public: + Operations(grn_ctx *ctx); + ~Operations(); + + bool is_locked(); + + grn_id start(const char *type, + const char *table_name, size_t table_name_size); + void record_target(grn_id id, grn_id target_id); + void finish(grn_id id); + + void enable_recording(); + void disable_recording(); + + grn_hash *collect_processing_table_names(); + + int repair(const char *table_name, size_t table_name_size); + int clear(const char *table_name, size_t table_name_size); + + private: + grn_ctx *ctx_; + grn_obj text_buffer_; + grn_obj id_buffer_; + grn_obj *table_; + struct { + grn_obj *type_; + grn_obj *table_; + grn_obj *record_; + } columns_; + bool is_enabled_recording_; + }; +} + +#endif /* MRN_OPERATIONS_HPP_ */ diff --git a/storage/mroonga/lib/mrn_path_mapper.cpp b/storage/mroonga/lib/mrn_path_mapper.cpp index 7a595986f..43f276f4e 100644 --- a/storage/mroonga/lib/mrn_path_mapper.cpp +++ b/storage/mroonga/lib/mrn_path_mapper.cpp @@ -222,4 +222,8 @@ namespace mrn { mysql_path_[i] = '\0'; return mysql_path_; } + + bool PathMapper::is_internal_table_name() { + return mysql_table_name()[0] == '#'; + } } diff --git a/storage/mroonga/lib/mrn_path_mapper.hpp b/storage/mroonga/lib/mrn_path_mapper.hpp index 607bfe4cd..9849d5e28 100644 --- a/storage/mroonga/lib/mrn_path_mapper.hpp +++ b/storage/mroonga/lib/mrn_path_mapper.hpp @@ -38,6 +38,8 @@ namespace mrn { const char *table_name(); const char *mysql_table_name(); const char *mysql_path(); + bool is_internal_table_name(); + bool is_temporary_table_name(); private: const char *original_mysql_path_; const char *path_prefix_; diff --git a/storage/mroonga/lib/mrn_query_parser.cpp b/storage/mroonga/lib/mrn_query_parser.cpp new file mode 100644 index 000000000..4e05069a3 --- /dev/null +++ b/storage/mroonga/lib/mrn_query_parser.cpp @@ -0,0 +1,361 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 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-1301 USA +*/ + +#include "mrn_query_parser.hpp" + +#include + +extern "C" { + /* Groonga's internal functions */ + int grn_atoi(const char *nptr, const char *end, const char **rest); + uint grn_atoui(const char *nptr, const char *end, const char **rest); +} + +#define MRN_CLASS_NAME "mrn::QueryParser" + +namespace mrn { + QueryParser::QueryParser(grn_ctx *ctx, + THD *thd, + grn_obj *expression, + grn_obj *default_column, + uint n_sections, + grn_obj *match_columns) + : ctx_(ctx), + thd_(thd), + expression_(expression), + default_column_(default_column), + n_sections_(n_sections), + match_columns_(match_columns) { + } + + QueryParser::~QueryParser() { + } + + grn_rc QueryParser::parse(const char *query, size_t query_length) { + MRN_DBUG_ENTER_METHOD(); + + const char *raw_query = NULL; + size_t raw_query_length = 0; + grn_operator default_operator = GRN_OP_OR; + grn_expr_flags expression_flags = 0; + parse_pragma(query, + query_length, + &raw_query, + &raw_query_length, + &default_operator, + &expression_flags); + + grn_obj *default_column = default_column_; + if (match_columns_) { + default_column = match_columns_; + } + grn_rc rc = grn_expr_parse(ctx_, + expression_, + raw_query, + raw_query_length, + default_column, + GRN_OP_MATCH, + default_operator, + expression_flags); + if (rc != GRN_SUCCESS) { + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "failed to parse fulltext search keyword: <%.*s>: <%s>", + static_cast(query_length), + query, + ctx_->errbuf); + variables::ActionOnError action = + variables::get_action_on_fulltext_query_error(thd_); + switch (action) { + case variables::ACTION_ON_ERROR_ERROR: + my_message(ER_PARSE_ERROR, error_message, MYF(0)); + break; + case variables::ACTION_ON_ERROR_ERROR_AND_LOG: + my_message(ER_PARSE_ERROR, error_message, MYF(0)); + GRN_LOG(ctx_, GRN_LOG_ERROR, "%s", error_message); + break; + case variables::ACTION_ON_ERROR_IGNORE: + break; + case variables::ACTION_ON_ERROR_IGNORE_AND_LOG: + GRN_LOG(ctx_, GRN_LOG_ERROR, "%s", error_message); + break; + } + } + + DBUG_RETURN(rc); + } + + void QueryParser::parse_pragma(const char *query, + size_t query_length, + const char **raw_query, + size_t *raw_query_length, + grn_operator *default_operator, + grn_expr_flags *flags) { + MRN_DBUG_ENTER_METHOD(); + + const char *current_query = query; + size_t current_query_length = query_length; + + *default_operator = GRN_OP_OR; + + if (current_query_length >= 4 && memcmp(current_query, "*SS ", 4) == 0) { + *raw_query = current_query + 4; + *raw_query_length = current_query_length - 4; + *flags = GRN_EXPR_SYNTAX_SCRIPT; + DBUG_VOID_RETURN; + } + + bool weight_specified = false; + *raw_query = query; + *raw_query_length = query_length; + *flags = default_expression_flags(); + if (current_query_length >= 2 && current_query[0] == '*') { + bool parsed = false; + bool done = false; + current_query++; + current_query_length--; + while (!done) { + size_t consumed_query_length = 0; + switch (current_query[0]) { + case 'D': + if (parse_pragma_d(current_query + 1, + current_query_length - 1, + default_operator, + &consumed_query_length)) { + parsed = true; + consumed_query_length += 1; + current_query += consumed_query_length; + current_query_length -= consumed_query_length; + } else { + done = true; + } + break; + case 'W': + if (parse_pragma_w(current_query + 1, + current_query_length - 1, + &consumed_query_length)) { + parsed = true; + weight_specified = true; + consumed_query_length += 1; + current_query += consumed_query_length; + current_query_length -= consumed_query_length; + } else { + done = true; + } + break; + default: + done = true; + break; + } + } + if (parsed) { + *raw_query = current_query; + *raw_query_length = current_query_length; + } + } + + // WORKAROUND: ignore the first '+' to support "+apple macintosh" pattern. + while (*raw_query_length > 0 && (*raw_query)[0] == ' ') { + (*raw_query)++; + (*raw_query_length)--; + } + if (*raw_query_length > 0 && (*raw_query)[0] == '+') { + (*raw_query)++; + (*raw_query_length)--; + } + if (!weight_specified && match_columns_) { + grn_expr_append_obj(ctx_, match_columns_, default_column_, GRN_OP_PUSH, 1); + } + + DBUG_VOID_RETURN; + } + + bool QueryParser::parse_pragma_w(const char *query, + size_t query_length, + size_t *consumed_query_length) { + MRN_DBUG_ENTER_METHOD(); + + *consumed_query_length = 0; + + grn_obj section_value_buffer; + GRN_UINT32_INIT(§ion_value_buffer, 0); + + MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(bool, specified_sections, n_sections_); + for (uint i = 0; i < n_sections_; ++i) { + specified_sections[i] = false; + } + + uint n_weights = 0; + while (query_length >= 1) { + if (n_weights >= 1) { + if (query[0] != ',') { + break; + } + size_t n_used_query_length = 1; + *consumed_query_length += n_used_query_length; + query_length -= n_used_query_length; + query += n_used_query_length; + if (query_length == 0) { + break; + } + } + + uint section = 0; + if ('1' <= query[0] && query[0] <= '9') { + const char *section_start = query; + const char *query_end = query + query_length; + const char *query_rest; + section = grn_atoui(section_start, query_end, &query_rest); + if (section_start == query_rest) { + break; + } + if (!(0 < section && section <= n_sections_)) { + break; + } + section -= 1; + specified_sections[section] = true; + size_t n_used_query_length = query_rest - query; + *consumed_query_length += n_used_query_length; + query_length -= n_used_query_length; + query += n_used_query_length; + } else { + break; + } + + int weight = 1; + if (query_length >= 2 && query[0] == ':') { + const char *weight_start = query + 1; + const char *query_end = query + query_length; + const char *query_rest; + weight = grn_atoi(weight_start, query_end, &query_rest); + if (weight_start == query_rest) { + break; + } + size_t n_used_query_length = query_rest - query; + *consumed_query_length += n_used_query_length; + query_length -= n_used_query_length; + query += n_used_query_length; + } + + n_weights++; + + append_section(section, + §ion_value_buffer, + weight, + n_weights); + } + + for (uint section = 0; section < n_sections_; ++section) { + if (specified_sections[section]) { + continue; + } + + ++n_weights; + + int default_weight = 1; + append_section(section, + §ion_value_buffer, + default_weight, + n_weights); + } + MRN_FREE_VARIABLE_LENGTH_ARRAYS(specified_sections); + + GRN_OBJ_FIN(ctx_, §ion_value_buffer); + + DBUG_RETURN(n_weights > 0); + } + + void QueryParser::append_section(uint section, + grn_obj *section_value_buffer, + int weight, + uint n_weights) { + MRN_DBUG_ENTER_METHOD(); + + if (!match_columns_) { + DBUG_VOID_RETURN; + } + + grn_expr_append_obj(ctx_, match_columns_, default_column_, GRN_OP_PUSH, 1); + GRN_UINT32_SET(ctx_, section_value_buffer, section); + grn_expr_append_const(ctx_, match_columns_, section_value_buffer, + GRN_OP_PUSH, 1); + grn_expr_append_op(ctx_, match_columns_, GRN_OP_GET_MEMBER, 2); + + if (weight != 1) { + grn_expr_append_const_int(ctx_, match_columns_, weight, GRN_OP_PUSH, 1); + grn_expr_append_op(ctx_, match_columns_, GRN_OP_STAR, 2); + } + + if (n_weights >= 2) { + grn_expr_append_op(ctx_, match_columns_, GRN_OP_OR, 2); + } + + DBUG_VOID_RETURN; + } + + bool QueryParser::parse_pragma_d(const char *query, + size_t query_length, + grn_operator *default_operator, + size_t *consumed_query_length) { + MRN_DBUG_ENTER_METHOD(); + + bool succeeded = true; + if (query_length >= 1 && query[0] == '+') { + *default_operator = GRN_OP_AND; + *consumed_query_length = 1; + } else if (query_length >= 1 && query[0] == '-') { + *default_operator = GRN_OP_AND_NOT; + *consumed_query_length = 1; + } else if (query_length >= 2 && memcmp(query, "OR", 2) == 0) { + *default_operator = GRN_OP_OR; + *consumed_query_length = 2; + } else { + succeeded = false; + } + + DBUG_RETURN(succeeded); + } + + grn_expr_flags QueryParser::default_expression_flags() { + MRN_DBUG_ENTER_METHOD(); + + ulonglong syntax_flags = variables::get_boolean_mode_syntax_flags(thd_); + grn_expr_flags expression_flags = 0; + if (syntax_flags == variables::BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT) { + expression_flags = GRN_EXPR_SYNTAX_QUERY | GRN_EXPR_ALLOW_LEADING_NOT; + } else { + if (syntax_flags & variables::BOOLEAN_MODE_SYNTAX_FLAG_SYNTAX_SCRIPT) { + expression_flags |= GRN_EXPR_SYNTAX_SCRIPT; + } else { + expression_flags |= GRN_EXPR_SYNTAX_QUERY; + } + if (syntax_flags & variables::BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_COLUMN) { + expression_flags |= GRN_EXPR_ALLOW_COLUMN; + } + if (syntax_flags & variables::BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_UPDATE) { + expression_flags |= GRN_EXPR_ALLOW_UPDATE; + } + if (syntax_flags & variables::BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_LEADING_NOT) { + expression_flags |= GRN_EXPR_ALLOW_LEADING_NOT; + } + } + + DBUG_RETURN(expression_flags); + } +} diff --git a/storage/mroonga/lib/mrn_query_parser.hpp b/storage/mroonga/lib/mrn_query_parser.hpp new file mode 100644 index 000000000..8b3c4084c --- /dev/null +++ b/storage/mroonga/lib/mrn_query_parser.hpp @@ -0,0 +1,67 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 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-1301 USA +*/ + +#pragma once + +#include +#include + +#include + +namespace mrn { + class QueryParser { + public: + QueryParser(grn_ctx *ctx, + THD *thd, + grn_obj *expression, + grn_obj *default_column, + uint n_sections, + grn_obj *match_columns=NULL); + ~QueryParser(); + + grn_rc parse(const char *query, size_t query_length); + void parse_pragma(const char *query, + size_t query_length, + const char **raw_query, + size_t *raw_query_length, + grn_operator *default_operator, + grn_expr_flags *flags); + + private: + grn_ctx *ctx_; + THD *thd_; + grn_obj *expression_; + grn_obj *default_column_; + uint n_sections_; + grn_obj *match_columns_; + + bool parse_pragma_w(const char *query, + size_t query_length, + size_t *consumed_query_length); + void append_section(uint section, + grn_obj *section_value_buffer, + int weight, + uint n_weights); + bool parse_pragma_d(const char *query, + size_t query_length, + grn_operator *default_operator, + size_t *consumed_query_length); + grn_expr_flags default_expression_flags(); + }; +} diff --git a/storage/mroonga/lib/mrn_smart_bitmap.cpp b/storage/mroonga/lib/mrn_smart_bitmap.cpp new file mode 100644 index 000000000..9dc91ff29 --- /dev/null +++ b/storage/mroonga/lib/mrn_smart_bitmap.cpp @@ -0,0 +1,42 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 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-1301 USA +*/ + +#include "mrn_smart_bitmap.hpp" + +namespace mrn { + SmartBitmap::SmartBitmap(MY_BITMAP *bitmap) + : bitmap_(bitmap) { + } + + SmartBitmap::~SmartBitmap() { + if (bitmap_) { + bitmap_free(bitmap_); + } + } + + MY_BITMAP *SmartBitmap::get() { + return bitmap_; + } + + MY_BITMAP *SmartBitmap::release() { + MY_BITMAP *bitmap = bitmap_; + bitmap_ = NULL; + return bitmap; + } +} diff --git a/storage/mroonga/lib/mrn_smart_bitmap.hpp b/storage/mroonga/lib/mrn_smart_bitmap.hpp new file mode 100644 index 000000000..dfb569560 --- /dev/null +++ b/storage/mroonga/lib/mrn_smart_bitmap.hpp @@ -0,0 +1,36 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 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-1301 USA +*/ + +#pragma once + +#include +#include + +namespace mrn { + class SmartBitmap { + public: + SmartBitmap(MY_BITMAP *bitmap); + ~SmartBitmap(); + + MY_BITMAP *get(); + MY_BITMAP *release(); + private: + MY_BITMAP *bitmap_; + }; +} diff --git a/storage/mroonga/lib/mrn_table_fields_offset_mover.cpp b/storage/mroonga/lib/mrn_table_fields_offset_mover.cpp new file mode 100644 index 000000000..7f1dae266 --- /dev/null +++ b/storage/mroonga/lib/mrn_table_fields_offset_mover.cpp @@ -0,0 +1,41 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 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-1301 USA +*/ + +#include "mrn_table_fields_offset_mover.hpp" + +namespace mrn { + TableFieldsOffsetMover::TableFieldsOffsetMover(TABLE *table, + my_ptrdiff_t diff) + : table_(table), + diff_(diff) { + uint n_columns = table_->s->fields; + for (uint i = 0; i < n_columns; ++i) { + Field *field = table_->field[i]; + field->move_field_offset(diff_); + } + } + + TableFieldsOffsetMover::~TableFieldsOffsetMover() { + uint n_columns = table_->s->fields; + for (uint i = 0; i < n_columns; ++i) { + Field *field = table_->field[i]; + field->move_field_offset(-diff_); + } + } +} diff --git a/storage/mroonga/lib/mrn_table_fields_offset_mover.hpp b/storage/mroonga/lib/mrn_table_fields_offset_mover.hpp new file mode 100644 index 000000000..a8d12be19 --- /dev/null +++ b/storage/mroonga/lib/mrn_table_fields_offset_mover.hpp @@ -0,0 +1,33 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 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-1301 USA +*/ + +#pragma once + +#include + +namespace mrn { + class TableFieldsOffsetMover { + public: + TableFieldsOffsetMover(TABLE *table, my_ptrdiff_t diff); + ~TableFieldsOffsetMover(); + private: + TABLE *table_; + my_ptrdiff_t diff_; + }; +} diff --git a/storage/mroonga/mrn_err.h b/storage/mroonga/mrn_err.h index d109f87bb..95b1b047c 100644 --- a/storage/mroonga/mrn_err.h +++ b/storage/mroonga/mrn_err.h @@ -39,5 +39,8 @@ #define ER_MRN_INVALID_INDEX_FLAG_NUM 16508 #define ER_MRN_INVALID_INDEX_FLAG_STR \ "The index flag '%-.64s' is invalid. It is ignored" +#define ER_MRN_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN_NUM 16509 +#define ER_MRN_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN_STR \ + "Index for virtual generated column is not supported: %s" #endif /* MRN_ERR_H_ */ diff --git a/storage/mroonga/mrn_mysql.h b/storage/mroonga/mrn_mysql.h index 644825dcf..086d1ea2e 100644 --- a/storage/mroonga/mrn_mysql.h +++ b/storage/mroonga/mrn_mysql.h @@ -43,21 +43,18 @@ #define MYSQL_SERVER 1 #include -#if MYSQL_VERSION_ID < 50500 -# include -# include -#else -# include -# include -# include -# include -#endif -#include - #ifdef MARIADB_BASE_VERSION # define MRN_MARIADB_P 1 #endif +#include +#include +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID < 80002) +# include +#endif +#include +#include + #define MRN_MESSAGE_BUFFER_SIZE 1024 #define MRN_DBUG_ENTER_FUNCTION() DBUG_ENTER(__FUNCTION__) diff --git a/storage/mroonga/mrn_mysql_compat.h b/storage/mroonga/mrn_mysql_compat.h index 660c72b4d..d33a8c88d 100644 --- a/storage/mroonga/mrn_mysql_compat.h +++ b/storage/mroonga/mrn_mysql_compat.h @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2 -*- */ /* - Copyright(C) 2011-2015 Kouhei Sutou + Copyright(C) 2011-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -28,6 +28,10 @@ # define MRN_HAVE_MYSQL_TYPE_TIME2 #endif +#if MYSQL_VERSION_ID >= 50709 && !defined(MRN_MARIADB_P) +# define MRN_HAVE_MYSQL_TYPE_JSON +#endif + #if MYSQL_VERSION_ID < 50603 typedef MYSQL_ERROR Sql_condition; #endif @@ -42,6 +46,10 @@ typedef char *range_id_t; #endif +#if defined(MRN_MARIADB_P) || MYSQL_VERSION_ID < 80002 + typedef st_select_lex SELECT_LEX; +#endif + #if MYSQL_VERSION_ID >= 50609 # define MRN_KEY_HAS_USER_DEFINED_KEYPARTS #endif @@ -99,6 +107,9 @@ #if defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100009 # define MRN_HAVE_TDC_ACQUIRE_SHARE +# if MYSQL_VERSION_ID < 100200 +# define MRN_TDC_ACQUIRE_SHARE_REQUIRE_KEY +# endif #endif #if MYSQL_VERSION_ID >= 50613 @@ -206,6 +217,26 @@ # define MRN_SUPPORT_CUSTOM_OPTIONS #endif +#ifdef MRN_MARIADB_P +# define MRN_HAVE_ITEM_EQUAL_FIELDS_ITERATOR +#endif + +#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) +# define MRN_SELECT_LEX_GET_WHERE_COND(select_lex) \ + ((select_lex)->where_cond()) +# define MRN_SELECT_LEX_GET_HAVING_COND(select_lex) \ + ((select_lex)->having_cond()) +# define MRN_SELECT_LEX_GET_ACTIVE_OPTIONS(select_lex) \ + ((select_lex)->active_options()) +#else +# define MRN_SELECT_LEX_GET_WHERE_COND(select_lex) \ + ((select_lex)->where) +# define MRN_SELECT_LEX_GET_HAVING_COND(select_lex) \ + ((select_lex)->having) +# define MRN_SELECT_LEX_GET_ACTIVE_OPTIONS(select_lex) \ + ((select_lex)->options) +#endif + #if defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100000 # if MYSQL_VERSION_ID >= 100104 # define mrn_init_sql_alloc(thd, mem_root) \ @@ -221,17 +252,25 @@ MYF(0)) # endif #else +# if MYSQL_VERSION_ID >= 50709 +# define mrn_init_sql_alloc(thd, mem_root) \ + init_sql_alloc(mrn_memory_key, \ + mem_root, \ + TABLE_ALLOC_BLOCK_SIZE, \ + 0) +# else # define mrn_init_sql_alloc(thd, mem_root) \ init_sql_alloc(mem_root, \ TABLE_ALLOC_BLOCK_SIZE, \ 0) +# endif #endif #ifdef MRN_MARIADB_P # define MRN_ABORT_ON_WARNING(thd) thd->abort_on_warning #else # if MYSQL_VERSION_ID >= 50706 -# define MRN_ABORT_ON_WARNING(thd) false +# define MRN_ABORT_ON_WARNING(thd) thd->is_strict_mode() # else # define MRN_ABORT_ON_WARNING(thd) thd->abort_on_warning # endif @@ -240,4 +279,204 @@ #define MRN_ERROR_CODE_DATA_TRUNCATE(thd) \ (MRN_ABORT_ON_WARNING(thd) ? ER_WARN_DATA_OUT_OF_RANGE : WARN_DATA_TRUNCATED) +#if MYSQL_VERSION_ID >= 50709 && !defined(MRN_MARIADB_P) +# define mrn_my_hash_init(hash, \ + charset, \ + default_array_elements, \ + key_offset, \ + key_length, \ + get_key, \ + free_element, \ + flags) \ + my_hash_init(hash, \ + charset, \ + default_array_elements, \ + key_offset, \ + key_length, \ + get_key, \ + free_element, \ + flags, \ + mrn_memory_key) +#else +# define mrn_my_hash_init(hash, \ + charset, \ + default_array_elements, \ + key_offset, \ + key_length, \ + get_key, \ + free_element, \ + flags) \ + my_hash_init(hash, \ + charset, \ + default_array_elements, \ + key_offset, \ + key_length, \ + get_key, \ + free_element, \ + flags) +#endif + +#if defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100000 +# define mrn_strconvert(from_cs, \ + from, \ + from_length, \ + to_cs, \ + to, \ + to_length, \ + errors) \ + strconvert((from_cs), \ + (from), \ + (from_length), \ + (to_cs), \ + (to), \ + (to_length), \ + (errors)) +#else +# define mrn_strconvert(from_cs, \ + from, \ + from_length, \ + to_cs, \ + to, \ + to_length, \ + errors) \ + strconvert((from_cs), \ + (from), \ + (to_cs), \ + (to), \ + (to_length), \ + (errors)) +#endif + +#if MYSQL_VERSION_ID >= 50717 && !defined(MRN_MARIADB_P) +# define mrn_is_directory_separator(c) \ + is_directory_separator((c)) +#else +# define mrn_is_directory_separator(c) \ + (c == FN_LIBCHAR || c == FN_LIBCHAR2) +#endif + +#if ((MYSQL_VERSION_ID < 50636) || \ + (MYSQL_VERSION_ID >= 50700 && MYSQL_VERSION_ID < 50718)) && !defined(MRN_MARIADB_P) +# define MRN_HAVE_MYSQL_FIELD_PART_OF_KEY_NOT_CLUSTERED +#endif + +#if defined(MRN_MARIADB_P) && \ + ((MYSQL_VERSION_ID >= 100207) || \ + ((MYSQL_VERSION_ID >= 100126) && (MYSQL_VERSION_ID < 100200)) || \ + ((MYSQL_VERSION_ID >= 100032) && (MYSQL_VERSION_ID < 100100)) || \ + ((MYSQL_VERSION_ID >= 50557) && (MYSQL_VERSION_ID < 100000))) +# define mrn_create_partition_name(out, \ + out_length, \ + in1, \ + in2, \ + name_variant, \ + translate) \ + create_partition_name(out, out_length, in1, in2, name_variant, translate) +# define mrn_create_subpartition_name(out, \ + out_length, \ + in1, \ + in2, \ + in3, \ + name_variant) \ + create_subpartition_name(out, out_length, in1, in2, in3, name_variant) +#else +# define mrn_create_partition_name(out, \ + out_length, \ + in1, \ + in2, \ + name_variant, \ + translate) \ + (create_partition_name(out, in1, in2, name_variant, translate), 0) +# define mrn_create_subpartition_name(out, \ + out_length, \ + in1, \ + in2, \ + in3, \ + name_variant) \ + (create_subpartition_name(out, in1, in2, in3, name_variant), 0) +#endif + +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +# define ITEM_SUM_GET_NEST_LEVEL(sum_item) (sum_item)->base_select->nest_level +# define ITEM_SUM_GET_AGGR_LEVEL(sum_item) (sum_item)->aggr_select->nest_level +# define ITEM_SUM_GET_MAX_AGGR_LEVEL(sum_item) (sum_item)->max_aggr_level +#else +# define ITEM_SUM_GET_NEST_LEVEL(sum_item) (sum_item)->nest_level +# define ITEM_SUM_GET_AGGR_LEVEL(sum_item) (sum_item)->aggr_level +# define ITEM_SUM_GET_MAX_AGGR_LEVEL(sum_item) (sum_item)->max_arg_level +#endif + +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) + typedef bool mrn_bool; +#else + typedef my_bool mrn_bool; +#endif + +#define MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(type, variable_name, variable_size) \ + type *variable_name = \ + (type *)mrn_my_malloc(sizeof(type) * (variable_size), MYF(MY_WME)) +#define MRN_FREE_VARIABLE_LENGTH_ARRAYS(variable_name) \ + my_free(variable_name) + +#if ((defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100203)) || \ + (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 50711) +# define MRN_ALTER_INPLACE_INFO_ADD_VIRTUAL_COLUMN \ + Alter_inplace_info::ADD_VIRTUAL_COLUMN +# define MRN_ALTER_INPLACE_INFO_ADD_STORED_BASE_COLUMN \ + Alter_inplace_info::ADD_STORED_BASE_COLUMN +# define MRN_ALTER_INPLACE_INFO_ADD_STORED_GENERATED_COLUMN \ + Alter_inplace_info::ADD_STORED_GENERATED_COLUMN +#else +# define MRN_ALTER_INPLACE_INFO_ADD_VIRTUAL_COLUMN 0 +# define MRN_ALTER_INPLACE_INFO_ADD_STORED_BASE_COLUMN \ + Alter_inplace_info::ADD_COLUMN +# define MRN_ALTER_INPLACE_INFO_ADD_STORED_GENERATED_COLUMN 0 +#endif + +#if (defined(HA_CAN_VIRTUAL_COLUMNS) || defined(HA_GENERATED_COLUMNS)) +# define MRN_SUPPORT_GENERATED_COLUMNS +#endif + +#ifdef MRN_MARIADB_P +# if (MYSQL_VERSION_ID >= 100200) +# define MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field) \ + (!field->stored_in_db()) +# define MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field) \ + (field->vcol_info && field->vcol_info->is_stored()) +# elif (MYSQL_VERSION_ID >= 50500) +# define MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field) \ + (!field->stored_in_db) +# define MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field) \ + (field->vcol_info && field->vcol_info->is_stored()) +# else +# define MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field) false +# define MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field) false +# endif +#else +# if (MYSQL_VERSION_ID >= 50708) +# define MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field) \ + (field->is_virtual_gcol()) +# define MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field) \ + (field->is_gcol() && !field->is_virtual_gcol()) +# elif (MYSQL_VERSION_ID >= 50706) +# define MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field) \ + (!field->stored_in_db) +# define MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field) \ + (field->gcol_info && field->gcol_info->get_field_stored()) +# else +# define MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field) false +# define MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field) false +# endif +#endif + +#ifdef MRN_MARIADB_P +# if (MYSQL_VERSION_ID >= 100203) +# define MRN_GENERATED_COLUMNS_UPDATE_VIRTUAL_FIELD(table, field) \ + (table->update_virtual_field(field)) +# else +# define MRN_GENERATED_COLUMNS_UPDATE_VIRTUAL_FIELD(table, field) \ + (field->vcol_info->expr_item->save_in_field(field, 0)) +# endif +#endif + #endif /* MRN_MYSQL_COMPAT_H_ */ diff --git a/storage/mroonga/mrn_table.cpp b/storage/mroonga/mrn_table.cpp index 3320fb8ff..c20f688fa 100644 --- a/storage/mroonga/mrn_table.cpp +++ b/storage/mroonga/mrn_table.cpp @@ -1,7 +1,7 @@ /* -*- c-basic-offset: 2 -*- */ /* Copyright(C) 2011-2013 Kentoku SHIBA - Copyright(C) 2011-2015 Kouhei Sutou + Copyright(C) 2011-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -202,7 +202,6 @@ void mrn_get_partition_info(const char *table_name, uint table_name_length, const TABLE *table, partition_element **part_elem, partition_element **sub_elem) { - char tmp_name[FN_REFLEN + 1]; partition_info *part_info = table->part_info; partition_element *tmp_part_elem = NULL, *tmp_sub_elem = NULL; bool tmp_flg = FALSE, tmp_find_flg = FALSE; @@ -224,18 +223,24 @@ void mrn_get_partition_info(const char *table_name, uint table_name_length, List_iterator sub_it((*part_elem)->subpartitions); while ((*sub_elem = sub_it++)) { - if (create_subpartition_name(tmp_name, sizeof(tmp_name), table->s->path.str, - (*part_elem)->partition_name, (*sub_elem)->partition_name, - NORMAL_PART_NAME)) + char subpartition_name[FN_REFLEN + 1]; + int error = mrn_create_subpartition_name(subpartition_name, + sizeof(subpartition_name), + table->s->path.str, + (*part_elem)->partition_name, + (*sub_elem)->partition_name, + NORMAL_PART_NAME); + if (error != 0) DBUG_VOID_RETURN; - DBUG_PRINT("info", ("mroonga tmp_name=%s", tmp_name)); - if (table_name && !memcmp(table_name, tmp_name, table_name_length + 1)) + DBUG_PRINT("info", ("mroonga subpartition name=%s", subpartition_name)); + if (table_name && + memcmp(table_name, subpartition_name, table_name_length + 1) == 0) DBUG_VOID_RETURN; if ( tmp_flg && table_name && - *(tmp_name + table_name_length - 5) == '\0' && - !memcmp(table_name, tmp_name, table_name_length - 5) + *(subpartition_name + table_name_length - 5) == '\0' && + memcmp(table_name, subpartition_name, table_name_length - 5) == 0 ) { tmp_part_elem = *part_elem; tmp_sub_elem = *sub_elem; @@ -244,17 +249,24 @@ void mrn_get_partition_info(const char *table_name, uint table_name_length, } } } else { - if (create_partition_name(tmp_name, sizeof(tmp_name), table->s->path.str, - (*part_elem)->partition_name, NORMAL_PART_NAME, TRUE)) + char partition_name[FN_REFLEN + 1]; + int error = mrn_create_partition_name(partition_name, + sizeof(partition_name), + table->s->path.str, + (*part_elem)->partition_name, + NORMAL_PART_NAME, + TRUE); + if (error != 0) DBUG_VOID_RETURN; - DBUG_PRINT("info", ("mroonga tmp_name=%s", tmp_name)); - if (table_name && !memcmp(table_name, tmp_name, table_name_length + 1)) + DBUG_PRINT("info", ("mroonga partition name=%s", partition_name)); + if (table_name && + memcmp(table_name, partition_name, table_name_length + 1) == 0) DBUG_VOID_RETURN; if ( tmp_flg && table_name && - *(tmp_name + table_name_length - 5) == '\0' && - !memcmp(table_name, tmp_name, table_name_length - 5) + *(partition_name + table_name_length - 5) == '\0' && + memcmp(table_name, partition_name, table_name_length - 5) == 0 ) { tmp_part_elem = *part_elem; tmp_flg = FALSE; @@ -518,6 +530,7 @@ 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 @@ -580,6 +593,10 @@ int mrn_add_index_param(MRN_SHARE *share, KEY *key_info, int i) 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: @@ -1000,29 +1017,34 @@ int mrn_free_share(MRN_SHARE *share) TABLE_SHARE *mrn_get_table_share(TABLE_LIST *table_list, int *error) { - uint key_length; TABLE_SHARE *share; THD *thd = current_thd; MRN_DBUG_ENTER_FUNCTION(); -#ifdef MRN_HAVE_GET_TABLE_DEF_KEY +#if defined(MRN_HAVE_TDC_ACQUIRE_SHARE) && \ + !defined(MRN_TDC_ACQUIRE_SHARE_REQUIRE_KEY) + share = tdc_acquire_share(thd, table_list, GTS_TABLE); +#else + uint key_length; +# ifdef MRN_HAVE_GET_TABLE_DEF_KEY const char *key; key_length = get_table_def_key(table_list, &key); -#else +# else char key[MAX_DBKEY_LENGTH]; key_length = create_table_def_key(thd, key, table_list, FALSE); -#endif -#ifdef MRN_HAVE_TABLE_DEF_CACHE +# endif +# ifdef MRN_HAVE_TABLE_DEF_CACHE my_hash_value_type hash_value; hash_value = my_calc_hash(mrn_table_def_cache, (uchar*) key, key_length); share = get_table_share(thd, table_list, key, key_length, 0, error, hash_value); -#elif defined(MRN_HAVE_TDC_ACQUIRE_SHARE) +# elif defined(MRN_HAVE_TDC_ACQUIRE_SHARE) share = tdc_acquire_share(thd, table_list->db, table_list->table_name, key, key_length, table_list->mdl_request.key.tc_hash_value(), GTS_TABLE, NULL); -#else +# else share = get_table_share(thd, table_list, key, key_length, 0, error); +# endif #endif DBUG_RETURN(share); } @@ -1053,7 +1075,7 @@ TABLE_SHARE *mrn_create_tmp_table_share(TABLE_LIST *table_list, const char *path *error = ER_CANT_OPEN_FILE; DBUG_RETURN(NULL); } - share->tmp_table = INTERNAL_TMP_TABLE; // TODO: is this right? + share->tmp_table = NO_TMP_TABLE; // TODO: is this right? share->path.str = (char *) path; share->path.length = strlen(share->path.str); share->normalized_path.str = mrn_my_strdup(path, MYF(MY_WME)); diff --git a/storage/mroonga/mrn_variables.hpp b/storage/mroonga/mrn_variables.hpp index 6bc948a1c..0866403e5 100644 --- a/storage/mroonga/mrn_variables.hpp +++ b/storage/mroonga/mrn_variables.hpp @@ -26,4 +26,28 @@ extern PSI_memory_key mrn_memory_key; #endif +namespace mrn { + namespace variables { + enum BooleanModeSyntaxFlag { + BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT = (1 << 0), + BOOLEAN_MODE_SYNTAX_FLAG_SYNTAX_QUERY = (1 << 1), + BOOLEAN_MODE_SYNTAX_FLAG_SYNTAX_SCRIPT = (1 << 2), + BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_COLUMN = (1 << 3), + BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_UPDATE = (1 << 4), + BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_LEADING_NOT = (1 << 5) + }; + + ulonglong get_boolean_mode_syntax_flags(THD *thd); + + enum ActionOnError { + ACTION_ON_ERROR_ERROR, + ACTION_ON_ERROR_ERROR_AND_LOG, + ACTION_ON_ERROR_IGNORE, + ACTION_ON_ERROR_IGNORE_AND_LOG, + }; + + ActionOnError get_action_on_fulltext_query_error(THD *thd); + } +} + #endif /* MRN_VARIABLES_HPP_ */ diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_64bit.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_64bit.inc similarity index 83% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_64bit.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/check_64bit.inc index 1b3cf9c09..06b5361f3 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_64bit.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_64bit.inc @@ -12,14 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA disable_query_log; disable_warnings; -let $VERSION_COMPILE_64BIT= - `SELECT IF(@@version_compile_machine like '%64%', 1, 0)`; +let $version_compile_64bit= + `SELECT IF(@@version_compile_machine LIKE '%64%', 1, 0)`; enable_warnings; enable_query_log; -if (!$VERSION_COMPILE_64BIT) { - skip Need a 64 binary; -} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_freebsd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_freebsd.inc index 39503a9c6..7449724b5 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_freebsd.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_freebsd.inc @@ -12,8 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log -let $VERSION_COMPILE_OS_FREEBSD=`SELECT IF(@@version_compile_os like 'FREEBSD%', 1, 0);`; +let $version_compile_os_freebsd= + `SELECT IF(@@version_compile_os LIKE '%freebsd%', 1, 0);`; --enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_ha_mroonga_so.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_ha_mroonga_so.inc index b2212fd94..7063c1d1b 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_ha_mroonga_so.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_ha_mroonga_so.inc @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_windows.inc diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_embedded.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_embedded.inc index 6f89f05b8..f608f5f22 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_embedded.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_embedded.inc @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log let $libgroonga_embedded = `SELECT @@mroonga_libgroonga_embedded;`; 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 index 076be2582..a61058b92 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log let $libgroonga_support_lz4 = 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 index 5d4862957..8f79d05af 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log let $libgroonga_support_zlib = diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zstd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zstd.inc new file mode 100644 index 000000000..1038fe9ee --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zstd.inc @@ -0,0 +1,20 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--disable_query_log +let $libgroonga_support_zstd = + `SELECT @@mroonga_libgroonga_support_zstd;`; +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_mariadb.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_mariadb.inc index 0ef2199b7..50ee66d64 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_mariadb.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_mariadb.inc @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log let $mariadb = `SELECT LOCATE('MariaDB', @@global.version) > 0`; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_osx.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_osx.inc index a664a9c51..2808e107b 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_osx.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_osx.inc @@ -1,4 +1,5 @@ # Copyright(C) 2014 Toshihisa Tashiro +# Copyright(C) 2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +13,19 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log -let $VERSION_COMPILE_OS_OSX=`SELECT IF(@@version_compile_os like 'osx%', 1, 0);`; +let $version_compile_os_osx=`SELECT IF(@@version_compile_os like 'osx%', 1, 0);`; +if ($version_compile_os_osx) { + let $version_compile_os_osx_10_8_or_later= + `SELECT IF(@@version_compile_os = 'osx10.6', 0, 1);`; + if ($version_compile_os_osx_10_8_or_later) { + let $version_compile_os_osx_10_8_or_later= + `SELECT IF(@@version_compile_os = 'osx10.7', 0, 1);`; + } +} +if (!$version_comiple_os_osx) { + let $version_compile_os_osx_10_8_or_later=0; +} --enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_solaris.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_solaris.inc new file mode 100644 index 000000000..cad909d02 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_solaris.inc @@ -0,0 +1,20 @@ +# Copyright(C) 2016 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-1301 USA + +--disable_query_log +let $version_compile_os_solaris= + `SELECT IF(@@version_compile_os LIKE 'sun-solaris%', 1, 0);`; +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_strict_sql_mode.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_strict_sql_mode.inc new file mode 100644 index 000000000..88dfd6602 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_strict_sql_mode.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2017 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-1301 USA + +--disable_query_log +let $strict_sql_mode = + `SELECT @@sql_mode LIKE '%STRICT_TRANS_TABLES%' OR + @@sql_mode LIKE '%STRICT_ALL_TABLES%'`; +--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 cfa7c008e..aaf4f8dac 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-2015 Kouhei Sutou +# Copyright(C) 2012-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,19 +12,22 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log let $version_major_minor = `SELECT CAST(SUBSTRING_INDEX(@@global.version, '.', 2) AS DECIMAL(4, 2))`; -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_5_5 = `SELECT $version_major_minor = 5.5`; +let $version_5_6 = `SELECT $version_major_minor = 5.6`; +let $version_5_7 = `SELECT $version_major_minor = 5.7`; +let $version_10_0 = `SELECT $version_major_minor = 10.0`; +let $version_10_1 = `SELECT $version_major_minor = 10.1`; +let $version_10_2 = `SELECT $version_major_minor = 10.2`; -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`; +let $version_5_5_or_later = `SELECT $version_major_minor >= 5.5`; +let $version_5_6_or_later = `SELECT $version_major_minor >= 5.6`; +let $version_5_7_or_later = `SELECT $version_major_minor >= 5.7`; +let $version_10_0_or_later = `SELECT $version_major_minor >= 10.0`; +let $version_10_2_or_later = `SELECT $version_major_minor >= 10.2`; --enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_windows.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_windows.inc index b258225fa..179e03296 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_windows.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_windows.inc @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log let $VERSION_COMPILE_OS_WIN=`SELECT IF(@@version_compile_os like 'Win%', 1, 0)`; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_32bit.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_32bit.inc deleted file mode 100644 index ae44649df..000000000 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_32bit.inc +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright(C) 2013 Kentoku SHIBA -# Copyright(C) 2014 Toshihisa Tashiro -# -# 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 02111-1301 USA - ---source ../../include/mroonga/skip_osx.inc - -disable_query_log; -disable_warnings; -let $VERSION_COMPILE_64BIT= - `SELECT IF(@@version_compile_machine like '%64%', 1, 0)`; -enable_warnings; -enable_query_log; -if ($VERSION_COMPILE_64BIT) { - skip Need a 32 bit machine/binary; -} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fractional_seconds.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fractional_seconds.inc index 90a203c91..88f8594c3 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fractional_seconds.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fractional_seconds.inc @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_mariadb.inc --source ../../include/mroonga/check_version.inc @@ -22,11 +22,11 @@ if ($mariadb) { } if (!$mariadb) { - if ($version_56) { + if ($version_5_6) { let $fractional_seconds = `SELECT @@global.version >= '5.6'`; } } if (!$fractional_seconds) { - skip fractional seconds in time values are available in MySQL version 5.6 or later or MariaDB; + --skip fractional seconds in time values are available in MySQL version 5.6 or later or MariaDB } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_freebsd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_freebsd.inc index fc6cddc5b..3daf0e7c3 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_freebsd.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_freebsd.inc @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_freebsd.inc -if (!$VERSION_COMPILE_OS_FREEBSD) { - skip Need OS FreeBSD; +if (!$version_compile_os_freebsd) { + --skip Need OS FreeBSD } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_groonga_plugin_register.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_groonga_plugin_register.inc index dfd3ae12c..19b52287c 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_groonga_plugin_register.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_groonga_plugin_register.inc @@ -12,11 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_libgroonga_embedded.inc if ($libgroonga_embedded) { --source ../../include/mroonga/have_mroonga_deinit.inc - skip "This test requires plugin_register of Groonga. libgroonga embedded build doesn't support it."; + --skip This test requires plugin_register of Groonga. libgroonga embedded build doesn't support it. } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb.inc index 7f76ef050..5f38c66c2 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb.inc @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_mariadb.inc if (!$mariadb) { - skip This test is for MariaDB; + --skip This test is for MariaDB } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb_10_2_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb_10_2_or_later.inc new file mode 100644 index 000000000..e11c15ec7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb_10_2_or_later.inc @@ -0,0 +1,26 @@ +# Copyright(C) 2017 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-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if (!$mariadb) { + --skip This test is for MariaDB version 10.2.x or later +} + +if (!$version_10_2_or_later) { + --skip This test is for MariaDB version 10.2.x or later +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga.inc index 7bb3ca8b3..b88839e55 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga.inc @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_ha_mroonga_so.inc diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc index bd5e4cf7f..bd5242c8d 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA disable_query_log; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc index f0bad1a49..f78a760a5 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc @@ -12,6 +12,6 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA let $MYSQLD_DATADIR= `select @@datadir`; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql.inc index e2a791aff..f3c212920 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql.inc @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_mariadb.inc if ($mariadb) { - skip This test is for MySQL; + --skip This test is for MySQL } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql_5_7_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql_5_7_or_later.inc new file mode 100644 index 000000000..cf638a9c7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql_5_7_or_later.inc @@ -0,0 +1,26 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($mariadb) { + --skip This test is for MySQL version 5.7.x or later +} + +if (!$version_5_7_or_later) { + --skip This test is for MySQL version 5.7.x or later +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_signed_64bit_time_t.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_signed_64bit_time_t.inc new file mode 100644 index 000000000..90eca856e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_signed_64bit_time_t.inc @@ -0,0 +1,28 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/check_64bit.inc +--source ../../include/mroonga/check_osx.inc + +if (!$version_compile_64bit) { + --skip Need a 64 binary for signed 64bit time_t +} + +if ($version_compile_os_osx) { + if (!$version_compile_os_osx_10_8_or_later) { + --skip Need OS X 10.8 or later for signed 64bit time_t + } +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_solaris.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_solaris.inc new file mode 100644 index 000000000..fc89e733f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_solaris.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/check_solaris.inc + +if (!$version_compile_os_solaris) { + --skip Need Solaris +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_strict_sql_mode.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_strict_sql_mode.inc new file mode 100644 index 000000000..678ba6ab4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_strict_sql_mode.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2017 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-1301 USA + +--source ../../include/mroonga/check_strict_sql_mode.inc + +if (!$strict_sql_mode) { + --skip This test is for STRICT_ALL_TABLES or STRICT_TRANS_TABLES +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_55.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_10_0.inc similarity index 83% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_55.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_10_0.inc index a08d789d6..356b22957 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_55.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_10_0.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2013-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc -if (!$version_55) { - skip This test is for MySQL version 5.5.x; +if (!$version_10_0) { + --skip This test is for MariaDB version 10.0.x } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_10_0_or_later.inc similarity index 82% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100_or_later.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_10_0_or_later.inc index 09e5acc01..1a8883f04 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100_or_later.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_10_0_or_later.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2013 Kouhei Sutou +# Copyright(C) 2013-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc -if (!$version_100_or_later) { - skip This test is for MariaDB version 10.0.x or later; +if (!$version_10_0_or_later) { + --skip This test is for MariaDB version 10.0.x or later } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_5.inc similarity index 84% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_5.inc index b48d4e9d1..b1708abe1 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_5.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2013 Kouhei Sutou +# Copyright(C) 2012-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc -if (!$version_100) { - skip This test is for MariaDB version 10.0.x; +if (!$version_5_5) { + --skip This test is for MySQL version 5.5.x } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_6.inc similarity index 90% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_6.inc index fbb4152fc..cfa3c7ac6 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_6.inc @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc -if (!$version_56) { - skip This test is for MySQL version 5.6.x; +if (!$version_5_6) { + --skip This test is for MySQL version 5.6.x } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_6_or_later.inc similarity index 88% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56_or_later.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_6_or_later.inc index 350f51616..b9481afde 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56_or_later.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_6_or_later.inc @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc -if (!$version_56_or_later) { - skip This test is for MySQL version 5.6.x or later; +if (!$version_5_6_or_later) { + --skip This test is for MySQL version 5.6.x or later } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_57.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7.inc similarity index 90% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_57.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7.inc index ca2d06ae6..4b65def94 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_57.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7.inc @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc -if (!$version_57) { - skip This test is for MySQL version 5.7.x; +if (!$version_5_7) { + --skip This test is for MySQL version 5.7.x } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7_or_later.inc new file mode 100644 index 000000000..1b18b5749 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7_or_later.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2015-2016 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-1301 USA + +--source ../../include/mroonga/check_version.inc + +if (!$version_5_7_or_later) { + --skip This test is for MySQL version 5.7.x or later or MariaDB 10.0.x or later +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/load_mroonga_functions.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/load_mroonga_functions.inc index 6e563721f..9ca1b0d11 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/load_mroonga_functions.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/load_mroonga_functions.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2013 Kouhei Sutou +# Copyright(C) 2013-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_ha_mroonga_so.inc @@ -21,4 +21,8 @@ eval CREATE FUNCTION last_insert_grn_id RETURNS INTEGER SONAME $ha_mroonga_so; eval CREATE FUNCTION mroonga_snippet RETURNS STRING SONAME $ha_mroonga_so; eval CREATE FUNCTION mroonga_command RETURNS STRING SONAME $ha_mroonga_so; eval CREATE FUNCTION mroonga_escape RETURNS STRING SONAME $ha_mroonga_so; +eval CREATE FUNCTION mroonga_snippet_html RETURNS STRING SONAME $ha_mroonga_so; +eval CREATE FUNCTION mroonga_normalize RETURNS STRING SONAME $ha_mroonga_so; +eval CREATE FUNCTION mroonga_highlight_html RETURNS STRING SONAME $ha_mroonga_so; +eval CREATE FUNCTION mroonga_query_expand RETURNS STRING SONAME $ha_mroonga_so; --enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_freebsd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_freebsd.inc index ed13b737f..bf0bed984 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_freebsd.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_freebsd.inc @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_freebsd.inc -if ($VERSION_COMPILE_OS_FREEBSD) { - skip This test is not for FreeBSD; +if ($version_compile_os_freebsd) { + --skip This test is not for FreeBSD } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_0_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_0_or_later.inc new file mode 100644 index 000000000..5fd84f1b2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_0_or_later.inc @@ -0,0 +1,24 @@ +# Copyright(C) 2012-2017 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-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($mariadb) { + if ($version_10_0_or_later) { + --skip This test is not for MariaDB 10.x + } +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_55.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1.inc similarity index 85% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_55.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1.inc index 93eead879..b954d1c75 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_55.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2012-2013 Kouhei Sutou +# Copyright(C) 2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,13 +12,13 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc --source ../../include/mroonga/check_mariadb.inc -if ($version_55) { +if ($version_10_1) { if ($mariadb) { - skip This test is not for MariaDB 5.5.x; + --skip This test is not for MariaDB 10.1.x } } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1_or_earlier.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1_or_earlier.inc new file mode 100644 index 000000000..2af6f2adb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1_or_earlier.inc @@ -0,0 +1,24 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($mariadb) { + if (!$version_10_2_or_later) { + --skip This test is not for MariaDB 5.x, MariaDB 10.0.x nor 10.1.x + } +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_2_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_2_or_later.inc new file mode 100644 index 000000000..5f67748a1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_2_or_later.inc @@ -0,0 +1,24 @@ +# Copyright(C) 2017 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-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($mariadb) { + if ($version_10_2_or_later) { + --skip This test is not for MariaDB 10.2.x or later + } +} 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_5_5.inc similarity index 85% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_100_or_later.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_5_5.inc index 9fbfd222d..0695b96fa 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_100_or_later.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_5_5.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2012-2015 Kouhei Sutou +# Copyright(C) 2012-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,13 +12,13 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc --source ../../include/mroonga/check_mariadb.inc -if ($version_100_or_later) { +if ($version_5_5) { if ($mariadb) { - skip This test is not for MariaDB 10.x; + --skip This test is not for MariaDB 5.5.x } } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_55.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_5.inc similarity index 85% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_55.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_5.inc index e29fae84d..633450e9c 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_55.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_5.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,13 +12,13 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc --source ../../include/mroonga/check_mariadb.inc -if ($version_55) { +if ($version_5_5) { if (!$mariadb) { - skip This test is not for MySQL 5.5.x; + --skip This test is not for MySQL 5.5.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_5_7.inc similarity index 91% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_57.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_7.inc index 39ee22834..e984d60f7 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_57.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_7.inc @@ -12,13 +12,13 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc --source ../../include/mroonga/check_mariadb.inc -if ($version_57) { +if ($version_5_7) { if (!$mariadb) { - skip This test is not for MySQL 5.7.x; + --skip This test is not for MySQL 5.7.x } } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_7_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_7_or_later.inc new file mode 100644 index 000000000..075e60441 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_7_or_later.inc @@ -0,0 +1,24 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($version_5_7_or_later) { + if (!$mariadb) { + --skip This test is not for MySQL 5.7.x or later + } +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_osx.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_osx.inc index 45a70d34a..c29795892 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_osx.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_osx.inc @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_osx.inc if ($VERSION_COMPILE_OS_OSX) { - skip This test is not for OSX; + --skip This test is not for OSX } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_signed_64bit_time_t.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_signed_64bit_time_t.inc new file mode 100644 index 000000000..1ba1d09be --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_signed_64bit_time_t.inc @@ -0,0 +1,28 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/check_64bit.inc +--source ../../include/mroonga/check_osx.inc + +if ($version_compile_64bit) { + --skip This test is for environment that doesn't have signed 64bit time_t +} + +if ($version_compile_os_osx) { + if (!$version_compile_os_osx_10_8_or_later) { + --skip This test is not for OS X 10.7 or earlier that isn't detected signed 64bit time_t availability + } +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris.inc new file mode 100644 index 000000000..6bf742249 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/check_solaris.inc + +if ($version_compile_os_solaris) { + --skip This test is not for Solaris +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris10.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris10.inc deleted file mode 100644 index 7cee5c38c..000000000 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris10.inc +++ /dev/null @@ -1,3 +0,0 @@ -if (`SELECT @@version_compile_os='solaris10'`) { - skip This test is not for Solaris 10; -} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_strict_sql_mode.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_strict_sql_mode.inc new file mode 100644 index 000000000..fc0d665b3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_strict_sql_mode.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2017 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-1301 USA + +--source ../../include/mroonga/check_strict_sql_mode.inc + +if ($strict_sql_mode) { + --skip This test is not for STRICT_ALL_TABLES nor STRICT_TRANS_TABLES +} 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 index 5e21a446f..249c6b59b 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_lz4.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_lz4.inc @@ -12,11 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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"; + --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 index d04826aa7..fd8b9e998 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zlib.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zlib.inc @@ -12,11 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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"; + --skip This test is for libgroonga supports zlib } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zstd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zstd.inc new file mode 100644 index 000000000..0e7ca4460 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zstd.inc @@ -0,0 +1,22 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/check_libgroonga_support_zstd.inc + +if (!$libgroonga_support_zstd) { + --source ../../include/mroonga/have_mroonga_deinit.inc + --skip This test is for libgroonga supports zstd +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/unload_mroonga_functions.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/unload_mroonga_functions.inc index 8d0d13f91..cbe345a7e 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/unload_mroonga_functions.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/unload_mroonga_functions.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2013 Kouhei Sutou +# Copyright(C) 2013-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,11 +12,15 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log DROP FUNCTION last_insert_grn_id; DROP FUNCTION mroonga_snippet; DROP FUNCTION mroonga_command; DROP FUNCTION mroonga_escape; +DROP FUNCTION mroonga_snippet_html; +DROP FUNCTION mroonga_normalize; +DROP FUNCTION mroonga_highlight_html; +DROP FUNCTION mroonga_query_expand; --enable_query_log 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 index dcc049078..210058edc 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_lz4.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_lz4.inc @@ -12,11 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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"; + --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 index 7533f786f..cb00da15a 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zlib.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zlib.inc @@ -12,11 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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"; + --skip This test is for libgroonga doesn't support zlib } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zstd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zstd.inc new file mode 100644 index 000000000..037e66a9e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zstd.inc @@ -0,0 +1,22 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/check_libgroonga_support_zstd.inc + +if ($libgroonga_support_zstd) { + --source ../../include/mroonga/have_mroonga_deinit.inc + --skip This test is for libgroonga doesn't support zstd +} diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_after.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_after.result index 52a72155a..15cd3499d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_after.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_after.result @@ -1,22 +1,22 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -body TEXT +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -ALTER TABLE diaries ADD title TEXT AFTER id; +ALTER TABLE diaries ADD title VARCHAR(40) AFTER id; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_first.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_first.result index 81feeefc5..8b3de1bf7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_first.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_first.result @@ -1,22 +1,22 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -body TEXT +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -ALTER TABLE diaries ADD title TEXT FIRST; +ALTER TABLE diaries ADD title VARCHAR(40) FIRST; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( - `title` text, + `title` varchar(40) DEFAULT NULL, `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_comment.result index e441df32c..de0482e62 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_comment.result @@ -4,6 +4,11 @@ id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ALTER TABLE tags ADD COLUMN name VARCHAR(64) COMMENT 'flags "COLUMN_VECTOR"'; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + 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_flags_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_parameter.result index 6f2a1870a..b3c9875fa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_parameter.result @@ -11,6 +11,11 @@ tags CREATE TABLE `tags` ( ) ENGINE=Mroonga DEFAULT CHARSET=utf8 SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + 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_groonga_type_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_comment.result index 0bd8985f2..8a1c18b73 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_comment.result @@ -7,12 +7,17 @@ id INT UNSIGNED PRIMARY KEY ALTER TABLE bugs ADD COLUMN name VARCHAR(64) COMMENT 'groonga_type "tags"'; 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY UInt32 +column_create tags 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_column_groonga_type_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_parameter.result index fe4843729..85330471c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_parameter.result @@ -10,17 +10,21 @@ Table Create Table bugs CREATE TABLE `bugs` ( `id` int(10) unsigned NOT NULL, `name` varchar(64) DEFAULT NULL `GROONGA_TYPE`='tags', - PRIMARY KEY (`id`), - CONSTRAINT `name` FOREIGN KEY (`name`) REFERENCES `test`.`tags` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT + PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY UInt32 +column_create tags 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_column_multibyte_cp932.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_cp932.result new file mode 100644 index 000000000..6fb1a1071 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_cp932.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS users; +SET NAMES cp932; +CREATE TABLE users ( +id int PRIMARY KEY +) DEFAULT CHARSET=cp932; +ALTER TABLE users +ADD COLUMN –¼‘O text, +ADD FULLTEXT INDEX (–¼‘O); +INSERT INTO users VALUES (1, "‚â‚Ü‚¾"); +INSERT INTO users VALUES (2, "‚½‚È‚©"); +INSERT INTO users VALUES (3, "‚·‚¸‚«"); +SELECT * FROM users; +id –¼‘O +1 ‚â‚Ü‚¾ +2 ‚½‚È‚© +3 ‚·‚¸‚« +SELECT * FROM users +WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); +id –¼‘O +2 ‚½‚È‚© +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_PAT_KEY Int32 +column_create users @540d@524d COLUMN_SCALAR LongText +column_create users id COLUMN_SCALAR Int32 + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users @540d@524d +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_utf8.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_utf8.result new file mode 100644 index 000000000..70c9ea0c5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_utf8.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS users; +SET NAMES utf8; +CREATE TABLE users ( +id int PRIMARY KEY +) DEFAULT CHARSET=utf8; +ALTER TABLE users +ADD COLUMN åå‰ text, +ADD FULLTEXT INDEX (åå‰); +INSERT INTO users VALUES (1, "ã‚„ã¾ã "); +INSERT INTO users VALUES (2, "ãŸãªã‹"); +INSERT INTO users VALUES (3, "ã™ãšã"); +SELECT * FROM users; +id åå‰ +1 ã‚„ã¾ã  +2 ãŸãªã‹ +3 ã™ãšã +SELECT * FROM users +WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); +id åå‰ +2 ãŸãªã‹ +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_PAT_KEY Int32 +column_create users @540d@524d COLUMN_SCALAR LongText +column_create users id COLUMN_SCALAR Int32 + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users @540d@524d +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multiple.result index bb157539a..6c6024e47 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multiple.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multiple.result @@ -1,13 +1,13 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT +title VARCHAR(40) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title) VALUES ("survey"); @@ -15,7 +15,7 @@ SELECT * FROM diaries; id title 1 survey ALTER TABLE diaries -ADD COLUMN body TEXT FIRST, +ADD COLUMN body VARCHAR(140) FIRST, ADD COLUMN published BOOLEAN AFTER id, ADD COLUMN created_at DATETIME; UPDATE diaries SET body = "will start groonga!"; @@ -34,10 +34,10 @@ started groonga. 3 0 groonga (2) 2014-02-09 12:19:00 SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( - `body` text, + `body` varchar(140) DEFAULT NULL, `id` int(11) NOT NULL AUTO_INCREMENT, `published` tinyint(1) DEFAULT NULL, - `title` text, + `title` varchar(40) DEFAULT NULL, `created_at` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_plain.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_plain.result index df5a15568..5a5d37156 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_plain.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_plain.result @@ -1,20 +1,20 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT +title VARCHAR(40) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; id title 1 survey -ALTER TABLE diaries ADD COLUMN body TEXT; +ALTER TABLE diaries ADD COLUMN body VARCHAR(140); UPDATE diaries SET body = "will start groonga!"; SELECT * FROM diaries; id title body @@ -30,8 +30,8 @@ SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_type_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_type_comment.result index b4c3044c7..513628268 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_type_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_type_comment.result @@ -7,12 +7,17 @@ id INT UNSIGNED PRIMARY KEY ALTER TABLE bugs ADD COLUMN name VARCHAR(64) COMMENT 'type "tags"'; 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY UInt32 +column_create tags 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 65e608ddd..373c70e81 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 @@ -11,7 +11,12 @@ 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 +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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +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_change_column_rename_after.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_after.result index 19d5d017f..a9b192e99 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_after.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_after.result @@ -1,24 +1,24 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) 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, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -ALTER TABLE diaries CHANGE body description TEXT AFTER id; +ALTER TABLE diaries CHANGE body description VARCHAR(140) AFTER id; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `description` text, - `title` text, + `description` varchar(140) DEFAULT NULL, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_first.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_first.result index cf2bcc0fc..4faf39ad1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_first.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_first.result @@ -1,24 +1,24 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) 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, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -ALTER TABLE diaries CHANGE body description TEXT FIRST; +ALTER TABLE diaries CHANGE body description VARCHAR(140) FIRST; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( - `description` text, + `description` varchar(140) DEFAULT NULL, `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result index c73030805..6c87244ba 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result @@ -1,34 +1,32 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) 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, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 ALTER TABLE diaries -CHANGE body description TEXT FIRST, -CHANGE title subject TEXT AFTER internal_id, -CHANGE id internal_id INT; +CHANGE body description VARCHAR(140) FIRST, +CHANGE title subject VARCHAR(40) AFTER internal_id, +CHANGE id internal_id INT AUTO_INCREMENT; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( - `description` text, - `internal_id` int(11) NOT NULL, - `subject` text, + `description` varchar(140) DEFAULT NULL, + `internal_id` int(11) NOT NULL AUTO_INCREMENT, + `subject` varchar(40) DEFAULT NULL, PRIMARY KEY (`internal_id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (subject, description) VALUES ("groonga (1)", "starting groonga."); -Warnings: -Warning 1364 Field 'internal_id' doesn't have a default value SELECT * FROM diaries; description internal_id subject -starting groonga. 0 groonga (1) +starting groonga. 1 groonga (1) DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_no_order.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_no_order.result index 6d60200e5..d49acc526 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_no_order.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_no_order.result @@ -1,24 +1,24 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) 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, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -ALTER TABLE diaries CHANGE body description TEXT; +ALTER TABLE diaries CHANGE body description VARCHAR(140); SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `description` text, + `title` varchar(40) DEFAULT NULL, + `description` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_engine_decimal.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine_decimal.result similarity index 63% rename from storage/mroonga/mysql-test/mroonga/storage/r/alter_table_engine_decimal.result rename to storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine_decimal.result index 6bbedd41e..dc2ae0253 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_engine_decimal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine_decimal.result @@ -1,37 +1,34 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, temperature DECIMAL(6, 3) ) ENGINE InnoDB DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, `temperature` decimal(6,3) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 -INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); +INSERT INTO diaries (temperature) VALUES (21.281); SELECT * FROM diaries; -id title temperature -1 clear day 21.281 +id temperature +1 21.281 ALTER TABLE diaries ENGINE = mroonga; SELECT * FROM diaries; -id title temperature -1 clear day 21.281 -INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); -INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); +id temperature +1 21.281 +INSERT INTO diaries (temperature) VALUES (14.213); +INSERT INTO diaries (temperature) VALUES (17.821); SELECT * FROM diaries; -id title temperature -1 clear day 21.281 -2 rainy day 14.213 -3 cloudy day 17.821 +id temperature +1 21.281 +2 14.213 +3 17.821 SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, `temperature` decimal(6,3) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine_fulltext_index.result similarity index 64% rename from storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine.result rename to storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine_fulltext_index.result index 3a7413e38..706764a51 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine_fulltext_index.result @@ -6,16 +6,11 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) ENGINE MyISAM 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 `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 +SELECT table_name, engine +FROM information_schema.tables +WHERE table_name = 'diaries'; +table_name engine +diaries MyISAM INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); SELECT * FROM diaries @@ -24,16 +19,11 @@ MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); id title body 1 survey will start groonga! ALTER TABLE diaries ENGINE = mroonga; -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 `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 +SELECT table_name, engine +FROM information_schema.tables +WHERE table_name = 'diaries'; +table_name engine +diaries Mroonga SELECT * FROM diaries WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); 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 60d302cc6..9fc3b4084 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 @@ -12,14 +12,19 @@ FULLTEXT 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 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +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 + column_create terms content COLUMN_INDEX|WITH_POSITION memos content ALTER TABLE terms COMMENT='default_tokenizer "TokenBigram", token_filters "TokenFilterStopWord"'; SELECT mroonga_command("dump --dump_plugins no"); @@ -28,6 +33,11 @@ table_create memos TABLE_PAT_KEY Int32 column_create memos content COLUMN_SCALAR LongText column_create memos id COLUMN_SCALAR Int32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + 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 @@ -39,6 +49,11 @@ table_create memos TABLE_PAT_KEY Int32 column_create memos content COLUMN_SCALAR LongText column_create memos id COLUMN_SCALAR Int32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + 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 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 index ba6cf6c24..7416481e3 100644 --- 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 @@ -10,22 +10,32 @@ 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto +column_create terms term COLUMN_SCALAR ShortText + 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 + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto +column_create terms term COLUMN_SCALAR ShortText DROP TABLE memos; DROP TABLE terms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_multiple.result index 6475de51b..a8b8edf2f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_multiple.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_multiple.result @@ -1,15 +1,15 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) 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, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_one.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_one.result index cbc94cebc..569bba2f5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_one.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_one.result @@ -1,15 +1,15 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) 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, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); @@ -21,7 +21,7 @@ SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 SELECT * FROM diaries; 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 index 452caa574..7b3b2863e 100644 --- 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 @@ -11,22 +11,32 @@ FULLTEXT INDEX content_index (content) COMMENT 'table "terms"' 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 + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto +column_create terms term COLUMN_SCALAR ShortText 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto +column_create terms term COLUMN_SCALAR ShortText + 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_fulltext_add_normal.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_normal.result index d98dc431a..cf6840a98 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_normal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_normal.result @@ -7,15 +7,7 @@ INSERT INTO memos (content) values ("Starting Groonga..."); INSERT INTO memos (content) values ("Started Groonga."); INSERT INTO memos (content) values ("Starting Mroonga..."); ALTER TABLE memos ADD FULLTEXT INDEX content_index (content); -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content_index` (`content`) -) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 -SELECT * FROM memos WHERE MATCH(content) AGAINST("groonga"); +SELECT * FROM memos WHERE MATCH(content) AGAINST("+groonga" IN BOOLEAN MODE); id content 1 Starting Groonga... 2 Started Groonga. diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_after.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_after.result index d831d02d7..9b7040bd5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_after.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_after.result @@ -1,28 +1,28 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) 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, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); SELECT * FROM diaries; id title body 1 groonga (1) starting groonga. -ALTER TABLE diaries MODIFY body TEXT AFTER id; +ALTER TABLE diaries MODIFY body VARCHAR(140) AFTER id; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - `title` text, + `body` varchar(140) DEFAULT NULL, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_first.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_first.result index bd9365072..f6b3df92c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_first.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_first.result @@ -1,28 +1,28 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) 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, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); SELECT * FROM diaries; id title body 1 groonga (1) starting groonga. -ALTER TABLE diaries MODIFY body TEXT FIRST; +ALTER TABLE diaries MODIFY body VARCHAR(140) FIRST; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( - `body` text, + `body` varchar(140) DEFAULT NULL, `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_no_order.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_no_order.result index d8d963d87..e156a7fda 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_no_order.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_no_order.result @@ -1,15 +1,15 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) 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, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); @@ -22,7 +22,7 @@ Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(100) DEFAULT NULL, - `body` text, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_recreate_anonymous_index_at_once.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_recreate_anonymous_index_at_once.result index 64f524de0..6ee8f8baf 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_recreate_anonymous_index_at_once.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_recreate_anonymous_index_at_once.result @@ -5,15 +5,6 @@ title TEXT, body TEXT, FULLTEXT 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` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("survey", "will start mroonga!"); SELECT * FROM diaries; @@ -35,13 +26,4 @@ SELECT * FROM diaries WHERE MATCH (body) AGAINST ("+groonga" IN BOOLEAN MODE); id title body 1 survey will start groonga! -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` (`body`) -) ENGINE=Mroonga AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_rename_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_rename_table.result index eac322ceb..84861ea71 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_rename_table.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_rename_table.result @@ -6,16 +6,11 @@ body TEXT, FULLTEXT INDEX title_index (title), 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 `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 +SELECT table_name, engine +FROM information_schema.tables +WHERE table_name = 'diaries'; +table_name engine +diaries Mroonga INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); SELECT * FROM diaries; id title body @@ -32,14 +27,9 @@ SELECT * FROM memos WHERE MATCH(title) AGAINST("groonga") AND MATCH(body) AGAINST("starting"); id title body -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 +SELECT table_name, engine +FROM information_schema.tables +WHERE table_name = 'memos'; +table_name engine +memos Mroonga DROP TABLE memos; 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 ed36927e7..ac1a096de 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 @@ -1,7 +1,7 @@ DROP TABLE IF EXISTS shops; CREATE TABLE shops ( id INT PRIMARY KEY AUTO_INCREMENT, -name TEXT, +name VARCHAR(40), location GEOMETRY NOT NULL ); INSERT INTO shops (name, location) @@ -124,7 +124,7 @@ SHOW CREATE TABLE shops; Table Create Table shops CREATE TABLE `shops` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, + `name` varchar(40) DEFAULT NULL, `location` geometry NOT NULL, PRIMARY KEY (`id`), SPATIAL KEY `location_index` (`location`) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/check_table_broken.result b/storage/mroonga/mysql-test/mroonga/storage/r/check_table_broken.result new file mode 100644 index 000000000..4926a72a7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/check_table_broken.result @@ -0,0 +1,18 @@ +SET NAMES UTF8; +CREATE DATABASE check_test; +USE check_test; +CREATE TABLE diaries ( +title TEXT, +FULLTEXT INDEX (title) +); +INSERT INTO diaries VALUES ('Hello'); +FLUSH TABLES; +CHECK TABLE diaries; +Table Op Msg_type Msg_text +check_test.diaries check error Corrupt +REPAIR TABLE diaries; +Table Op Msg_type Msg_text +check_test.diaries repair status OK +DROP TABLE diaries; +DROP DATABASE check_test; +USE test; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/check_table_not_broken.result b/storage/mroonga/mysql-test/mroonga/storage/r/check_table_not_broken.result new file mode 100644 index 000000000..def3368ec --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/check_table_not_broken.result @@ -0,0 +1,13 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +title TEXT +); +INSERT INTO diaries VALUES ('Hello'); +CHECK TABLE diaries; +Table Op Msg_type Msg_text +test.diaries check status OK +SELECT * FROM diaries; +title +Hello +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_with_index.result index e24a56be3..9aec8dd6e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_with_index.result @@ -1,7 +1,7 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, +title VARCHAR(40), created_at DATE, KEY (created_at) ) DEFAULT CHARSET UTF8; @@ -9,7 +9,7 @@ SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, `created_at` date DEFAULT NULL, PRIMARY KEY (`id`), KEY `created_at` (`created_at`) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_without_index.result index 018ee8eb5..4d2166eca 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_without_index.result @@ -1,14 +1,14 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, +title VARCHAR(40), created_at DATE ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, `created_at` date DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result index 453f64196..70a980e2e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('2038-01-18 03:14:07', '2038-01-18 03:14:07'); INSERT INTO diaries (title, created_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result index 10824d7c2..a48be4da8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); Warnings: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result index f3a7b27f3..b28a17449 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); Warnings: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result index d7acad79b..838eaf45f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); Warnings: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_2038.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_2038.result index 56e38902f..f0f03a82c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_2038.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_2038.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('2038-01-19 03:14:07', '2038-01-19 03:14:07'); INSERT INTO diaries (title, created_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_before_unix_epoch.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_before_unix_epoch.result index c3ca2628b..8a775960e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_before_unix_epoch.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_before_unix_epoch.result @@ -4,17 +4,9 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) -VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); +VALUES ('1000-01-02 00:00:00', '1000-01-02 00:00:00'); SELECT * FROM diaries; id title created_at -1 1000-01-01 00:00:00 1000-01-01 00:00:00 +1 1000-01-02 00:00:00 1000-01-02 00:00:00 DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_max.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_max.result index 0373d1753..44d20d972 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_max.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_max.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_strict_sql_mode_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_strict_sql_mode_out_of_range.result new file mode 100644 index 000000000..2d5e5e641 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_strict_sql_mode_out_of_range.result @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +INSERT INTO diaries (title, created_at) +VALUES ('2012', '2012'); +ERROR 22007: Incorrect datetime value: '2012' for column 'created_at' at row 1 +SELECT * FROM diaries; +id title created_at +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_55_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_5_5_out_of_range.result similarity index 65% rename from storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_55_out_of_range.result rename to storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_5_5_out_of_range.result index 733217fda..21e715e1f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_55_out_of_range.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_5_5_out_of_range.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); Warnings: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_5_6_or_later_out_of_range.result similarity index 65% rename from storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result rename to storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_5_6_or_later_out_of_range.result index 962212c86..352638031 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_5_6_or_later_out_of_range.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); Warnings: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_with_index.result index a31042f76..e7094fd4e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_with_index.result @@ -5,15 +5,6 @@ title TEXT, created_at DATETIME(6), KEY (created_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime(6) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `created_at` (`created_at`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01.111111"); INSERT INTO diaries (title, created_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_without_index.result index 0b1bf0f0e..028fb2577 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_without_index.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME(6) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime(6) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01.111111"); INSERT INTO diaries (title, created_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_freebsd_before_unix_epoch.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_freebsd_before_unix_epoch.result index 10824d7c2..a48be4da8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_freebsd_before_unix_epoch.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_freebsd_before_unix_epoch.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); Warnings: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date_strict.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_date.result similarity index 61% rename from storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date_strict.result rename to storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_date.result index c4d73e2f5..ffd6a7076 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date_strict.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_date.result @@ -3,17 +3,8 @@ CREATE TABLE timestamps ( id INT PRIMARY KEY AUTO_INCREMENT, create_dt DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE timestamps; -Table Create Table -timestamps CREATE TABLE `timestamps` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `create_dt` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 -SET sql_mode='STRICT_TRANS_TABLES'; INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00"); ERROR 22003: Out of range value for column 'create_dt' at row 1 -SET sql_mode=default; SELECT * FROM timestamps; id create_dt INSERT INTO timestamps (create_dt) VALUES ("2015-06-17 00:00:00"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_month_day.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_month_day.result new file mode 100644 index 000000000..61d2ed8df --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_month_day.result @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS timestamps; +CREATE TABLE timestamps ( +id INT PRIMARY KEY AUTO_INCREMENT, +create_dt DATETIME +) DEFAULT CHARSET UTF8; +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +ERROR 22003: Out of range value for column 'create_dt' at row 1 +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); +ERROR 22003: Out of range value for column 'create_dt' at row 1 +SELECT * FROM timestamps; +id create_dt +DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_date.result new file mode 100644 index 000000000..0ca19e548 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_date.result @@ -0,0 +1,14 @@ +DROP TABLE IF EXISTS timestamps; +CREATE TABLE timestamps ( +id INT PRIMARY KEY AUTO_INCREMENT, +create_dt DATETIME +) DEFAULT CHARSET UTF8; +INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00"); +ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'create_dt' at row 1 +SELECT * FROM timestamps; +id create_dt +INSERT INTO timestamps (create_dt) VALUES ("2015-06-17 00:00:00"); +SELECT * FROM timestamps; +id create_dt +1 2015-06-17 00:00:00 +DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_month_day.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_month_day.result new file mode 100644 index 000000000..94479c230 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_month_day.result @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS timestamps; +CREATE TABLE timestamps ( +id INT PRIMARY KEY AUTO_INCREMENT, +create_dt DATETIME +) DEFAULT CHARSET UTF8; +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +ERROR 22007: Incorrect datetime value: '2012-00-01 00:00:00' for column 'create_dt' at row 1 +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); +ERROR 22007: Incorrect datetime value: '2012-01-00 00:00:00' for column 'create_dt' at row 1 +SELECT * FROM timestamps; +id create_dt +DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_null.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_null.result index 82f01b9f2..510fa2dc0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_null.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_null.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('NULL', NULL); SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_with_index.result index b205031de..6f79b31fe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_with_index.result @@ -5,15 +5,6 @@ title TEXT, created_at DATETIME, KEY (created_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `created_at` (`created_at`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01"); INSERT INTO diaries (title, created_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_without_index.result index 6592df35f..8a45ece78 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_without_index.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01"); INSERT INTO diaries (title, created_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result index c22a63f97..659c57420 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result @@ -3,25 +3,14 @@ CREATE TABLE timestamps ( id INT PRIMARY KEY AUTO_INCREMENT, create_dt DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE timestamps; -Table Create Table -timestamps CREATE TABLE `timestamps` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `create_dt` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 -INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); -Warnings: -Warning 1265 Data truncated for column 'create_dt' at row 1 -INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); -Warnings: -Warning 1265 Data truncated for column 'create_dt' at row 1 +SET sql_mode='STRICT_TRANS_TABLES'; +INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00"); +ERROR 22003: Out of range value for column 'create_dt' at row 1 +SET sql_mode=default; SELECT * FROM timestamps; id create_dt -1 2012-01-01 00:00:00 -2 2012-01-01 00:00:00 -SELECT * FROM timestamps WHERE create_dt = "2012-01-01 00:00:00"; +INSERT INTO timestamps (create_dt) VALUES ("2015-06-17 00:00:00"); +SELECT * FROM timestamps; id create_dt -1 2012-01-01 00:00:00 -2 2012-01-01 00:00:00 +2 2015-06-17 00:00:00 DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_month_day.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_month_day.result new file mode 100644 index 000000000..03633a50b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_month_day.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS timestamps; +CREATE TABLE timestamps ( +id INT PRIMARY KEY AUTO_INCREMENT, +create_dt DATETIME +) DEFAULT CHARSET UTF8; +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +Warnings: +Warning 1265 Data truncated for column 'create_dt' at row 1 +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); +Warnings: +Warning 1265 Data truncated for column 'create_dt' at row 1 +SELECT * FROM timestamps; +id create_dt +1 2012-01-01 00:00:00 +2 2012-01-01 00:00:00 +SELECT * FROM timestamps WHERE create_dt = "2012-01-01 00:00:00"; +id create_dt +1 2012-01-01 00:00:00 +2 2012-01-01 00:00:00 +DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_with_index.result index 4a21d62dd..196e4b80f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_with_index.result @@ -5,15 +5,6 @@ title TEXT, temperature DECIMAL(6, 3), KEY (temperature) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `temperature` decimal(6,3) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `temperature` (`temperature`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_without_index.result index cd939fa54..b67846bb2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_without_index.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, temperature DECIMAL(6, 3) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `temperature` decimal(6,3) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_with_index.result index 56a6a360d..620e9b690 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_with_index.result @@ -5,15 +5,6 @@ title TEXT, temperature DECIMAL, KEY (temperature) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `temperature` decimal(10,0) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `temperature` (`temperature`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, temperature) VALUES ("clear day", 21); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14); INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_without_index.result index 06162f76d..1ba47b349 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_without_index.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, temperature DECIMAL ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `temperature` decimal(10,0) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, temperature) VALUES ("clear day", 21); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14); INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_add_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_add_column.result new file mode 100644 index 000000000..20213f0cb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_add_column.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED; +ALTER TABLE logs ADD FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"'; +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_delete.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_delete.result new file mode 100644 index 000000000..1ee7d8f65 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_delete.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +DELETE FROM logs WHERE id = 1; +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_drop_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_drop_column.result new file mode 100644 index 000000000..5b5185166 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_drop_column.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +ALTER TABLE logs DROP COLUMN message; +SELECT * FROM logs; +id record +1 {"level": "info", "message": "start"} +2 {"level": "info", "message": "restart"} +3 {"level": "warn", "message": "abort"} +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_insert.result new file mode 100644 index 000000000..ff22175ec --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_insert.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_reindex.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_reindex.result new file mode 100644 index 000000000..fac824677 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_reindex.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +ALTER TABLE logs DISABLE KEYS; +ALTER TABLE logs ENABLE KEYS; +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_update.result new file mode 100644 index 000000000..71fc442dd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_update.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; +SELECT * FROM logs WHERE MATCH(message) AGAINST("hut" IN BOOLEAN MODE); +id record message +2 {"level": "info", "message": "shutdown"} "shutdown" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_add_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_add_column.result new file mode 100644 index 000000000..27c9effc2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_add_column.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL; +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs; +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_delete.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_delete.result new file mode 100644 index 000000000..260c774e2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_delete.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +DELETE FROM logs WHERE id = 1; +SELECT * FROM logs; +id record message +2 {"level": "info", "message": "restart"} "restart" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_drop_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_drop_column.result new file mode 100644 index 000000000..bc9339ab0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_drop_column.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +ALTER TABLE logs DROP COLUMN message; +SELECT * FROM logs; +id record +1 {"level": "info", "message": "start"} +2 {"level": "info", "message": "restart"} +3 {"level": "warn", "message": "abort"} +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_insert.result new file mode 100644 index 000000000..92463c945 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_insert.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs; +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_add_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_add_index.result new file mode 100644 index 000000000..1a502edf2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_add_index.result @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +ALTER TABLE logs ADD INDEX (message); +ERROR HY000: mroonga: storage: failed to create index: Index for virtual generated column is not supported: message +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.result new file mode 100644 index 000000000..16acc89bf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.result @@ -0,0 +1,8 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL, +FULLTEXT INDEX (message) +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +ERROR HY000: mroonga: storage: failed to create index: Index for virtual generated column is not supported: message diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mysql_5_7_or_later_add_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mysql_5_7_or_later_add_index.result new file mode 100644 index 000000000..93046e39b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mysql_5_7_or_later_add_index.result @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +ALTER TABLE logs ADD INDEX (message); +ERROR HY000: Table storage engine 'Mroonga' does not support the create option 'Index on virtual generated column' +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_update.result new file mode 100644 index 000000000..c4e46d0d4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_update.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; +SELECT * FROM logs; +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "shutdown"} "shutdown" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; 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 index 724d20edd..f9fc83662 100644 --- 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 @@ -14,12 +14,17 @@ FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"' 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit +column_create tags name COLUMN_SCALAR ShortText + column_create bugs tags COLUMN_VECTOR tags column_create tags bugs_tags_index COLUMN_INDEX|WITH_POSITION bugs tags 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 aa7735ef7..0f57885cd 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 @@ -15,15 +15,20 @@ INSERT INTO bugs (id, priority) VALUES (2, 3); INSERT INTO bugs (id, priority) VALUES (3, -2); 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create priorities TABLE_PAT_KEY Int32 +column_create priorities id COLUMN_SCALAR Int32 + column_create bugs priority COLUMN_SCALAR priorities -column_create priorities bugs_priority_index COLUMN_INDEX|WITH_POSITION bugs priority +column_create priorities bugs_priority_index COLUMN_INDEX bugs priority SELECT * FROM bugs WHERE priority = 3; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_zstd.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_zstd.result new file mode 100644 index 000000000..a9c917f8c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_zstd.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_ZSTD"' +) 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_zstd.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_zstd.result new file mode 100644 index 000000000..b2bb3b89c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_zstd.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_ZSTD"' +) DEFAULT CHARSET=utf8; +Warnings: +Warning 16506 The column flag 'COMPRESS_ZSTD' 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_vector_reference.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_reference.result index 515dad1da..a6afe72fa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_reference.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_reference.result @@ -6,8 +6,15 @@ COLLATE=utf8_bin COMMENT='default_tokenizer "TokenDelimit"'; CREATE TABLE bugs ( id INT UNSIGNED PRIMARY KEY, -tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"' +tags VARCHAR(128) DEFAULT '' COMMENT 'flags "COLUMN_VECTOR", type "tags"' ) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE bugs; +Table Create Table +bugs CREATE TABLE `bugs` ( + `id` int(10) unsigned NOT NULL, + `tags` varchar(128) DEFAULT '' COMMENT 'flags "COLUMN_VECTOR", type "tags"', + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga"); SELECT * FROM bugs; id tags diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_json_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_json_insert.result new file mode 100644 index 000000000..e6a3aa5ea --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_json_insert.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs VALUES ('{"message": "start"}'); +INSERT INTO logs VALUES ('{"message": "restart"}'); +INSERT INTO logs VALUES ('{"message": "shutdown"}'); +SELECT * FROM logs; +record +{"message": "start"} +{"message": "restart"} +{"message": "shutdown"} +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_cp932.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_cp932.result new file mode 100644 index 000000000..eb1a08f2c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_cp932.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS users; +SET NAMES cp932; +CREATE TABLE users ( +–¼‘O text, +FULLTEXT INDEX (–¼‘O) +) DEFAULT CHARSET=cp932; +INSERT INTO users VALUES ("‚â‚Ü‚¾"); +INSERT INTO users VALUES ("‚½‚È‚©"); +INSERT INTO users VALUES ("‚·‚¸‚«"); +SELECT * FROM users; +–¼‘O +‚â‚Ü‚¾ +‚½‚È‚© +‚·‚¸‚« +SELECT * FROM users +WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); +–¼‘O +‚½‚È‚© +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_NO_KEY +column_create users @540d@524d COLUMN_SCALAR LongText + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users @540d@524d +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_utf8.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_utf8.result new file mode 100644 index 000000000..6f63b5b38 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_utf8.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS users; +SET NAMES utf8; +CREATE TABLE users ( +åå‰ text, +FULLTEXT INDEX (åå‰) +) DEFAULT CHARSET=utf8; +INSERT INTO users VALUES ("ã‚„ã¾ã "); +INSERT INTO users VALUES ("ãŸãªã‹"); +INSERT INTO users VALUES ("ã™ãšã"); +SELECT * FROM users; +åå‰ +ã‚„ã¾ã  +ãŸãªã‹ +ã™ãšã +SELECT * FROM users +WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); +åå‰ +ãŸãªã‹ +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_NO_KEY +column_create users @540d@524d COLUMN_SCALAR LongText + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users @540d@524d +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_time_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_time_fractional_seconds_with_index.result index 9c2a8e876..35434a001 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_time_fractional_seconds_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_time_fractional_seconds_with_index.result @@ -6,16 +6,6 @@ average TIME(6), max TIME(6), KEY (average) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; -Table Create Table -running_records CREATE TABLE `running_records` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `average` time(6) DEFAULT NULL, - `max` time(6) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `average` (`average`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO running_records (title, average, max) VALUES ("normal condition", "01:00:00.000001", "01:05:00.000001"); INSERT INTO running_records (title, average, max) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_time_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_time_with_index.result index da75fd974..a0b0350a8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_time_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_time_with_index.result @@ -6,16 +6,6 @@ average TIME, max TIME, KEY (average) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; -Table Create Table -running_records CREATE TABLE `running_records` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `average` time DEFAULT NULL, - `max` time DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `average` (`average`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO running_records (title, average, max) VALUES ("normal condition", "01:00:00", "01:05:00"); INSERT INTO running_records (title, average, max) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result index da245535f..7ccb1fa23 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result @@ -6,16 +6,6 @@ created_at TIMESTAMP(6), updated_at TIMESTAMP(6), KEY (updated_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), - `updated_at` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000', - PRIMARY KEY (`id`), - KEY `updated_at` (`updated_at`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at, updated_at) VALUES ("clear day", "2012-01-29 21:51:01.111111", diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result index b310de481..4c221d9ec 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result @@ -2,20 +2,10 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, -created_at TIMESTAMP, -updated_at TIMESTAMP, +created_at TIMESTAMP DEFAULT '2016-04-21 00:00:00', +updated_at TIMESTAMP DEFAULT '2016-04-21 00:00:00', KEY (updated_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (`id`), - KEY `updated_at` (`updated_at`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at, updated_at) VALUES ("clear day", "2012-01-29 21:51:01", "2012-01-29 21:51:02"); INSERT INTO diaries (title, created_at, updated_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_year_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_year_with_index.result index 3ee91c1a4..be97d4fc9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_year_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_year_with_index.result @@ -5,15 +5,6 @@ title TEXT, party_year YEAR, KEY (party_year) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE aniversary_memos; -Table Create Table -aniversary_memos CREATE TABLE `aniversary_memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `party_year` year(4) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `party_year` (`party_year`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO aniversary_memos (title, party_year) VALUES ("We need a big cake!", "11"); INSERT INTO aniversary_memos (title, party_year) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_year_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_year_without_index.result index 254a0c071..a56271bcc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_year_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_year_without_index.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, party_year YEAR ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE aniversary_memos; -Table Create Table -aniversary_memos CREATE TABLE `aniversary_memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `party_year` year(4) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO aniversary_memos (title, party_year) VALUES ("We need a big cake!", "11"); INSERT INTO aniversary_memos (title, party_year) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/count_star.result b/storage/mroonga/mysql-test/mroonga/storage/r/count_star.result new file mode 100644 index 000000000..ab6be3a7b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/count_star.result @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id int PRIMARY KEY +); +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); +SELECT COUNT(*) FROM ids; +COUNT(*) +3 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_flags_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_flags_comment.result similarity index 60% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_flags_comment.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_flags_comment.result index af3c19e9b..e4c4ea059 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_flags_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_flags_comment.result @@ -7,4 +7,9 @@ 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 + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_flags_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_flags_parameter.result similarity index 59% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_flags_parameter.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_flags_parameter.result index 9e089e53f..9923b91f4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_flags_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_flags_parameter.result @@ -2,16 +2,14 @@ CREATE TABLE bugs ( id INT UNSIGNED PRIMARY KEY, tags TEXT FLAGS='COLUMN_VECTOR' ) DEFAULT CHARSET=utf8; -SHOW CREATE TABLE bugs; -Table Create Table -bugs CREATE TABLE `bugs` ( - `id` int(10) unsigned NOT NULL, - `tags` text `FLAGS`='COLUMN_VECTOR', - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 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 + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_comment.result similarity index 70% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_comment.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_comment.result index 5e5980ac6..7dede8671 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_comment.result @@ -7,12 +7,17 @@ tag VARCHAR(64) COMMENT 'groonga_type "tags"' ) DEFAULT CHARSET=utf8; 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY ShortText +column_create tags name COLUMN_SCALAR ShortText + 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_field_groonga_type_nonexistent.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_nonexistent.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_nonexistent.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_nonexistent.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_parameter.result similarity index 74% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_parameter.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_parameter.result index 24941f043..89e28aea6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_parameter.result @@ -10,17 +10,21 @@ Table Create Table bugs CREATE TABLE `bugs` ( `id` int(10) unsigned NOT NULL, `tag` varchar(64) DEFAULT NULL `GROONGA_TYPE`='tags', - PRIMARY KEY (`id`), - CONSTRAINT `tag` FOREIGN KEY (`tag`) REFERENCES `test`.`tags` (`name`) ON DELETE RESTRICT ON UPDATE RESTRICT + PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY ShortText +column_create tags name COLUMN_SCALAR ShortText + 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_field_type_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_type_comment.result similarity index 70% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_type_comment.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_type_comment.result index dc3f39d28..357adfdfb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_type_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_type_comment.result @@ -7,12 +7,17 @@ tag VARCHAR(64) COMMENT 'type "tags"' ) DEFAULT CHARSET=utf8; 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY ShortText +column_create tags name COLUMN_SCALAR ShortText + 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_field_type_nonexistent.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_type_nonexistent.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_type_nonexistent.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_type_nonexistent.result 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 9302037b7..0c33fac1d 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 @@ -5,6 +5,11 @@ COLLATE=utf8_bin COMMENT='default_tokenizer "TokenDelimit"'; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + 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_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_comment.result index 828de3ebb..8d39cac4e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_comment.result @@ -5,5 +5,5 @@ FULLTEXT INDEX (content) COMMENT '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 +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_index_flags_index_medium.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_medium.result new file mode 100644 index 000000000..e9d90b0bd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_medium.result @@ -0,0 +1,10 @@ +SET NAMES utf8; +CREATE TABLE memos ( +content VARCHAR(64) NOT NULL, +content_size INT NOT NULL, +KEY (content_size) COMMENT 'flags "INDEX_MEDIUM"' +) 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_size index COLUMN_INDEX|INDEX_MEDIUM memos content_size +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_small.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_small.result new file mode 100644 index 000000000..38a83b899 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_small.result @@ -0,0 +1,10 @@ +SET NAMES utf8; +CREATE TABLE memos ( +content VARCHAR(64) NOT NULL, +is_read BOOL NOT NULL, +KEY (is_read) COMMENT 'flags "INDEX_SMALL"' +) 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#is_read index COLUMN_INDEX|INDEX_SMALL memos is_read +DROP TABLE memos; 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 index b5368b433..e90fd833d 100644 --- 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 @@ -5,5 +5,5 @@ FULLTEXT INDEX (content) COMMENT '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 +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_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_parameter.result index 7e0d29a1e..8fbbd197f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_parameter.result @@ -11,5 +11,5 @@ memos CREATE TABLE `memos` ( ) ENGINE=Mroonga 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 +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_index_index_flags_none.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_none.result index c9283db72..3d31400fb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_none.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_none.result @@ -5,5 +5,5 @@ 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 +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_index_flags_with_position_and_with_weight.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_with_position_and_with_weight.result index 853845d5c..8f0c49953 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_with_position_and_with_weight.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_with_position_and_with_weight.result @@ -5,5 +5,5 @@ 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 +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_index_normalizer_fulltext_index_bin.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_fulltext_index_bin.result new file mode 100644 index 000000000..b6da79c72 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_fulltext_index_bin.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 "NormalizerAuto"' +) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +INSERT INTO diaries VALUES ("2013-04-23", "ブラックコーヒーを飲んã ã€‚"); +SELECT * FROM diaries +WHERE MATCH (content) AGAINST ("+ãµã‚‰ã¤ã" IN BOOLEAN MODE); +day content +SELECT * FROM diaries +WHERE MATCH (content) AGAINST ("+ブラック" IN BOOLEAN MODE); +day content +2013-04-23 ブラックコーヒーを飲んã ã€‚ +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_index_bin.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_index_bin.result new file mode 100644 index 000000000..2a05ccdc6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_index_bin.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +day DATE PRIMARY KEY, +content VARCHAR(64) NOT NULL, +INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +SELECT mroonga_command("dump --dump_plugins no"); +mroonga_command("dump --dump_plugins no") +table_create diaries TABLE_PAT_KEY Time +column_create diaries content COLUMN_SCALAR ShortText +column_create diaries day COLUMN_SCALAR Time + +table_create diaries#content TABLE_PAT_KEY ShortText --normalizer NormalizerAuto + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create diaries#content index COLUMN_INDEX diaries content +DROP TABLE diaries; 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 index 4088caf49..29f27d156 100644 --- 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 @@ -5,15 +5,11 @@ body text, FULLTEXT INDEX body_index (body) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"' ) DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"' -) ENGINE=Mroonga 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; @@ -29,3 +25,5 @@ id body 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_default.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_default.result index a18614d19..7f9ddd50e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_default.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_default.result @@ -6,14 +6,6 @@ id int primary key auto_increment, 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, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); 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 index 77765f61d..320fb9a56 100644 --- 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 @@ -4,15 +4,11 @@ id INT PRIMARY KEY AUTO_INCREMENT, name TEXT, FULLTEXT INDEX (name) COMMENT 'parser "off"' ) DEFAULT CHARSET=utf8; -SHOW CREATE TABLE variables; -Table Create Table -variables CREATE TABLE `variables` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `name` (`name`) COMMENT 'parser "off"' -) ENGINE=Mroonga 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_parser"); INSERT INTO variables (name) VALUES ("mroonga_default_wrapper_engine"); INSERT INTO variables (name) VALUES ("mroonga_dry_write"); @@ -40,3 +36,5 @@ id name 3 mroonga_default_wrapper_engine 2 mroonga_default_parser 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/create_table_index_token_filters_multiple_token_filters.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_multiple_token_filters.result index c730bafc8..ad68ca010 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_multiple_token_filters.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_multiple_token_filters.result @@ -11,7 +11,12 @@ 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 +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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +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_index_token_filters_one_token_filter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_one_token_filter.result index e0809eb0f..2cbb5a6b2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_one_token_filter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_one_token_filter.result @@ -11,7 +11,12 @@ 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 +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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +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_index_token_filters_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_parameter.result index df529282a..333cf3d5d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_parameter.result @@ -17,7 +17,12 @@ 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 +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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +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_index_tokenizer_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_comment.result index 5b8d0cd78..a39042168 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_comment.result @@ -5,14 +5,6 @@ body text, FULLTEXT INDEX body_index (body) COMMENT 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' ) DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) COMMENT 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); INSERT INTO diaries (body) VALUES ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_default.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_default.result index 9efa08bab..34545ecc3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_default.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_default.result @@ -6,14 +6,6 @@ id int primary key auto_increment, 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, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_off.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_off.result index 780ac2faa..91a5b96d1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_off.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_off.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, name TEXT, FULLTEXT INDEX (name) COMMENT 'tokenizer "off"' ) DEFAULT CHARSET=utf8; -SHOW CREATE TABLE variables; -Table Create Table -variables CREATE TABLE `variables` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `name` (`name`) COMMENT 'tokenizer "off"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 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"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_parameter.result index 671709258..c827abe2c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_parameter.result @@ -4,14 +4,6 @@ id int PRIMARY KEY AUTO_INCREMENT, body text, FULLTEXT INDEX body_index (body) TOKENIZER='TokenBigramSplitSymbolAlphaDigit' ) DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) `TOKENIZER`='TokenBigramSplitSymbolAlphaDigit' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); INSERT INTO diaries (body) VALUES ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_multiple_token_filters.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_multiple_token_filters.result index 6308b33d4..8934be78d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_multiple_token_filters.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_multiple_token_filters.result @@ -12,14 +12,19 @@ FULLTEXT 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 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +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 + 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_table_token_filters_one_token_filter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_one_token_filter.result index 2f4a90d40..e3df28509 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_one_token_filter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_one_token_filter.result @@ -12,14 +12,19 @@ FULLTEXT 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 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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +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/drop_database_no_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/drop_database_no_table.result new file mode 100644 index 000000000..ebc7db1cf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/drop_database_no_table.result @@ -0,0 +1,20 @@ +SET NAMES UTF8; +DROP DATABASE IF EXISTS another; +CREATE DATABASE another; +USE another; +CREATE TABLE diaries ( +title TEXT, +FULLTEXT INDEX (title) +); +DROP TABLE diaries; +USE test; +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +title TEXT, +FULLTEXT INDEX (title) +); +DROP DATABASE another; +SELECT mroonga_command('object_exist mroonga_operations'); +mroonga_command('object_exist mroonga_operations') +true +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_add.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_add.result new file mode 100644 index 000000000..bfb263f11 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_add.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +CREATE TABLE comments ( +comment int unsigned PRIMARY KEY, +content text NOT NULL +); +CREATE TABLE articles ( +content text NOT NULL, +comment int unsigned +); +ALTER TABLE articles ADD FOREIGN KEY (comment) REFERENCES comments (comment); +SHOW CREATE TABLE articles; +Table Create Table +articles CREATE TABLE `articles` ( + `content` text NOT NULL, + `comment` int(10) unsigned DEFAULT NULL, + KEY `comment` (`comment`), + CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +DROP TABLE articles; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_drop.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_drop.result new file mode 100644 index 000000000..101a4a3de --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_drop.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +CREATE TABLE comments ( +comment int unsigned PRIMARY KEY, +content text NOT NULL +); +CREATE TABLE articles ( +content text NOT NULL, +comment int unsigned, +FOREIGN KEY (comment) REFERENCES comments (comment) +); +ALTER TABLE articles DROP FOREIGN KEY comment; +SHOW CREATE TABLE articles; +Table Create Table +articles CREATE TABLE `articles` ( + `content` text NOT NULL, + `comment` int(10) unsigned DEFAULT NULL, + KEY `comment` (`comment`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +DROP TABLE articles; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result index fc550d97f..c17780c04 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result @@ -1,134 +1,15 @@ -drop table if exists articles2; -drop table if exists articles; -drop table if exists comments2; -drop table if exists comments; -create table comments( -comment int unsigned, -content text not null, -primary key(comment) -); -create table articles( -content text not null, -comment int unsigned, -FOREIGN KEY (comment) REFERENCES comments (comment) -); -insert into comments (comment, content) values -(1, 'aaa bbb'),(2, 'ccc ddd'),(3, 'eee fff'); -insert into articles (content, comment) values -('111aaa', 1),('222bbb', 2),('222ccc', 2); -select comment, content from comments; -comment content -1 aaa bbb -2 ccc ddd -3 eee fff -select content, comment from articles; -content comment -111aaa 1 -222bbb 2 -222ccc 2 -show create table comments; -Table Create Table -comments CREATE TABLE `comments` ( - `comment` int(10) unsigned NOT NULL DEFAULT '0', - `content` text NOT NULL, - PRIMARY KEY (`comment`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -show create table articles; -Table Create Table -articles CREATE TABLE `articles` ( - `content` text NOT NULL, - `comment` int(10) unsigned DEFAULT NULL, - KEY `comment` (`comment`), - CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -select * from information_schema.referential_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME -def test comment def test PRIMARY NONE RESTRICT RESTRICT articles comments -rename table comments to comments2; -rename table articles to articles2; -create table comments( -comment int unsigned, -content text not null, -primary key(comment) +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +CREATE TABLE comments ( +comment int unsigned PRIMARY KEY, +content text NOT NULL ); -create table articles( -content text not null, +CREATE TABLE articles ( +content text NOT NULL, comment int unsigned, FOREIGN KEY (comment) REFERENCES comments (comment) ); -insert into comments (comment, content) values -(1, 'ab'),(2, 'cd'),(3, 'ef'); -insert into articles (content, comment) values -('1a', 1),('2b', 2),('2c', 2); -select comment, content from comments; -comment content -1 ab -2 cd -3 ef -select content, comment from articles; -content comment -1a 1 -2b 2 -2c 2 -select comment, content from comments2; -comment content -1 aaa bbb -2 ccc ddd -3 eee fff -select content, comment from articles2; -content comment -111aaa 1 -222bbb 2 -222ccc 2 -show create table comments; -Table Create Table -comments CREATE TABLE `comments` ( - `comment` int(10) unsigned NOT NULL DEFAULT '0', - `content` text NOT NULL, - PRIMARY KEY (`comment`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -show create table articles; -Table Create Table -articles CREATE TABLE `articles` ( - `content` text NOT NULL, - `comment` int(10) unsigned DEFAULT NULL, - KEY `comment` (`comment`), - CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -show create table comments2; -Table Create Table -comments2 CREATE TABLE `comments2` ( - `comment` int(10) unsigned NOT NULL DEFAULT '0', - `content` text NOT NULL, - PRIMARY KEY (`comment`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -show create table articles2; -Table Create Table -articles2 CREATE TABLE `articles2` ( - `content` text NOT NULL, - `comment` int(10) unsigned DEFAULT NULL, - KEY `comment` (`comment`), - CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments2` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -select * from information_schema.referential_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME -def test comment def test PRIMARY NONE RESTRICT RESTRICT articles comments -def test comment def test PRIMARY NONE RESTRICT RESTRICT articles2 comments2 -alter table articles drop foreign key comment; -show create table articles; -Table Create Table -articles CREATE TABLE `articles` ( - `content` text NOT NULL, - `comment` int(10) unsigned DEFAULT NULL, - KEY `comment` (`comment`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -select content, comment from articles; -content comment -1a 1 -2b 2 -2c 2 -alter table articles add FOREIGN KEY (comment) REFERENCES comments (comment); -show create table articles; +SHOW CREATE TABLE articles; Table Create Table articles CREATE TABLE `articles` ( `content` text NOT NULL, @@ -136,12 +17,6 @@ articles CREATE TABLE `articles` ( KEY `comment` (`comment`), CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE=Mroonga DEFAULT CHARSET=latin1 -select content, comment from articles; -content comment -1a 1 -2b 2 -2c 2 -drop table articles2; -drop table articles; -drop table comments2; -drop table comments; +SELECT * FROM information_schema.referential_constraints; +DROP TABLE articles; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_existent.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_existent.result new file mode 100644 index 000000000..e16157b43 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_existent.result @@ -0,0 +1,53 @@ +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE TABLE comments ( +id int unsigned PRIMARY KEY, +content varchar(140) NOT NULL +); +CREATE TABLE entries ( +content varchar(140) NOT NULL, +comment_id int unsigned, +FOREIGN KEY (comment_id) REFERENCES comments (id) +); +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +DELETE FROM comments WHERE id = 100; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (one or more child rows exist in ) +SELECT * FROM entries; +content comment_id +Hello! 100 +SELECT * FROM comments; +id content +100 Good entry! +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create comments TABLE_PAT_KEY UInt32 +column_create comments content COLUMN_SCALAR ShortText +column_create comments id COLUMN_SCALAR UInt32 + +table_create entries TABLE_NO_KEY +column_create entries content COLUMN_SCALAR ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create entries comment_id COLUMN_SCALAR comments + +load --table comments +[ +["_key","content","id"], +[100,"Good entry!",100] +] + +load --table entries +[ +["_id","comment_id","content"], +[1,100,"Hello!"] +] + +column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id +DROP TABLE entries; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_nonexistent.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_nonexistent.result new file mode 100644 index 000000000..edaba25fa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_nonexistent.result @@ -0,0 +1,53 @@ +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE TABLE comments ( +id int unsigned PRIMARY KEY, +content varchar(140) NOT NULL +); +CREATE TABLE entries ( +content varchar(140) NOT NULL, +comment_id int unsigned, +FOREIGN KEY (comment_id) REFERENCES comments (id) +); +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO comments (id, content) VALUES (200, 'Very good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +DELETE FROM comments WHERE id = 200; +SELECT * FROM entries; +content comment_id +Hello! 100 +SELECT * FROM comments; +id content +100 Good entry! +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create comments TABLE_PAT_KEY UInt32 +column_create comments content COLUMN_SCALAR ShortText +column_create comments id COLUMN_SCALAR UInt32 + +table_create entries TABLE_NO_KEY +column_create entries content COLUMN_SCALAR ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create entries comment_id COLUMN_SCALAR comments + +load --table comments +[ +["_key","content","id"], +[100,"Good entry!",100] +] + +load --table entries +[ +["_id","comment_id","content"], +[1,100,"Hello!"] +] + +column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id +DROP TABLE entries; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_existent.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_existent.result new file mode 100644 index 000000000..ddc54cb3f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_existent.result @@ -0,0 +1,51 @@ +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE TABLE comments ( +id int unsigned PRIMARY KEY, +content varchar(140) NOT NULL +); +CREATE TABLE entries ( +content varchar(140) NOT NULL, +comment_id int unsigned, +FOREIGN KEY (comment_id) REFERENCES comments (id) +); +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +SELECT * FROM entries; +content comment_id +Hello! 100 +SELECT * FROM comments; +id content +100 Good entry! +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create comments TABLE_PAT_KEY UInt32 +column_create comments content COLUMN_SCALAR ShortText +column_create comments id COLUMN_SCALAR UInt32 + +table_create entries TABLE_NO_KEY +column_create entries content COLUMN_SCALAR ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create entries comment_id COLUMN_SCALAR comments + +load --table comments +[ +["_key","content","id"], +[100,"Good entry!",100] +] + +load --table entries +[ +["_id","comment_id","content"], +[1,100,"Hello!"] +] + +column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id +DROP TABLE entries; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_nonexistent.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_nonexistent.result new file mode 100644 index 000000000..c220bb897 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_nonexistent.result @@ -0,0 +1,37 @@ +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE TABLE comments ( +id int unsigned PRIMARY KEY, +content varchar(140) NOT NULL +); +CREATE TABLE entries ( +content varchar(140) NOT NULL, +comment_id int unsigned, +FOREIGN KEY (comment_id) REFERENCES comments (id) +); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 1); +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (foreign record doesn't exist: :<1>) +SELECT * FROM entries; +content comment_id +SELECT * FROM comments; +id content +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create comments TABLE_PAT_KEY UInt32 +column_create comments content COLUMN_SCALAR ShortText +column_create comments id COLUMN_SCALAR UInt32 + +table_create entries TABLE_NO_KEY +column_create entries content COLUMN_SCALAR ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create entries comment_id COLUMN_SCALAR comments + +column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id +DROP TABLE entries; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_rename.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_rename.result new file mode 100644 index 000000000..5ea0ae3e3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_rename.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +DROP TABLE IF EXISTS articles2; +DROP TABLE IF EXISTS comments2; +CREATE TABLE comments ( +comment int unsigned PRIMARY KEY, +content text NOT NULL +); +CREATE TABLE articles ( +content text NOT NULL, +comment int unsigned, +FOREIGN KEY (comment) REFERENCES comments (comment) +); +RENAME TABLE comments TO comments2; +RENAME TABLE articles TO articles2; +SHOW CREATE TABLE articles2; +Table Create Table +articles2 CREATE TABLE `articles2` ( + `content` text NOT NULL, + `comment` int(10) unsigned DEFAULT NULL, + KEY `comment` (`comment`), + CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments2` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +SELECT * FROM information_schema.referential_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME +def test comment def test PRIMARY NONE RESTRICT RESTRICT articles2 comments2 +DROP TABLE articles2; +DROP TABLE comments2; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_existent.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_existent.result new file mode 100644 index 000000000..9db892d5d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_existent.result @@ -0,0 +1,55 @@ +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE TABLE comments ( +id int unsigned PRIMARY KEY, +content varchar(140) NOT NULL +); +CREATE TABLE entries ( +content varchar(140) NOT NULL, +comment_id int unsigned, +FOREIGN KEY (comment_id) REFERENCES comments (id) +); +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO comments (id, content) VALUES (200, 'Very good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +UPDATE entries SET comment_id = 200 WHERE content = 'Hello!'; +SELECT * FROM entries; +content comment_id +Hello! 200 +SELECT * FROM comments; +id content +100 Good entry! +200 Very good entry! +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create comments TABLE_PAT_KEY UInt32 +column_create comments content COLUMN_SCALAR ShortText +column_create comments id COLUMN_SCALAR UInt32 + +table_create entries TABLE_NO_KEY +column_create entries content COLUMN_SCALAR ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create entries comment_id COLUMN_SCALAR comments + +load --table comments +[ +["_key","content","id"], +[100,"Good entry!",100], +[200,"Very good entry!",200] +] + +load --table entries +[ +["_id","comment_id","content"], +[1,200,"Hello!"] +] + +column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id +DROP TABLE entries; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_nonexistent.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_nonexistent.result new file mode 100644 index 000000000..615c3a090 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_nonexistent.result @@ -0,0 +1,53 @@ +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE TABLE comments ( +id int unsigned PRIMARY KEY, +content varchar(140) NOT NULL +); +CREATE TABLE entries ( +content varchar(140) NOT NULL, +comment_id int unsigned, +FOREIGN KEY (comment_id) REFERENCES comments (id) +); +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +UPDATE entries SET comment_id = 200 WHERE content = 'Hello!'; +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (foreign record doesn't exist: :<200>) +SELECT * FROM entries; +content comment_id +Hello! 100 +SELECT * FROM comments; +id content +100 Good entry! +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create comments TABLE_PAT_KEY UInt32 +column_create comments content COLUMN_SCALAR ShortText +column_create comments id COLUMN_SCALAR UInt32 + +table_create entries TABLE_NO_KEY +column_create entries content COLUMN_SCALAR ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create entries comment_id COLUMN_SCALAR comments + +load --table comments +[ +["_key","content","id"], +[100,"Good entry!",100] +] + +load --table entries +[ +["_id","comment_id","content"], +[1,100,"Hello!"] +] + +column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id +DROP TABLE entries; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_escape.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_escape.result index a48eb25de..5beda03ce 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_escape.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_escape.result @@ -1,5 +1,5 @@ DROP TABLE IF EXISTS memos; -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET NAMES UTF8; CREATE TABLE memos ( id INT PRIMARY KEY, @@ -15,4 +15,4 @@ id content 1 (groonga) Installed! 3 (groonga) Upgraded! DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_leading_not.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_leading_not.result index d0e1a68f7..758f969fe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_leading_not.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_leading_not.result @@ -6,15 +6,6 @@ title VARCHAR(255), content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_operator.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_operator.result new file mode 100644 index 000000000..deb4bd853 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_operator.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); +INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); +SELECT *, MATCH(title, content) +AGAINST("*SS content @ '天気'" in BOOLEAN MODE) AS score +FROM diaries +WHERE MATCH(title, content) +AGAINST("*SS content @ '天気'" in BOOLEAN MODE); +id title content score +2 天気 明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„㦠1 +3 富士山 今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚ 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_selector.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_selector.result new file mode 100644 index 000000000..43b21bc1c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_selector.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS items; +DROP TABLE IF EXISTS readings; +SET NAMES utf8; +CREATE TABLE readings ( +reading VARCHAR(255) PRIMARY KEY +) DEFAULT CHARSET=utf8 +COLLATE=utf8_bin +COMMENT='default_tokenizer "TokenDelimit"'; +CREATE TABLE items ( +name VARCHAR(255) PRIMARY KEY, +readings TEXT COMMENT 'flags "COLUMN_VECTOR", type "readings"', +FULLTEXT INDEX items_index(readings) COMMENT 'table "readings"' +) DEFAULT CHARSET=utf8; +INSERT INTO items VALUES("日本", "ニホン ニッãƒãƒ³"); +INSERT INTO items VALUES("ローマ字", "ローマジ"); +INSERT INTO items VALUES("漢字", "カンジ"); +SELECT *, MATCH(readings) +AGAINST("*SS sub_filter(readings, 'prefix_rk_search(_key, \"niho\")')" in BOOLEAN MODE) AS score +FROM items +WHERE MATCH(readings) +AGAINST("*SS sub_filter(readings, 'prefix_rk_search(_key, \"niho\")')" in BOOLEAN MODE); +name readings score +日本 ニホン ニッãƒãƒ³ 1 +DROP TABLE items; +DROP TABLE readings; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error.result index 5746ce89c..46dd32905 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error.result @@ -1,5 +1,5 @@ DROP TABLE IF EXISTS memos; -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = ERROR; SET NAMES UTF8; CREATE TABLE memos ( @@ -14,4 +14,4 @@ SELECT * FROM memos WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); ERROR 42000: failed to parse fulltext search keyword: <(groonga>: > DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error_and_log.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error_and_log.result index 1811994b6..d782357ee 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error_and_log.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error_and_log.result @@ -1,5 +1,5 @@ DROP TABLE IF EXISTS memos; -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = ERROR_AND_LOG; SET NAMES UTF8; CREATE TABLE memos ( @@ -14,4 +14,4 @@ SELECT * FROM memos WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); ERROR 42000: failed to parse fulltext search keyword: <(groonga>: > DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore.result index 6a4759963..fd5b8d1e0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore.result @@ -1,5 +1,5 @@ DROP TABLE IF EXISTS memos; -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = "IGNORE"; SET NAMES UTF8; CREATE TABLE memos ( @@ -14,4 +14,4 @@ SELECT * FROM memos WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); id content DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore_and_log.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore_and_log.result index 384d677c4..a485e1cad 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore_and_log.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore_and_log.result @@ -1,5 +1,5 @@ DROP TABLE IF EXISTS memos; -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = IGNORE_AND_LOG; SET NAMES UTF8; CREATE TABLE memos ( @@ -14,4 +14,4 @@ SELECT * FROM memos WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); id content DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_utf8mb4.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_utf8mb4.result index 31d45181c..136585c38 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_utf8mb4.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_utf8mb4.result @@ -6,15 +6,6 @@ title VARCHAR(255) CHARSET utf8mb4 COLLATE utf8mb4_general_ci, content TEXT CHARSET utf8mb4 COLLATE utf8mb4_general_ci, FULLTEXT INDEX (content) ) DEFAULT CHARSET utf8mb4; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 INSERT INTO diaries VALUES(1, "Alphabet", "ABCDE"); INSERT INTO diaries VALUES(2, "Mathmatics", "ð€ðð‚ðƒð„ | U+1D400-U+1D405"); INSERT INTO diaries VALUES(3, "ã²ã‚‰ãŒãª", "ã‚ã„ã†ãˆãŠ"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_found_rows.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_found_rows.result index c107991d1..25da7011a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_found_rows.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_found_rows.result @@ -10,19 +10,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_index_recreate.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_index_recreate.result index 04996d30f..e38913a63 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_index_recreate.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_index_recreate.result @@ -6,15 +6,6 @@ title varchar(255), content text, fulltext index (title) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_values.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_values.result index 623c66daa..5c48cadf5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_values.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_values.result @@ -1,13 +1,5 @@ drop table if exists t1, t2, t3; create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` text, - PRIMARY KEY (`c1`), - FULLTEXT KEY `ft` (`c2`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 insert into t1 values (1, "hoge hoge"); insert into t1 values (2, "fuga fuga"); insert into t1 values (3, "moge moge"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_delete.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_delete.result index 843c4b958..6475f9ec7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_delete.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_delete.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_insert.result index 3856d7ecc..4244af269 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_insert.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_insert.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_recreate.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_recreate.result index 59b26574c..8d18efaa5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_recreate.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_recreate.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_update.result index d17ff6adf..0e85b45ae 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_update.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_update.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_index.result index 81b40261a..37d7597b1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_index.result @@ -6,16 +6,6 @@ body text, fulltext index title_index (title), 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 `title_index` (`title`), - 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."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_no_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_no_primary_key.result index 5f8563257..db4afff0e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_no_primary_key.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_no_primary_key.result @@ -5,13 +5,6 @@ title VARCHAR(255), content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `title` varchar(255) DEFAULT NULL, - `content` text, - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES("Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES("天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES("富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_100_no_such_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_10_0_no_such_key.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_100_no_such_key.result rename to storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_10_0_no_such_key.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_55_no_such_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_5_5_no_such_key.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_55_no_such_key.result rename to storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_5_5_no_such_key.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_56_no_such_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_5_6_no_such_key.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_56_no_such_key.result rename to storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_5_6_no_such_key.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_command_auto-escape.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_command_auto-escape.result new file mode 100644 index 000000000..e07eae11e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_command_auto-escape.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries ( +title TEXT, +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES('It is Groonga'); +INSERT INTO diaries VALUES('It is Mroonga'); +SELECT mroonga_command('select', +'table', 'diaries', +'filter', 'title @ "Groonga"'); +mroonga_command('select', +'table', 'diaries', +'filter', 'title @ "Groonga"') +[[[1],[["_id","UInt32"],["title","LongText"]],[1,"It is Groonga"]]] +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_command_special-database-name.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_command_special-database-name.result new file mode 100644 index 000000000..e588408e9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_command_special-database-name.result @@ -0,0 +1,22 @@ +DROP DATABASE IF EXISTS `db-1`; +CREATE DATABASE `db-1`; +USE `db-1`; +SET NAMES UTF8; +CREATE TABLE diaries ( +title TEXT, +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create diaries TABLE_NO_KEY +column_create diaries title COLUMN_SCALAR LongText + +table_create diaries#title TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create diaries#title index COLUMN_INDEX|WITH_POSITION diaries title +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_not_string.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_not_string.result index c17624581..bb68bbff1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_not_string.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_not_string.result @@ -1,3 +1,3 @@ SET NAMES UTF8; SELECT mroonga_escape(29) AS escaped_query; -ERROR HY000: Can't initialize function 'mroonga_escape'; mroonga_escape(): The 1st argument must be query as string +ERROR HY000: Can't initialize function 'mroonga_escape'; mroonga_escape(): The 1st query argument must be string diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_all.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_all.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_all.result rename to storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_all.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_custom.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_custom.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_custom.result rename to storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_custom.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_join.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_join.result new file mode 100644 index 000000000..ec765b118 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_join.result @@ -0,0 +1,26 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS users; +DROP TABLE IF EXISTS queries; +CREATE TABLE users ( +id INT +); +CREATE TABLE queries ( +user_id INT, +query TEXT +); +INSERT INTO users VALUES (1); +INSERT INTO users VALUES (2); +INSERT INTO users VALUES (3); +INSERT INTO queries VALUES (1, '(a)'); +INSERT INTO queries VALUES (2, '(b)'); +INSERT INTO queries VALUES (3, '(c)'); +SELECT users.id, mroonga_escape(queries.query) AS escaped_query +FROM queries +LEFT JOIN users ON users.id = queries.user_id +ORDER BY users.id; +id escaped_query +1 \(a\) +2 \(b\) +3 \(c\) +DROP TABLE queries; +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_match_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_match_against.result new file mode 100644 index 000000000..8b92ec413 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_match_against.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS memos; +SET GLOBAL mroonga_default_parser = TokenDelimit; +SET NAMES utf8mb4; +CREATE TABLE memos ( +id INT PRIMARY KEY, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8mb4; +INSERT INTO memos VALUES(1, "(Groonga) Installed!"); +INSERT INTO memos VALUES(2, "(Mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(Groonga) Upgraded!"); +SELECT * FROM memos +WHERE MATCH(content) AGAINST(mroonga_escape("(groonga)") IN BOOLEAN MODE); +id content +1 (Groonga) Installed! +3 (Groonga) Upgraded! +DROP TABLE memos; +SET GLOBAL mroonga_default_parser = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_named.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_named.result new file mode 100644 index 000000000..c6c39fccb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_named.result @@ -0,0 +1,4 @@ +SET NAMES UTF8; +SELECT mroonga_escape('+-><~*()\"\\:' AS query) AS escaped_query; +escaped_query +\+\-\>\<\~\*\(\)\"\\\: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_nested.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_nested.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_nested.result rename to storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_nested.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_decimal.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_decimal.result new file mode 100644 index 000000000..246f28000 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_decimal.result @@ -0,0 +1,11 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS data; +CREATE TABLE data ( +value DECIMAL(5, 3) +); +INSERT INTO data VALUES (2.9); +SELECT mroonga_escape(value AS script) +FROM data; +mroonga_escape(value AS script) +2.9 +DROP TABLE data; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_integer.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_integer.result new file mode 100644 index 000000000..902bbd317 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_integer.result @@ -0,0 +1,4 @@ +SET NAMES UTF8; +SELECT mroonga_escape(-29 AS script) AS escaped_query; +escaped_query +-29 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_real.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_real.result new file mode 100644 index 000000000..178ff3123 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_real.result @@ -0,0 +1,11 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS data; +CREATE TABLE data ( +value REAL +); +INSERT INTO data VALUES (2.9); +SELECT mroonga_escape(value AS script) +FROM data; +mroonga_escape(value AS script) +2.9 +DROP TABLE data; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_string.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_string.result new file mode 100644 index 000000000..6f5e9b2a2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_string.result @@ -0,0 +1,4 @@ +SET NAMES UTF8; +SELECT mroonga_escape('a\"\\\'z' AS script) AS escaped_query; +escaped_query +"a\"\\'z" diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_dynamic_keyword.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_dynamic_keyword.result new file mode 100644 index 000000000..96df65061 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_dynamic_keyword.result @@ -0,0 +1,11 @@ +CREATE TABLE keywords ( +keyword text +); +INSERT INTO keywords VALUES ('Mroonga'); +INSERT INTO keywords VALUES ('Groonga'); +SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', +keyword) AS highlighted +FROM keywords; +highlighted +Mroonga is the Groonga based storage engine. +Mroonga is the Groonga based storage engine. diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_japanese.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_japanese.result new file mode 100644 index 000000000..ca7d79684 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_japanese.result @@ -0,0 +1,13 @@ +SET NAMES utf8; +SELECT mroonga_highlight_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', +'ロック', 'æ›´æ–°') AS highlighted; +highlighted +Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚ diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_multiple_keywords.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_multiple_keywords.result new file mode 100644 index 000000000..9f4a3dffb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_multiple_keywords.result @@ -0,0 +1,4 @@ +SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', +'Mroonga', 'Groonga') AS highlighted; +highlighted +Mroonga is the Groonga based storage engine. diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_normalizer.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_normalizer.result new file mode 100644 index 000000000..bf280dba0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_normalizer.result @@ -0,0 +1,4 @@ +SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', +'mroonga') AS highlighted; +highlighted +Mroonga is the Groonga based storage engine. diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query.result new file mode 100644 index 000000000..b2d0f509f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query.result @@ -0,0 +1,13 @@ +SET NAMES utf8; +SELECT mroonga_highlight_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', +'ロック æ›´æ–° -ボトルãƒãƒƒã‚¯' AS query) AS highlighted; +highlighted +Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚ diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query_pragma.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query_pragma.result new file mode 100644 index 000000000..bd11a908b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query_pragma.result @@ -0,0 +1,13 @@ +SET NAMES utf8; +SELECT mroonga_highlight_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', +'*D- +ロック +æ›´æ–° ボトルãƒãƒƒã‚¯' AS query) AS highlighted; +highlighted +Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚ diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_record.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_record.result new file mode 100644 index 000000000..fce13d9cd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_record.result @@ -0,0 +1,32 @@ +CREATE TABLE memos ( +content text +); +INSERT INTO memos VALUES ('Mroonga is a MySQL storage engine based on Groonga, the full text search engine. + +In MySQL 5.1 or later, Pluggable Storage Engine interface is introduced, and we can use custom storage engines easily. So we implement Mroonga, so that we can use Groonga through MySQL. + +By using Mroonga, you can use Groonga with SQL.'); +INSERT INTO memos VALUES ('Since Tritonn was the modified version of MySQL, we need to build it by ourselves or use binary files provided by Tritonn project, thus we cannot use the official binary files provided by MySQL. + +On the other hand, Mroonga is an independent program (shared library) using Pluggable Storage Engine interface, and we can dynamically load it on MySQL''s official binary. So we can use it more easily than Tritonn.'); +INSERT INTO memos VALUES ('Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga''s fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga''s read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data.'); +SELECT mroonga_highlight_html(content, 'Mroonga') AS highlighted +FROM memos; +highlighted +Mroonga is a MySQL storage engine based on Groonga, the full text search engine. + +In MySQL 5.1 or later, Pluggable Storage Engine interface is introduced, and we can use custom storage engines easily. So we implement Mroonga, so that we can use Groonga through MySQL. + +By using Mroonga, you can use Groonga with SQL. +Since Tritonn was the modified version of MySQL, we need to build it by ourselves or use binary files provided by Tritonn project, thus we cannot use the official binary files provided by MySQL. + +On the other hand, Mroonga is an independent program (shared library) using Pluggable Storage Engine interface, and we can dynamically load it on MySQL's official binary. So we can use it more easily than Tritonn. +Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga's fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga's read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data. diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_default.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_default.result new file mode 100644 index 000000000..fe5cc8859 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_default.result @@ -0,0 +1,3 @@ +SELECT mroonga_normalize('aBcAbCã‘'); +mroonga_normalize('aBcAbCã‘') +abcabcリットル diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_normalizer.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_normalizer.result new file mode 100644 index 000000000..3d675fb0e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_normalizer.result @@ -0,0 +1,3 @@ +SELECT mroonga_normalize('aBcAbCã‘', "NormalizerAuto"); +mroonga_normalize('aBcAbCã‘', "NormalizerAuto") +abcabcリットル diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_record.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_record.result new file mode 100644 index 000000000..7d4192f62 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_record.result @@ -0,0 +1,7 @@ +CREATE TABLE memos ( +content text +); +INSERT INTO memos VALUES ('aBcAbCã‘'); +SELECT mroonga_normalize(content) FROM memos; +mroonga_normalize(content) +abcabcリットル diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_multiple.result new file mode 100644 index 000000000..9160633c8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_multiple.result @@ -0,0 +1,18 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS synonyms; +CREATE TABLE synonyms ( +term varchar(255), +synonym varchar(255), +INDEX (term) +); +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); +INSERT INTO synonyms VALUES ('Mroonga', 'Mroonga'); +INSERT INTO synonyms VALUES ('Mroonga', 'Groonga MySQL'); +SELECT mroonga_query_expand('synonyms', +'term', +'synonym', +'Mroonga Rroonga PGroonga') AS query; +query +((Mroonga) OR (Groonga MySQL)) ((Rroonga) OR (Groonga Ruby)) PGroonga +DROP TABLE synonyms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_no_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_no_index.result new file mode 100644 index 000000000..6a2b5d7a9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_no_index.result @@ -0,0 +1,15 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS synonyms; +CREATE TABLE synonyms ( +term varchar(255), +synonym varchar(255) +); +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); +SELECT mroonga_query_expand('synonyms', +'term', +'synonym', +'Mroonga Rroonga PGroonga') AS query; +query +Mroonga ((Rroonga) OR (Groonga Ruby)) PGroonga +DROP TABLE synonyms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_one.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_one.result new file mode 100644 index 000000000..5f7b0f73c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_one.result @@ -0,0 +1,16 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS synonyms; +CREATE TABLE synonyms ( +term varchar(255), +synonym varchar(255), +INDEX (term) +); +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); +SELECT mroonga_query_expand('synonyms', +'term', +'synonym', +'Mroonga Rroonga PGroonga') AS query; +query +Mroonga ((Rroonga) OR (Groonga Ruby)) PGroonga +DROP TABLE synonyms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_pragma.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_pragma.result new file mode 100644 index 000000000..4690cd013 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_pragma.result @@ -0,0 +1,17 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS synonyms; +CREATE TABLE synonyms ( +term varchar(255), +synonym varchar(255), +INDEX (term) +); +INSERT INTO synonyms VALUES ('D+', '[D+]'); +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); +SELECT mroonga_query_expand('synonyms', +'term', +'synonym', +'*D+ Mroonga Rroonga PGroonga') AS query; +query +*D+ Mroonga ((Rroonga) OR (Groonga Ruby)) PGroonga +DROP TABLE synonyms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_dynamic_keyword.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_dynamic_keyword.result new file mode 100644 index 000000000..24665fbfc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_dynamic_keyword.result @@ -0,0 +1,11 @@ +CREATE TABLE keywords ( +keyword text +); +INSERT INTO keywords VALUES ('Mroonga'); +INSERT INTO keywords VALUES ('Groonga'); +SELECT mroonga_snippet_html('Mroonga is the Groonga based storage engine.', +keyword) as snippet +FROM keywords; +snippet +
Mroonga is the Groonga based storage engine.
+
Mroonga is the Groonga based storage engine.
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_japanese.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_japanese.result new file mode 100644 index 000000000..f1efa42cc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_japanese.result @@ -0,0 +1,9 @@ +SET NAMES utf8; +SELECT mroonga_snippet_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', +'ロック', 'æ›´æ–°') as snippet; +snippet +
ãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚
用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒ
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_keywords.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_keywords.result new file mode 100644 index 000000000..013ad5b19 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_keywords.result @@ -0,0 +1,4 @@ +SELECT mroonga_snippet_html('Mroonga is the Groonga based storage engine.', +'Mroonga', 'Groonga') as snippet; +snippet +
Mroonga is the Groonga based storage engine.
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_snippets.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_snippets.result new file mode 100644 index 000000000..d3f790b3c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_snippets.result @@ -0,0 +1,10 @@ +SELECT mroonga_snippet_html('Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga''s fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga''s read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data.', +'lock') as snippet; +snippet +
ng. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one
f the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga's read-lock free characteristic. And you might have the performance bottle neck in the storage engine in upda
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query.result new file mode 100644 index 000000000..d05c2323b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query.result @@ -0,0 +1,9 @@ +SET NAMES utf8; +SELECT mroonga_snippet_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', +'ロック æ›´æ–° -ボトルãƒãƒƒã‚¯' AS query) as snippet; +snippet +
ãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚
用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒ
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query_pragma.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query_pragma.result new file mode 100644 index 000000000..02ce90985 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query_pragma.result @@ -0,0 +1,9 @@ +SET NAMES utf8; +SELECT mroonga_snippet_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', +'*D- +ロック +æ›´æ–° ボトルãƒãƒƒã‚¯' AS query) as snippet; +snippet +
ãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚
用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒ
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_record.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_record.result new file mode 100644 index 000000000..469defbcb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_record.result @@ -0,0 +1,30 @@ +CREATE TABLE memos ( +content text +); +INSERT INTO memos VALUES ('Mroonga is a MySQL storage engine based on Groonga, the full text search engine. + +In MySQL 5.1 or later, Pluggable Storage Engine interface is introduced, and we can use custom storage engines easily. So we implement Mroonga, so that we can use Groonga through MySQL. + +By using Mroonga, you can use Groonga with SQL.'); +INSERT INTO memos VALUES ('Since Tritonn was the modified version of MySQL, we need to build it by ourselves or use binary files provided by Tritonn project, thus we cannot use the official binary files provided by MySQL. + +On the other hand, Mroonga is an independent program (shared library) using Pluggable Storage Engine interface, and we can dynamically load it on MySQL''s official binary. So we can use it more easily than Tritonn.'); +INSERT INTO memos VALUES ('Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga''s fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga''s read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data.'); +SELECT mroonga_snippet_html(content, 'Mroonga') as snippet +FROM memos; +snippet +
Mroonga is a MySQL storage engine based on Groonga, the full text search engine. + +In MySQL 5.1 or later, Pluggable Storage Engine interface is introduced, and we can use custom storage engines easily.
So we implement Mroonga, so that we can use Groonga through MySQL. + +By using Mroonga, you can use Groonga with SQL.
+
onn project, thus we cannot use the official binary files provided by MySQL. + +On the other hand, Mroonga is an independent program (shared library) using Pluggable Storage Engine interface, and we can
+
Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described
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 29fd989b4..5095232df 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result @@ -5,15 +5,6 @@ name TEXT, location GEOMETRY NOT NULL, SPATIAL KEY location_index (location) ); -SHOW CREATE TABLE shops; -Table Create Table -shops CREATE TABLE `shops` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - `location` geometry NOT NULL, - PRIMARY KEY (`id`), - SPATIAL KEY `location_index` (`location`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 INSERT INTO shops (name, location) VALUES ('nezu-no-taiyaki', ST_GeomFromText('POINT(139.762573 35.720253)')); @@ -167,4 +158,10 @@ id name location_text 14 tetsuji POINT(139.76857 35.680911944444446) 19 daruma POINT(139.7705988888889 35.68146111111111) 26 kazuya POINT(139.760895 35.67350805555556) +EXPLAIN +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 select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE shops range location_index location_index 34 NULL 36 Using where; Using filesort 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_strict_sql_mode_bulk_insert_null.result similarity index 58% rename from storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null_57.result rename to storage/mroonga/mysql-test/mroonga/storage/r/geometry_strict_sql_mode_bulk_insert_null.result index 271cf922f..73573355c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null_57.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_strict_sql_mode_bulk_insert_null.result @@ -2,13 +2,8 @@ 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; +ERROR 23000: Column 'location' cannot be null 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_strict_sql_mode_contains.result b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_strict_sql_mode_contains.result new file mode 100644 index 000000000..2f432fc8e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_strict_sql_mode_contains.result @@ -0,0 +1,169 @@ +DROP TABLE IF EXISTS shops; +CREATE TABLE shops ( +id INT PRIMARY KEY AUTO_INCREMENT, +name TEXT, +location GEOMETRY NOT NULL, +SPATIAL KEY location_index (location) +); +INSERT INTO shops (name, location) +VALUES ('nezu-no-taiyaki', +ST_GeomFromText('POINT(139.762573 35.720253)')); +INSERT INTO shops (name, location) +VALUES ('taiyaki-kataoka', +ST_GeomFromText('POINT(139.715591 35.712521)')); +INSERT INTO shops (name, location) +VALUES ('soba-taiyaki-ku', +ST_GeomFromText('POINT(139.659088 35.683712)')); +INSERT INTO shops (name, location) +VALUES ('kuruma', +ST_GeomFromText('POINT(139.706207 35.721516)')); +INSERT INTO shops (name, location) +VALUES ('hirose-ya', +ST_GeomFromText('POINT(139.685608 35.714844)')); +INSERT INTO shops (name, location) +VALUES ('sazare', +ST_GeomFromText('POINT(139.685043 35.714653)')); +INSERT INTO shops (name, location) +VALUES ('omede-taiyaki', +ST_GeomFromText('POINT(139.817154 35.700516)')); +INSERT INTO shops (name, location) +VALUES ('onaga-ya', +ST_GeomFromText('POINT(139.81105 35.698254)')); +INSERT INTO shops (name, location) +VALUES ('shiro-ya', +ST_GeomFromText('POINT(139.638611 35.705517)')); +INSERT INTO shops (name, location) +VALUES ('fuji-ya', +ST_GeomFromText('POINT(139.637115 35.703938)')); +INSERT INTO shops (name, location) +VALUES ('miyoshi', +ST_GeomFromText('POINT(139.537323 35.644539)')); +INSERT INTO shops (name, location) +VALUES ('juju-ya', +ST_GeomFromText('POINT(139.695755 35.628922)')); +INSERT INTO shops (name, location) +VALUES ('tatsumi-ya', +ST_GeomFromText('POINT(139.638657 35.665501)')); +INSERT INTO shops (name, location) +VALUES ('tetsuji', +ST_GeomFromText('POINT(139.76857 35.680912)')); +INSERT INTO shops (name, location) +VALUES ('gazuma-ya', +ST_GeomFromText('POINT(139.647598 35.700817)')); +INSERT INTO shops (name, location) +VALUES ('honma-mon', +ST_GeomFromText('POINT(139.652573 35.722736)')); +INSERT INTO shops (name, location) +VALUES ('naniwa-ya', +ST_GeomFromText('POINT(139.796234 35.730061)')); +INSERT INTO shops (name, location) +VALUES ('kuro-dai', +ST_GeomFromText('POINT(139.704834 35.650345)')); +INSERT INTO shops (name, location) +VALUES ('daruma', +ST_GeomFromText('POINT(139.770599 35.681461)')); +INSERT INTO shops (name, location) +VALUES ('yanagi-ya', +ST_GeomFromText('POINT(139.783981 35.685341)')); +INSERT INTO shops (name, location) +VALUES ('sharaku', +ST_GeomFromText('POINT(139.794846 35.716969)')); +INSERT INTO shops (name, location) +VALUES ('takane', +ST_GeomFromText('POINT(139.560913 35.698601)')); +INSERT INTO shops (name, location) +VALUES ('chiyoda', +ST_GeomFromText('POINT(139.652817 35.642601)')); +INSERT INTO shops (name, location) +VALUES ('da-ka-po', +ST_GeomFromText('POINT(139.727356 35.627346)')); +INSERT INTO shops (name, location) +VALUES ('matsushima-ya', +ST_GeomFromText('POINT(139.737381 35.640556)')); +INSERT INTO shops (name, location) +VALUES ('kazuya', +ST_GeomFromText('POINT(139.760895 35.673508)')); +INSERT INTO shops (name, location) +VALUES ('furuya-kogane-an', +ST_GeomFromText('POINT(139.676071 35.680603)')); +INSERT INTO shops (name, location) +VALUES ('hachi-no-ie', +ST_GeomFromText('POINT(139.668106 35.608021)')); +INSERT INTO shops (name, location) +VALUES ('azuki-chan', +ST_GeomFromText('POINT(139.673203 35.64151)')); +INSERT INTO shops (name, location) +VALUES ('kuriko-an', +ST_GeomFromText('POINT(139.796829 35.712013)')); +INSERT INTO shops (name, location) +VALUES ('yume-no-aru-machi-no-taiyaki-ya-san', +ST_GeomFromText('POINT(139.712524 35.616199)')); +INSERT INTO shops (name, location) +VALUES ('naze-ya', +ST_GeomFromText('POINT(139.665833 35.609039)')); +INSERT INTO shops (name, location) +VALUES ('sanoki-ya', +ST_GeomFromText('POINT(139.770721 35.66592)')); +INSERT INTO shops (name, location) +VALUES ('shigeta', +ST_GeomFromText('POINT(139.780273 35.672626)')); +INSERT INTO shops (name, location) +VALUES ('nishimi-ya', +ST_GeomFromText('POINT(139.774628 35.671825)')); +INSERT INTO shops (name, location) +VALUES ('hiiragi', +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) +3 soba-taiyaki-ku POINT(139.65908805555557 35.68371194444445) +4 kuruma POINT(139.70620694444446 35.72151611111111) +5 hirose-ya POINT(139.68560805555555 35.71484388888889) +6 sazare POINT(139.68504305555555 35.71465305555556) +7 omede-taiyaki POINT(139.8171538888889 35.70051611111111) +8 onaga-ya POINT(139.81105 35.69825388888889) +9 shiro-ya POINT(139.63861111111112 35.70551694444445) +10 fuji-ya POINT(139.637115 35.703938055555554) +11 miyoshi POINT(139.53732305555556 35.644538888888896) +12 juju-ya POINT(139.69575500000002 35.62892194444445) +13 tatsumi-ya POINT(139.63865694444445 35.66550111111111) +14 tetsuji POINT(139.76857 35.680911944444446) +15 gazuma-ya POINT(139.64759805555553 35.70081694444444) +16 honma-mon POINT(139.65257305555556 35.72273611111111) +17 naniwa-ya POINT(139.79623388888888 35.73006111111111) +18 kuro-dai POINT(139.70483388888888 35.650345) +19 daruma POINT(139.7705988888889 35.68146111111111) +20 yanagi-ya POINT(139.78398111111113 35.685341111111114) +21 sharaku POINT(139.79484611111113 35.71696888888889) +22 takane POINT(139.56091305555555 35.69860111111112) +23 chiyoda POINT(139.65281694444442 35.64260111111111) +24 da-ka-po POINT(139.72735611111113 35.62734611111111) +25 matsushima-ya POINT(139.73738111111112 35.64055611111111) +26 kazuya POINT(139.760895 35.67350805555556) +27 furuya-kogane-an POINT(139.67607111111113 35.68060305555556) +28 hachi-no-ie POINT(139.66810611111111 35.608021111111114) +29 azuki-chan POINT(139.67320305555555 35.641510000000004) +30 kuriko-an POINT(139.79682888888888 35.71201305555556) +31 yume-no-aru-machi-no-taiyaki-ya-san POINT(139.71252388888888 35.61619888888889) +32 naze-ya POINT(139.66583305555557 35.60903888888889) +33 sanoki-ya POINT(139.7707211111111 35.66592) +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, 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) +19 daruma POINT(139.7705988888889 35.68146111111111) +26 kazuya POINT(139.760895 35.67350805555556) +EXPLAIN +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 select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE shops NULL range location_index location_index 34 NULL 36 100.00 Using where; Using filesort +Warnings: +Note 1003 /* select#1 */ select `test`.`shops`.`id` AS `id`,`test`.`shops`.`name` AS `name`,st_astext(`test`.`shops`.`location`) AS `location_text` from `test`.`shops` where mbrcontains((st_geometryfromtext('LineString(139.7727 35.6684, 139.7038 35.7121)')),`test`.`shops`.`location`) order by `test`.`shops`.`id` +DROP TABLE shops; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result index 508ee135e..b0bbaf09e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result @@ -1,28 +1,28 @@ -drop table if exists t1, t2, t3; -create table t1 (_id int, a int, primary key (_id) using hash); -insert into t1 values(null, 100); +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (_id int, a int, PRIMARY KEY (_id) USING HASH); +INSERT INTO t1 VALUES(null, 100); ERROR 23000: Column '_id' cannot be null -insert into t1 values(1,100); +INSERT INTO t1 VALUES(1,100); Warnings: Warning 1265 Data truncated for column '_id' at row 1 -insert into t1 values(1,100); +INSERT INTO t1 VALUES(1,100); Warnings: Warning 1265 Data truncated for column '_id' at row 1 -insert into t1 values(1,100); +INSERT INTO t1 VALUES(1,100); Warnings: Warning 1265 Data truncated for column '_id' at row 1 -insert into t1 values(1,100); +INSERT INTO t1 VALUES(1,100); Warnings: Warning 1265 Data truncated for column '_id' at row 1 -select * from t1; +SELECT * FROM t1; _id a 1 100 2 100 3 100 4 100 -select * from t1 where _id = 2; +SELECT * FROM t1 WHERE _id = 2; _id a 2 100 -select * from t1 where _id = 20; +SELECT * FROM t1 WHERE _id = 20; _id a -drop table t1; +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_strict_sql_mode_id_primary.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_strict_sql_mode_id_primary.result new file mode 100644 index 000000000..8fb46156f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_strict_sql_mode_id_primary.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (_id int, a int, PRIMARY KEY (_id) USING HASH); +INSERT INTO t1 VALUES(null, 100); +ERROR 23000: Column '_id' cannot be null +INSERT INTO t1 VALUES(1,100); +ERROR 01000: Data truncated for column '_id' at row 1 +INSERT INTO t1 VALUES(1,100); +ERROR 01000: Data truncated for column '_id' at row 1 +INSERT INTO t1 VALUES(1,100); +ERROR 01000: Data truncated for column '_id' at row 1 +INSERT INTO t1 VALUES(1,100); +ERROR 01000: Data truncated for column '_id' at row 1 +SELECT * FROM t1; +_id a +SELECT * FROM t1 WHERE _id = 2; +_id a +SELECT * FROM t1 WHERE _id = 20; +_id a +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_asc_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_asc_asc.result new file mode 100644 index 000000000..055ca69f8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_asc_asc.result @@ -0,0 +1,40 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +score3 INT, +INDEX (score1, score2, score3) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `score3` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `score1` (`score1`,`score2`,`score3`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, score3) VALUES(1, 10, -100); +INSERT INTO items (score1, score2, score3) VALUES(1, 10, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 10, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 100); +SELECT * +FROM items +WHERE score1 = 2 +ORDER BY score2 ASC, score3 ASC; +id score1 score2 score3 +3 2 10 100 +7 2 20 -100 +8 2 20 0 +9 2 20 100 +4 2 30 -100 +5 2 30 0 +6 2 30 100 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_desc_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_desc_desc.result new file mode 100644 index 000000000..0d7faddca --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_desc_desc.result @@ -0,0 +1,40 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +score3 INT, +INDEX (score1, score2, score3) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `score3` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `score1` (`score1`,`score2`,`score3`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, score3) VALUES(1, 10, -100); +INSERT INTO items (score1, score2, score3) VALUES(1, 10, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 10, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 100); +SELECT * +FROM items +WHERE score1 = 2 +ORDER BY score2 DESC, score3 DESC; +id score1 score2 score3 +6 2 30 100 +5 2 30 0 +4 2 30 -100 +9 2 20 100 +8 2 20 0 +7 2 20 -100 +3 2 10 100 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_strict_sql_mode_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_strict_sql_mode_update.result new file mode 100644 index 000000000..b390ca7a8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_strict_sql_mode_update.result @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS scores; +SET NAMES utf8; +CREATE TABLE scores ( +name char(30) NOT NULL, +score int NOT NULL, +PRIMARY KEY (name, score) +) DEFAULT CHARSET=utf8; +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES ("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 10); +SELECT * FROM scores; +name score +Jiro Yamada 27 +Taro Yamada -12 +Taro Yamada 10 +Taro Yamada 29 +UPDATE scores SET name = "Taro Yamada" + WHERE name = "Jiro Yamada" AND score = 27; +ERROR 01000: data truncated for primary key column: +SELECT * FROM scores +WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); +name score +Taro Yamada -12 +Taro Yamada 10 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result index 86b06bc94..a58a487a1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result @@ -1,32 +1,27 @@ -drop table if exists listing; -set names utf8; -create table scores ( -name char(30) not null, -score int not null, -primary key (name, score) -) default charset utf8; -show create table scores; -Table Create Table -scores CREATE TABLE `scores` ( - `name` char(30) NOT NULL, - `score` int(11) NOT NULL, - PRIMARY KEY (`name`,`score`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 -insert into scores (name, score) values("Taro Yamada", 29); -insert into scores (name, score) values("Taro Yamada", -12); -insert into scores (name, score) values("Jiro Yamada", 27); -insert into scores (name, score) values("Taro Yamada", 10); -select * from scores; +DROP TABLE IF EXISTS scores; +SET NAMES utf8; +CREATE TABLE scores ( +name char(30) NOT NULL, +score int NOT NULL, +PRIMARY KEY (name, score) +) DEFAULT CHARSET=utf8; +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES ("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 10); +SELECT * FROM scores; name score Jiro Yamada 27 Taro Yamada -12 Taro Yamada 10 Taro Yamada 29 -update scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27; +UPDATE scores SET name = "Taro Yamada" + WHERE name = "Jiro Yamada" AND score = 27; Warnings: Warning 1265 data truncated for primary key column: -select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); +SELECT * FROM scores +WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); name score Taro Yamada -12 Taro Yamada 10 -drop table scores; +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_greater_than.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_greater_than.result rename to storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_greater_than.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_greater_than_or_equal.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_greater_than_or_equal.result rename to storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_greater_than_or_equal.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_less_than.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_less_than.result rename to storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_less_than.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_less_than_or_equal.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_less_than_or_equal.result rename to storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_less_than_or_equal.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than.result new file mode 100644 index 000000000..8e5f4329a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than.result @@ -0,0 +1,34 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `score1` (`score1`,`created_at`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE score1 = 2 AND created_at > "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +8 2 0 2015-07-02 00:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.result new file mode 100644 index 000000000..1a3021e28 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `score1` (`score1`,`created_at`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE score1 = 2 AND created_at >= "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +8 2 0 2015-07-02 00:00:00 +5 2 0 2015-07-01 12:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than.result new file mode 100644 index 000000000..6adaa9870 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than.result @@ -0,0 +1,34 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `score1` (`score1`,`created_at`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE score1 = 2 AND created_at < "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +2 2 0 2015-07-01 00:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.result new file mode 100644 index 000000000..dfc7ef6fe --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `score1` (`score1`,`created_at`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE score1 = 2 AND created_at <= "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +5 2 0 2015-07-01 12:00:00 +2 2 0 2015-07-01 00:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than.result new file mode 100644 index 000000000..502c0c104 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `created_at` (`created_at`,`score1`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE created_at > "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +4 2 0 2015-07-02 00:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.result new file mode 100644 index 000000000..60ffa88b4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `created_at` (`created_at`,`score1`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE created_at >= "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +4 2 0 2015-07-02 00:00:00 +3 2 0 2015-07-01 12:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than.result new file mode 100644 index 000000000..2cdb3de3f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `created_at` (`created_at`,`score1`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE created_at < "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +2 2 0 2015-07-01 00:00:00 +1 1 0 2015-07-01 00:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.result new file mode 100644 index 000000000..3443bbc3e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.result @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `created_at` (`created_at`,`score1`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE created_at <= "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +3 2 0 2015-07-01 12:00:00 +2 2 0 2015-07-01 00:00:00 +1 1 0 2015-07-01 00:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_max.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_max.result new file mode 100644 index 000000000..b60917848 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_max.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS listing; +CREATE TABLE scores ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT NOT NULL, +score2 INT NOT NULL, +INDEX (score1, score2) +) DEFAULT CHARSET=UTF8; +INSERT INTO scores (score1, score2) VALUES(1, 1); +INSERT INTO scores (score1, score2) VALUES(1, 2); +INSERT INTO scores (score1, score2) VALUES(2, 3); +INSERT INTO scores (score1, score2) VALUES(2, 2); +INSERT INTO scores (score1, score2) VALUES(2, 1); +INSERT INTO scores (score1, score2) VALUES(2, 0); +INSERT INTO scores (score1, score2) VALUES(2, -1); +INSERT INTO scores (score1, score2) VALUES(2, -2); +INSERT INTO scores (score1, score2) VALUES(2, -3); +SELECT MAX(score2) FROM scores WHERE score1 = 2; +MAX(score2) +3 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_min.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_min.result new file mode 100644 index 000000000..0792751ad --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_min.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS listing; +CREATE TABLE scores ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT NOT NULL, +score2 INT NOT NULL, +INDEX (score1, score2) +) DEFAULT CHARSET=UTF8; +INSERT INTO scores (score1, score2) VALUES(1, 1); +INSERT INTO scores (score1, score2) VALUES(1, 2); +INSERT INTO scores (score1, score2) VALUES(2, 3); +INSERT INTO scores (score1, score2) VALUES(2, 2); +INSERT INTO scores (score1, score2) VALUES(2, 1); +INSERT INTO scores (score1, score2) VALUES(2, 0); +INSERT INTO scores (score1, score2) VALUES(2, -1); +INSERT INTO scores (score1, score2) VALUES(2, -2); +INSERT INTO scores (score1, score2) VALUES(2, -3); +SELECT MIN(score2) FROM scores WHERE score1 = 2; +MIN(score2) +-3 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_64bit_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_64bit_equal.result index 869ced05d..211685472 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_64bit_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_64bit_equal.result @@ -5,12 +5,12 @@ start DATE, end DATE, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (1, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-02", "9999-12-31"); INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-02"); SELECT * FROM ranges FORCE INDEX(range_key) -WHERE start = "1000-01-01" AND end = "9999-12-31"; +WHERE start = "1000-01-02" AND end = "9999-12-31"; id start end -2 1000-01-01 9999-12-31 +2 1000-01-02 9999-12-31 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_index_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_index_read.result index 8e480d484..93e34d88c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_index_read.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_index_read.result @@ -5,16 +5,16 @@ start DATE, end DATE, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (1, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-02", "9999-12-31"); INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-02"); SELECT start, end FROM ranges FORCE INDEX(range_key) ORDER BY start, end; start end -1000-01-01 2012-10-05 -1000-01-01 9999-12-31 +1000-01-02 2012-10-05 +1000-01-02 9999-12-31 2012-10-25 9999-12-31 -9999-12-31 1000-01-01 +9999-12-31 1000-01-02 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_asc.result index 92e7f51ff..c2a94a848 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_asc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_asc.result @@ -6,14 +6,14 @@ end DATE, UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); -INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-02"); +INSERT INTO ranges VALUES (4, "1000-01-02", "9999-12-31"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start, end; id start end -2 1000-01-01 2012-10-05 -4 1000-01-01 9999-12-31 +2 1000-01-02 2012-10-05 +4 1000-01-02 9999-12-31 1 2012-10-25 9999-12-31 -3 9999-12-31 1000-01-01 +3 9999-12-31 1000-01-02 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_desc.result index ddd694c38..2d1001560 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_desc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_desc.result @@ -6,14 +6,14 @@ end DATE, UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); -INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-02"); +INSERT INTO ranges VALUES (4, "1000-01-02", "9999-12-31"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start DESC, end DESC; id start end -3 9999-12-31 1000-01-01 +3 9999-12-31 1000-01-02 1 2012-10-25 9999-12-31 -4 1000-01-01 9999-12-31 -2 1000-01-01 2012-10-05 +4 1000-01-02 9999-12-31 +2 1000-01-02 2012-10-05 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_index_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_index_read.result index 1aa710882..a8546c4bc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_index_read.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_index_read.result @@ -5,16 +5,16 @@ start datetime, end datetime, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); -INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (1, "1000-01-02 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (2, "1000-01-02 00:00:00", "9999-12-31 23:59:59"); INSERT INTO ranges VALUES (3, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); -INSERT INTO ranges VALUES (4, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); +INSERT INTO ranges VALUES (4, "9999-12-31 23:59:59", "1000-01-02 00:00:00"); SELECT start, end FROM ranges FORCE INDEX(range_key) ORDER BY start, end; start end -1000-01-01 00:00:00 2012-10-05 16:18:29 -1000-01-01 00:00:00 9999-12-31 23:59:59 +1000-01-02 00:00:00 2012-10-05 16:18:29 +1000-01-02 00:00:00 9999-12-31 23:59:59 2012-10-25 16:18:29 9999-12-31 23:59:59 -9999-12-31 23:59:59 1000-01-01 00:00:00 +9999-12-31 23:59:59 1000-01-02 00:00:00 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_asc.result index d18f18589..5cffb71d6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_asc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_asc.result @@ -6,14 +6,14 @@ end datetime, UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); -INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); -INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); -INSERT INTO ranges VALUES (4, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (2, "1000-01-02 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-02 00:00:00"); +INSERT INTO ranges VALUES (4, "1000-01-02 00:00:00", "9999-12-31 23:59:59"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start, end; id start end -2 1000-01-01 00:00:00 2012-10-05 16:18:29 -4 1000-01-01 00:00:00 9999-12-31 23:59:59 +2 1000-01-02 00:00:00 2012-10-05 16:18:29 +4 1000-01-02 00:00:00 9999-12-31 23:59:59 1 2012-10-25 16:18:29 9999-12-31 23:59:59 -3 9999-12-31 23:59:59 1000-01-01 00:00:00 +3 9999-12-31 23:59:59 1000-01-02 00:00:00 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_desc.result index c159aeab4..4429f787b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_desc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_desc.result @@ -6,14 +6,14 @@ end datetime, UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); -INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); -INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); -INSERT INTO ranges VALUES (4, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (2, "1000-01-02 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-02 00:00:00"); +INSERT INTO ranges VALUES (4, "1000-01-02 00:00:00", "9999-12-31 23:59:59"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start DESC, end DESC; id start end -3 9999-12-31 23:59:59 1000-01-01 00:00:00 +3 9999-12-31 23:59:59 1000-01-02 00:00:00 1 2012-10-25 16:18:29 9999-12-31 23:59:59 -4 1000-01-01 00:00:00 9999-12-31 23:59:59 -2 1000-01-01 00:00:00 2012-10-05 16:18:29 +4 1000-01-02 00:00:00 9999-12-31 23:59:59 +2 1000-01-02 00:00:00 2012-10-05 16:18:29 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result index d833fb440..92e95d927 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result @@ -1,8 +1,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, -start timestamp, -end timestamp, +start timestamp DEFAULT '2016-04-21 00:00:00', +end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "1970-01-01 12:00:00", "2012-10-05 16:18:29"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result index 1e4ee102c..35bc4123d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result @@ -1,8 +1,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, -start timestamp, -end timestamp, +start timestamp DEFAULT '2016-04-21 00:00:00', +end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result index 23a552232..fbf88cf3d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result @@ -1,8 +1,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, -start timestamp, -end timestamp, +start timestamp DEFAULT '2016-04-21 00:00:00', +end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result index 3f3277f5e..b799cc278 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result @@ -1,8 +1,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, -start timestamp, -end timestamp, +start timestamp DEFAULT '2016-04-21 00:00:00', +end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2010-01-01 00:00:00", "2012-10-05 23:59:59"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_date.result index a460c7d99..b1eafd2d0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_date.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_date.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( day DATE PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `day` date NOT NULL, - `title` text, - PRIMARY KEY (`day`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (day, title) VALUES ("2012-01-29", "clear day"); INSERT INTO diaries (day, title) VALUES ("2012-01-30", "rainy day"); INSERT INTO diaries (day, title) VALUES ("2012-01-31", "cloudy day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_with_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_with_fractional_seconds.result index ffbbfe3f4..0ae41c513 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_with_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_with_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( day DATETIME(6) PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `day` datetime(6) NOT NULL, - `title` text, - PRIMARY KEY (`day`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (day, title) VALUES ("2012-01-29 21:51:01.111111", "clear day"); INSERT INTO diaries (day, title) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_without_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_without_fractional_seconds.result index 76c529f7f..f5e743dc9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_without_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_without_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( day DATETIME PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `day` datetime NOT NULL, - `title` text, - PRIMARY KEY (`day`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (day, title) VALUES ("2012-01-29 21:51:01", "clear day"); INSERT INTO diaries (day, title) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_with_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_with_fractional_seconds.result index 9b1e8e7d7..6a529b506 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_with_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_with_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE releases ( version DECIMAL(6, 3) PRIMARY KEY, message TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE releases; -Table Create Table -releases CREATE TABLE `releases` ( - `version` decimal(6,3) NOT NULL, - `message` text, - PRIMARY KEY (`version`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO releases (version, message) VALUES (10.000, "10th release!"); INSERT INTO releases (version, message) VALUES (10.001, "minor fix."); INSERT INTO releases (version, message) VALUES (999.999, "the last release!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_without_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_without_fractional_seconds.result index 0624ab2f2..d36688bb1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_without_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_without_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE releases ( version DECIMAL PRIMARY KEY, message TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE releases; -Table Create Table -releases CREATE TABLE `releases` ( - `version` decimal(10,0) NOT NULL, - `message` text, - PRIMARY KEY (`version`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO releases (version, message) VALUES (1, "the first release!!!"); INSERT INTO releases (version, message) VALUES (10, "10th release!"); INSERT INTO releases (version, message) VALUES (999, "the last release!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_with_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_with_fractional_seconds.result index 639114875..5437c7897 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_with_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_with_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE running_records ( time TIME(6) PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; -Table Create Table -running_records CREATE TABLE `running_records` ( - `time` time(6) NOT NULL, - `title` text, - PRIMARY KEY (`time`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO running_records (time, title) VALUES ("01:00:00.000001", "normal condition"); INSERT INTO running_records (time, title) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_without_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_without_fractional_seconds.result index 6a89cdc33..e59dee4c6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_without_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_without_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE running_records ( time TIME PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; -Table Create Table -running_records CREATE TABLE `running_records` ( - `time` time NOT NULL, - `title` text, - PRIMARY KEY (`time`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO running_records (time, title) VALUES ("01:00:00", "normal condition"); INSERT INTO running_records (time, title) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_with_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_with_fractional_seconds.result index 7040cc22b..0fba3da75 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_with_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_with_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( time TIMESTAMP(6) PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), - `title` text, - PRIMARY KEY (`time`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (time, title) VALUES ("2012-01-29 21:51:01.111111", "clear day"); INSERT INTO diaries (time, title) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_without_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_without_fractional_seconds.result index 38017f6f8..8116bda2d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_without_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_without_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( time TIMESTAMP PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `title` text, - PRIMARY KEY (`time`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (time, title) VALUES ("2012-01-29 21:51:01", "clear day"); INSERT INTO diaries (time, title) VALUES ("2012-01-30 01:23:45", "rainy day"); INSERT INTO diaries (time, title) VALUES ("2012-01-31 08:32:10", "cloudy day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_year.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_year.result index af9b3a2db..78c56f258 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_year.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_year.result @@ -3,13 +3,6 @@ CREATE TABLE aniversary_memos ( party_year YEAR PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE aniversary_memos; -Table Create Table -aniversary_memos CREATE TABLE `aniversary_memos` ( - `party_year` year(4) NOT NULL, - `title` text, - PRIMARY KEY (`party_year`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO aniversary_memos (party_year, title) VALUES ("11", "We need a big cake!"); INSERT INTO aniversary_memos (party_year, title) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_delete_all.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_delete_all.result new file mode 100644 index 000000000..f2a0b28b0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_delete_all.result @@ -0,0 +1,14 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id int, +UNIQUE KEY (id) +); +INSERT INTO ids VALUES (1); +DELETE FROM ids; +INSERT INTO ids VALUES (1); +SELECT * FROM ids; +id +1 +INSERT INTO ids VALUES (1); +ERROR 23000: Duplicate entry '1' for key 'id' +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_data_length.result b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_data_length.result index d58afb1f6..3600c9208 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_data_length.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_data_length.result @@ -6,15 +6,6 @@ title VARCHAR(255), content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/insert_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/insert_TODO_SPLIT_ME.result index 00466f19b..f8d41bb78 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/insert_TODO_SPLIT_ME.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/insert_TODO_SPLIT_ME.result @@ -65,18 +65,6 @@ select * from t1; c1 2010-03-26 11:22:33 drop table t1; -create table t1 (c1 int, _id int); -set sql_mode=""; -insert into t1 (c1,_id) values (1,1); -Warnings: -Warning 1265 Data truncated for column '_id' at row 1 -set sql_mode="strict_all_tables"; -insert into t1 (c1,_id) values (4,1); -ERROR 01000: Data truncated for column '_id' at row 1 -select * from t1; -c1 _id -1 1 -drop table t1; create table t1 (c1 int primary key, c2 int); insert into t1 values(1,100); select * from t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_primary_key.result index 12d4b173e..94421a5c2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_primary_key.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_primary_key.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( day DATE PRIMARY KEY, title TEXT ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `day` date NOT NULL, - `title` text, - PRIMARY KEY (`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)"; 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 fbec44527..1ef6f1f2c 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 @@ -5,15 +5,6 @@ day DATE, title TEXT, UNIQUE KEY day (day) ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `day` date DEFAULT NULL, - `title` text, - PRIMARY KEY (`id`), - UNIQUE KEY `day` (`day`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (day, title) VALUES ("2012-02-14", "clear day1") ON DUPLICATE KEY UPDATE title = "clear day1 (duplicated)"; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/insert_virtual_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/insert_virtual_column.result new file mode 100644 index 000000000..624ac00d3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/insert_virtual_column.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 int, _id int); +SET sql_mode=""; +INSERT INTO t1 (c1,_id) VALUES (1,1); +Warnings: +Warning 1265 Data truncated for column '_id' at row 1 +SET sql_mode="STRICT_ALL_TABLES"; +INSERT INTO t1 (c1,_id) VALUES (4,1); +ERROR 01000: Data truncated for column '_id' at row 1 +SELECT * FROM t1; +c1 _id +1 1 +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_TODO_SPLIT_ME.result deleted file mode 100644 index b66801094..000000000 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_TODO_SPLIT_ME.result +++ /dev/null @@ -1,106 +0,0 @@ -drop table if exists t1, t2, t3; -flush status; -create table t1 (c1 int primary key, c2 int, c3 text, key idx1(c2), fulltext index ft(c3)); -insert into t1 values(1,10,"aa ii uu ee oo"); -insert into t1 values(2,20,"ka ki ku ke ko"); -insert into t1 values(3,30,"sa si su se so"); -insert into t1 values(4,40,"ta ti tu te to"); -insert into t1 values(5,50,"aa ii uu ee oo"); -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 0 -select * from t1; -c1 c2 c3 -1 10 aa ii uu ee oo -2 20 ka ki ku ke ko -3 30 sa si su se so -4 40 ta ti tu te to -5 50 aa ii uu ee oo -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 0 -select count(*) from t1; -count(*) -5 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 0 -select * from t1 force index(primary) where c1 between 2 and 4; -c1 c2 c3 -2 20 ka ki ku ke ko -3 30 sa si su se so -4 40 ta ti tu te to -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 0 -select count(*) from t1 force index(primary) where c1 between 2 and 4; -count(*) -3 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 1 -select c1 from t1 force index(primary) where c1 < 3; -c1 -1 -2 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 1 -select count(c1) from t1 force index(primary) where c1 < 3; -count(c1) -2 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 1 -select 1 from t1 force index(primary) where c1 > 3; -1 -1 -1 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 1 -select count(1) from t1 force index(primary) where c1 > 3; -count(1) -2 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 2 -select * from t1 where match(c3) against("su"); -c1 c2 c3 -3 30 sa si su se so -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 2 -select count(*) from t1 where match(c3) against("su"); -count(*) -1 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 3 -select * from t1 where match(c3) against("+su" in boolean mode); -c1 c2 c3 -3 30 sa si su se so -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 3 -select count(*) from t1 where match(c3) against("+su" in boolean mode); -count(*) -1 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 4 -select * from t1 force index(idx1) where c2 between 20 and 40; -c1 c2 c3 -2 20 ka ki ku ke ko -3 30 sa si su se so -4 40 ta ti tu te to -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 4 -select count(*) from t1 force index(idx1) where c2 between 20 and 40; -count(*) -3 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 5 -drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_disabled.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_disabled.result index 9971d21e3..8d29e0425 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_disabled.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_disabled.result @@ -7,14 +7,6 @@ title VARCHAR(255), content TEXT, FULLTEXT INDEX(content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_and.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_and.result new file mode 100644 index 000000000..26ca6de7b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_and.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT, +age INT, +INDEX (id, age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id, age) VALUES (1, 28); +INSERT INTO users (id, age) VALUES (1, 28); +INSERT INTO users (id, age) VALUES (1, 29); +INSERT INTO users (id, age) VALUES (2, 29); +INSERT INTO users (id, age) VALUES (2, 29); +INSERT INTO users (id, age) VALUES (3, 29); +SELECT COUNT(*) FROM users WHERE id = 2 AND age = 29; +COUNT(*) +2 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_between.result new file mode 100644 index 000000000..9af4a4fed --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_between.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); +SELECT COUNT(*) FROM users WHERE age BETWEEN 28 AND 30; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_equal.result new file mode 100644 index 000000000..2bbcfe754 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_equal.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); +SELECT COUNT(*) FROM users WHERE age = 29; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_boolean_mode.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_boolean_mode.result new file mode 100644 index 000000000..6ec4d774b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_boolean_mode.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; +INSERT INTO memos (content) VALUES ('Groonga is good.'); +INSERT INTO memos (content) VALUES ('Groonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga is good.'); +INSERT INTO memos (content) VALUES ('Mroonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga uses Groonga.'); +SELECT COUNT(*) FROM memos +WHERE MATCH(content) AGAINST('+Groonga' IN BOOLEAN MODE); +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_natural_language_mode.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_natural_language_mode.result new file mode 100644 index 000000000..36a195895 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_natural_language_mode.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; +INSERT INTO memos (content) VALUES ('Groonga is good.'); +INSERT INTO memos (content) VALUES ('Groonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga is good.'); +INSERT INTO memos (content) VALUES ('Mroonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga uses Groonga.'); +SELECT COUNT(*) FROM memos +WHERE MATCH(content) AGAINST('Groonga'); +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater.result new file mode 100644 index 000000000..d5c033083 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); +SELECT COUNT(*) FROM users WHERE age > 29; +COUNT(*) +2 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater_equal.result new file mode 100644 index 000000000..59b812d14 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater_equal.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); +SELECT COUNT(*) FROM users WHERE age >= 29; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less.result new file mode 100644 index 000000000..b5e4fc1c3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); +SELECT COUNT(*) FROM users WHERE age < 29; +COUNT(*) +2 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less_equal.result new file mode 100644 index 000000000..f062fe009 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less_equal.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); +SELECT COUNT(*) FROM users WHERE age <= 29; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; 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 new file mode 100644 index 000000000..a1a123e7d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); +SELECT COUNT(*) FROM users WHERE age <> 29; +COUNT(*) +2 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 2 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_multiple_conditions.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_multiple_conditions.result new file mode 100644 index 000000000..39a0f0bd7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_multiple_conditions.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT, +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id, age) VALUES (1, 29); +INSERT INTO users (id, age) VALUES (2, 29); +INSERT INTO users (id, age) VALUES (3, 29); +SELECT COUNT(*) FROM users WHERE id = 3 AND age = 29; +COUNT(*) +1 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_between.result new file mode 100644 index 000000000..68a0575ab --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_between.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id BETWEEN 2 AND 4; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_equal.result new file mode 100644 index 000000000..713a19dd1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_equal.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id = 3; +COUNT(*) +1 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater.result new file mode 100644 index 000000000..3ae04a024 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id > 3; +COUNT(*) +2 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater_equal.result new file mode 100644 index 000000000..0f0643110 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater_equal.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id >= 3; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less.result new file mode 100644 index 000000000..05afd7e8d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id < 3; +COUNT(*) +2 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less_equal.result new file mode 100644 index 000000000..200f89d3e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less_equal.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id <= 3; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_not_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_not_equal.result new file mode 100644 index 000000000..64761c956 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_not_equal.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id <> 3; +COUNT(*) +4 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_disabled.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_disabled.result index da15588cc..dcf0f3eec 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_disabled.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_disabled.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_multiple_match_againsts.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_multiple_match_againsts.result new file mode 100644 index 000000000..124a7750f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_multiple_match_againsts.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT UNSIGNED NOT NULL, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(title), +FULLTEXT INDEX(content) +) DEFAULT CHARSET UTF8; +INSERT INTO memos VALUES(5, "title 1", "content a"); +INSERT INTO memos VALUES(12, "title 1", "content a"); +INSERT INTO memos VALUES(10, "title 1", "content a"); +INSERT INTO memos VALUES(4, "title 2", "content b"); +INSERT INTO memos VALUES(6, "title 2", "content b"); +INSERT INTO memos VALUES(1, "title 2", "content b"); +INSERT INTO memos VALUES(11, "title 1-a", "content a-1"); +INSERT INTO memos VALUES(3, "title 2-b", "content a-2"); +INSERT INTO memos VALUES(2, "title 2-c", "content a-3"); +INSERT INTO memos VALUES(8, "title 1-a", "content b-1"); +INSERT INTO memos VALUES(9, "title 2-b", "content b-2"); +INSERT INTO memos VALUES(7, "title 2-c", "content b-3"); +SELECT * FROM memos +WHERE MATCH(title) AGAINST("+1" IN BOOLEAN MODE) AND +MATCH(content) AGAINST("+a" IN BOOLEAN MODE) +ORDER BY id +LIMIT 1,3; +id title content +10 title 1 content a +11 title 1-a content a-1 +12 title 1 content a +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 0 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_no_limit.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_no_limit.result index 0794b104a..5a0ea86cc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_no_limit.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_no_limit.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_cp932.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_cp932.result new file mode 100644 index 000000000..d58c3cf22 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_cp932.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES CP932; +CREATE TABLE memos ( +ޝ•ÊŽq INT UNSIGNED, +“à—e TEXT, +FULLTEXT INDEX(“à—e), +KEY(ޝ•ÊŽq) +) DEFAULT CHARSET CP932; +INSERT INTO memos VALUES(2, "–¾“ú‚ÍŽR“o‚èB"); +INSERT INTO memos VALUES(3, "¡“ú‚̓Tƒ{ƒeƒ“‚ð‚à‚ç‚Á‚½B"); +INSERT INTO memos VALUES(1, "¡“ú‚Í“V‹C‚ª‚æ‚­‚Ă悩‚Á‚½B"); +SELECT * FROM memos +WHERE MATCH(“à—e) AGAINST("¡“ú" IN BOOLEAN MODE) +ORDER BY ޝ•ÊŽq +LIMIT 1; +ޝ•ÊŽq “à—e +1 ¡“ú‚Í“V‹C‚ª‚æ‚­‚Ă悩‚Á‚½B +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/storage/r/optimization_order_limit_optimized_datetime_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between.result index bd34b040a..f1cc14b49 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between_over.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between_over.result index f495a3b59..0374f5003 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between_over.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between_over.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_equal.result index b5be75069..4bc3f9d5c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_equal.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:34", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:34", "Tomorrow will be fine."); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:34", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than.result index 6f20f3b8b..566297778 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than_or_equal.result index 5df3c12cc..b03fe20f3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than_or_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than_or_equal.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than.result index c12e69bf6..c25f2a56e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than_or_equal.result index 6d00bac66..ef93bf8b8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than_or_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than_or_equal.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_name.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_name.result new file mode 100644 index 000000000..f20089f00 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_name.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES utf8; +CREATE TABLE memos ( +id int PRIMARY KEY, +tag ENUM('Groonga', 'Mroonga'), +content TEXT, +FULLTEXT INDEX(content), +KEY(tag), +KEY(id) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES(1, 'Groonga', 'Groonga is great!'); +INSERT INTO memos VALUES(2, 'Mroonga', 'Mroonga is great!'); +INSERT INTO memos VALUES(3, 'Mroonga', 'Mroonga is a MySQL storage engine.'); +INSERT INTO memos VALUES(4, 'Mroonga', 'Mroonga is based on Groonga.'); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("+Groonga" IN BOOLEAN MODE) AND +tag = 'Mroonga' + ORDER BY id LIMIT 1; +id tag content +4 Mroonga Mroonga is based on Groonga. +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/storage/r/optimization_order_limit_optimized_enum_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_value.result new file mode 100644 index 000000000..88ec9dd81 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_value.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES utf8; +CREATE TABLE memos ( +id int PRIMARY KEY, +tag ENUM('Groonga', 'Mroonga'), +content TEXT, +FULLTEXT INDEX(content), +KEY(tag), +KEY(id) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES(1, 'Groonga', 'Groonga is great!'); +INSERT INTO memos VALUES(2, 'Mroonga', 'Mroonga is great!'); +INSERT INTO memos VALUES(3, 'Mroonga', 'Mroonga is a MySQL storage engine.'); +INSERT INTO memos VALUES(4, 'Mroonga', 'Mroonga is based on Groonga.'); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("+Groonga" IN BOOLEAN MODE) AND +tag = 2 +ORDER BY id LIMIT 1; +id tag content +4 Mroonga Mroonga is based on Groonga. +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/storage/r/optimization_order_limit_optimized_have_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_have_primary_key.result index 529f0d521..5c18e22d1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_have_primary_key.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_have_primary_key.result @@ -11,19 +11,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_equal.result index 2320b0ffb..634fe89cd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_equal.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than.result index c367aef80..22305c704 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than_or_equal.result index b00a4e2a2..439f453d1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than_or_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than_or_equal.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than.result index 5bf6bca49..51ec2fde5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than_or_equal.result index 5d6a19a93..3c4f3973f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than_or_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than_or_equal.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_primary_key.result index 6ee2991e5..03364eb10 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_primary_key.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_primary_key.result @@ -11,18 +11,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_asc.result index e91e8af53..a284f4dd2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_asc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_asc.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_desc.result index da01145e4..270d26396 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_desc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_desc.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_id.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_id.result index bb541c014..eb19384eb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_id.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_id.result @@ -13,20 +13,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `_id` int(11) DEFAULT NULL, - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(NULL, 1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(NULL, 2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(NULL, 3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_match_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_match_against.result index fb9393687..80bd895a6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_match_against.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_match_against.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_select_match_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_select_match_against.result index 75ad884a2..b3ed4bf6b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_select_match_against.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_select_match_against.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between.result index bb4ac9c3b..793423f5b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between_over.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between_over.result index 1b4d38e01..f50417d1f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between_over.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between_over.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_equal.result index 4fff9f918..26da35005 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_equal.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:34", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:34", "Tomorrow will be fine."); INSERT INTO memos VALUES(3, "1:23:34", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than.result index 61119b2b7..342947cc7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!" ); INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than_or_equal.result index 9bf8b91ea..adc4ec631 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than_or_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than_or_equal.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!" ); INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than.result index e4d41f586..2881cc772 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than_or_equal.result index 31a497ef8..d1a9fc278 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than_or_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than_or_equal.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_with_index.result index 46c80ddcc..bff0d993e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_with_index.result @@ -13,20 +13,6 @@ KEY(title), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `title` (`title`), - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_without_index.result index 38263c108..cc3173ecf 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_without_index.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); 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 index 0812fc108..24d427ed2 100644 --- 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 @@ -6,15 +6,6 @@ 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."); @@ -23,7 +14,7 @@ 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) +ERROR HY000: system call error: No such file or directory: failed to open path: REPAIR TABLE diaries; Table Op Msg_type Msg_text repair_test.diaries repair status OK diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/replace_text.result b/storage/mroonga/mysql-test/mroonga/storage/r/replace_text.result index f2cf9667a..c70ce3374 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/replace_text.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/replace_text.result @@ -5,14 +5,6 @@ id int primary key, content text, fulltext index (content) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/replace_varchar.result b/storage/mroonga/mysql-test/mroonga/storage/r/replace_varchar.result index 090ea9b84..fd2cb655e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/replace_varchar.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/replace_varchar.result @@ -5,14 +5,6 @@ id int primary key, content varchar(256), fulltext index (content) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `content` varchar(256) DEFAULT NULL, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_with_index.result index 400156cec..a111880a9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_with_index.result @@ -8,8 +8,8 @@ KEY (age) INSERT INTO users VALUES ("Alice", 20); INSERT INTO users VALUES ("Bob", 20); INSERT INTO users VALUES ("Charry", 29); -SELECT *, COUNT(*) FROM users GROUP BY age; -name age COUNT(*) -Alice 20 2 -Charry 29 1 +SELECT age, COUNT(*) FROM users GROUP BY age; +age COUNT(*) +20 2 +29 1 DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_without_index.result index 04f63d0e7..93d29c2d4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_without_index.result @@ -7,11 +7,8 @@ age int INSERT INTO users VALUES ("Alice", 20); INSERT INTO users VALUES ("Bob", 20); INSERT INTO users VALUES ("Charry", 29); -EXPLAIN SELECT *, COUNT(*) FROM users GROUP BY age; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE users ALL NULL NULL NULL NULL 3 Using temporary; Using filesort -SELECT *, COUNT(*) FROM users GROUP BY age; -name age COUNT(*) -Alice 20 2 -Charry 29 1 +SELECT age, COUNT(*) FROM users GROUP BY age; +age COUNT(*) +20 2 +29 1 DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/sub_query_fulltext.result b/storage/mroonga/mysql-test/mroonga/storage/r/sub_query_fulltext.result index 4f24d0d74..87c9f4ef2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/sub_query_fulltext.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/sub_query_fulltext.result @@ -9,15 +9,6 @@ user_id INT UNSIGNED NOT NULL, title TEXT, FULLTEXT INDEX (title) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL, - `title` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO users (name) VALUES ("alice"); INSERT INTO users (name) VALUES ("bob"); INSERT INTO users (name) VALUES ("carlos"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/temporary_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/temporary_table.result index f6c036bbf..0a18d8173 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/temporary_table.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/temporary_table.result @@ -3,13 +3,6 @@ CREATE TEMPORARY TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TEMPORARY TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title) VALUES ("clear day"); INSERT INTO diaries (title) VALUES ("rainy day"); INSERT INTO diaries (title) VALUES ("cloudy day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/truncate.result b/storage/mroonga/mysql-test/mroonga/storage/r/truncate.result index 104d1d515..3525e2354 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/truncate.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/truncate.result @@ -10,19 +10,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/update_binlog_row.result b/storage/mroonga/mysql-test/mroonga/storage/r/update_binlog_row.result new file mode 100644 index 000000000..72a913b40 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/update_binlog_row.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS memos; +SET SESSION binlog_format = 'ROW'; +CREATE TABLE memos ( +title varchar(20) PRIMARY KEY, +content varchar(140) NOT NULL +) COLLATE=utf8mb4_general_ci +DEFAULT CHARSET=utf8mb4; +INSERT INTO memos (title, content) VALUES ('Mroonga', 'Mroonga is great!'); +SELECT * FROM memos; +title content +Mroonga Mroonga is great! +UPDATE memos SET content = 'Mroonga is very great!' WHERE title = 'Mroonga'; +SELECT * FROM memos; +title content +Mroonga Mroonga is very great! +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/update_virtual_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/update_virtual_column.result index 11e6ee219..e823e128c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/update_virtual_column.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/update_virtual_column.result @@ -1,28 +1,29 @@ -drop table if exists t1, t2, t3; -create table t1 (c1 int, _id int); -insert into t1 values(1,null); -insert into t1 values(2,null); -insert into t1 values(3,null); -select * from t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 int, _id int); +INSERT INTO t1 VALUES(1,null); +INSERT INTO t1 VALUES(2,null); +INSERT INTO t1 VALUES(3,null); +SELECT * FROM t1; c1 _id 1 1 2 2 3 3 -set sql_mode=""; -update t1 set _id = 10 where c1 = 1; +SET sql_mode=""; +UPDATE t1 SET _id = 10 WHERE c1 = 1; Warnings: Warning 1265 Data truncated for column '_id' at row 1 -select * from t1; +SELECT * FROM t1; c1 _id 1 1 2 2 3 3 -set sql_mode="strict_all_tables"; -update t1 set _id = 11 where c1 = 1; +SET sql_mode="STRICT_ALL_TABLES"; +UPDATE t1 SET _id = 11 WHERE c1 = 1; ERROR 01000: Data truncated for column '_id' at row 1 -select * from t1; +SELECT * FROM t1; c1 _id 1 1 2 2 3 3 -drop table t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_new_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_new_value.result new file mode 100644 index 000000000..1f457eb5e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_new_value.result @@ -0,0 +1,6 @@ +SET @mroonga_default_tokenizer_backup = @@mroonga_default_tokenizer; +SET GLOBAL mroonga_default_tokenizer = "TokenBigramSplitAlpha"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_default_tokenizer'; +Variable_name Value +mroonga_default_tokenizer TokenBigramSplitAlpha +SET GLOBAL mroonga_default_tokenizer = @mroonga_default_tokenizer_backup; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_same_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_same_value.result new file mode 100644 index 000000000..9ad80e9a8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_same_value.result @@ -0,0 +1,4 @@ +SET GLOBAL mroonga_default_tokenizer = "TokenBigram"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_default_tokenizer'; +Variable_name Value +mroonga_default_tokenizer TokenBigram diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_delete.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_delete.result index 6e690f45e..4238cb632 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_delete.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_delete.result @@ -4,14 +4,6 @@ id int primary key auto_increment, 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, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries (body) values ("will start groonga!"); select * from diaries; id body diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_insert.result index 8de55efac..429398f6b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_insert.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_insert.result @@ -4,14 +4,6 @@ id int primary key auto_increment, 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, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries (body) values ("will start groonga!"); select * from diaries; id body diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_update.result index dd3ee5b33..9cd6f5c9b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_update.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_update.result @@ -4,14 +4,6 @@ id int primary key auto_increment, 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, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries (body) values ("will start groonga!"); set mroonga_dry_write=true; update diaries set body = "starting groonga..." where id = 1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_enable_operations_recording_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_enable_operations_recording_insert.result new file mode 100644 index 000000000..5a19ab6fb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_enable_operations_recording_insert.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +title TEXT +) DEFAULT CHARSET=utf8; +SELECT mroonga_command('truncate mroonga_operations'); +mroonga_command('truncate mroonga_operations') +true +INSERT INTO diaries VALUES("Unlogged: Research for Mroonga"); +SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +mroonga_command('load --table mroonga_operations --values "[{}]"') +1 +SELECT mroonga_command('select mroonga_operations --output_columns _id'); +mroonga_command('select mroonga_operations --output_columns _id') +[[[1],[["_id","UInt32"]],[2]]] +SET GLOBAL mroonga_enable_operations_recording = false; +FLUSH TABLES; +SELECT mroonga_command('truncate mroonga_operations'); +mroonga_command('truncate mroonga_operations') +true +INSERT INTO diaries VALUES("Logged: Research for Mroonga"); +SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +mroonga_command('load --table mroonga_operations --values "[{}]"') +1 +SELECT mroonga_command('select mroonga_operations --output_columns _id'); +mroonga_command('select mroonga_operations --output_columns _id') +[[[1],[["_id","UInt32"]],[1]]] +DROP TABLE diaries; +SELECT mroonga_command('truncate mroonga_operations'); +mroonga_command('truncate mroonga_operations') +true +SET GLOBAL mroonga_enable_operations_recording = default; +FLUSH TABLES; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_global.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_global.result index 04b22c22e..19abff382 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_global.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_global.result @@ -4,30 +4,21 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, -FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `tags` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 -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); +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); +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); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+gr" IN BOOLEAN MODE); id title tags SET mroonga_match_escalation_threshold = 0; -SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+gr" IN BOOLEAN MODE); id title tags -1 Hello groonga! groonga install +1 Hello Groonga! groonga install DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_session.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_session.result index 25a1aba61..30e9262b5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_session.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_session.result @@ -3,17 +3,8 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, -FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `tags` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 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); 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/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.result similarity index 65% rename from storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.result rename to storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.result index 0181fe02d..ff574f7bc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.result @@ -14,7 +14,9 @@ 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 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE ids NULL range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using index +Warnings: +Note 1003 /* select#1 */ select `test`.`ids`.`id` AS `id` from `test`.`ids` where (`test`.`ids`.`id` > 5) 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_mysql_5_7_or_later_not_found_in_limit.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_not_found_in_limit.result new file mode 100644 index 000000000..5ecf89694 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_not_found_in_limit.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id INT, +INDEX (id) +) DEFAULT CHARSET=UTF8; +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); +DELETE FROM ids WHERE id < 2; +SET mroonga_max_n_records_for_estimate = 1; +EXPLAIN SELECT * FROM ids WHERE id > 0; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE ids NULL range id id 5 NULL 1 100.00 Using where; Using index +Warnings: +Note 1003 /* select#1 */ select `test`.`ids`.`id` AS `id` from `test`.`ids` where (`test`.`ids`.`id` > 0) +SET 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_mysql_5_7_or_later_session.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.result new file mode 100644 index 000000000..b28eac5a2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.result @@ -0,0 +1,22 @@ +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 partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE ids NULL range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using index +Warnings: +Note 1003 /* select#1 */ select `test`.`ids`.`id` AS `id` from `test`.`ids` where (`test`.`ids`.`id` > 5) +SET 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_not_found_in_limit.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_not_found_in_limit.result new file mode 100644 index 000000000..e2d8a8de4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_not_found_in_limit.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id INT, +INDEX (id) +) DEFAULT CHARSET=UTF8; +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); +DELETE FROM ids WHERE id < 2; +SET mroonga_max_n_records_for_estimate = 1; +EXPLAIN SELECT * FROM ids WHERE id > 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE ids range id id 5 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_query_log_file_disabled_empty_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_empty_value.result new file mode 100644 index 000000000..3d7f36d18 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_empty_value.result @@ -0,0 +1,9 @@ +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; +SET GLOBAL mroonga_query_log_file = ""; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +Variable_name Value +mroonga_query_log_file +log file is changed: -> +query log file is still disabled +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_null_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_null_value.result new file mode 100644 index 000000000..aed9d91a9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_null_value.result @@ -0,0 +1,9 @@ +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; +SET GLOBAL mroonga_query_log_file = NULL; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +Variable_name Value +mroonga_query_log_file +log file is changed: -> +query log file is still disabled +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_empty_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_empty_value.result new file mode 100644 index 000000000..22ac271e5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_empty_value.result @@ -0,0 +1,10 @@ +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; +SET GLOBAL mroonga_query_log_file = ""; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +Variable_name Value +mroonga_query_log_file +log file is changed: -> +query log file is disabled: +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_null_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_null_value.result new file mode 100644 index 000000000..3921fb162 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_null_value.result @@ -0,0 +1,10 @@ +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; +SET GLOBAL mroonga_query_log_file = NULL; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +Variable_name Value +mroonga_query_log_file +log file is changed: -> +query log file is disabled: +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_new_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_new_value.result new file mode 100644 index 000000000..7b1be1365 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_new_value.result @@ -0,0 +1,9 @@ +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +Variable_name Value +mroonga_query_log_file groonga-query.log +log file is changed: -> +query log is enabled: +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_same_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_same_value.result new file mode 100644 index 000000000..adf3d1bfb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_same_value.result @@ -0,0 +1,10 @@ +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +Variable_name Value +mroonga_query_log_file groonga-query.log +log file is changed: -> +query log file isn't changed because the requested path isn't different: +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/suite.pm b/storage/mroonga/mysql-test/mroonga/storage/suite.pm index 7e4f8c177..528ccc5d6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/suite.pm +++ b/storage/mroonga/mysql-test/mroonga/storage/suite.pm @@ -5,7 +5,7 @@ package My::Suite::Mroonga; return "No Mroonga engine" unless $ENV{HA_MROONGA_SO} or $::mysqld_variables{'mroonga'} eq "ON"; -sub is_default { not $::opt_embedded_server } +sub is_default { 1 } my $groonga_normalizer_mysql_dir=$::basedir . '/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql'; my $groonga_normalizer_mysql_install_dir=$::basedir . '/lib/groonga/plugins'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_after.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_after.test index 38d4f034d..4e486b83c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_after.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_after.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,11 +23,11 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - body TEXT + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -ALTER TABLE diaries ADD title TEXT AFTER id; +ALTER TABLE diaries ADD title VARCHAR(40) AFTER id; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_first.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_first.test index 0e82b3dd4..5912ed3fc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_first.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_first.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,11 +23,11 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - body TEXT + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -ALTER TABLE diaries ADD title TEXT FIRST; +ALTER TABLE diaries ADD title VARCHAR(40) FIRST; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_comment.test index 1071faf0b..18fa2f3ef 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_comment.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_parameter.test index 70fb61cc0..f84c931c0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_parameter.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source include/not_embedded.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_comment.test index 8a64fe00a..d49e84cd5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_comment.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_parameter.test index f34cbcdcb..cc208a208 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_parameter.test @@ -13,10 +13,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_cp932.test new file mode 100644 index 000000000..188361272 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_cp932.test @@ -0,0 +1,53 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES cp932; + +CREATE TABLE users ( + id int PRIMARY KEY +) DEFAULT CHARSET=cp932; +ALTER TABLE users + ADD COLUMN –¼‘O text, + ADD FULLTEXT INDEX (–¼‘O); + +INSERT INTO users VALUES (1, "‚â‚Ü‚¾"); +INSERT INTO users VALUES (2, "‚½‚È‚©"); +INSERT INTO users VALUES (3, "‚·‚¸‚«"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--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_add_column_multibyte_utf8.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_utf8.test new file mode 100644 index 000000000..88ef12498 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_utf8.test @@ -0,0 +1,53 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES utf8; + +CREATE TABLE users ( + id int PRIMARY KEY +) DEFAULT CHARSET=utf8; +ALTER TABLE users + ADD COLUMN åå‰ text, + ADD FULLTEXT INDEX (åå‰); + +INSERT INTO users VALUES (1, "ã‚„ã¾ã "); +INSERT INTO users VALUES (2, "ãŸãªã‹"); +INSERT INTO users VALUES (3, "ã™ãšã"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--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_add_column_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multiple.test index 568deea9e..1f4fa4663 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multiple.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multiple.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,7 +23,7 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT + title VARCHAR(40) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; @@ -31,7 +31,7 @@ INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; ALTER TABLE diaries - ADD COLUMN body TEXT FIRST, + ADD COLUMN body VARCHAR(140) FIRST, ADD COLUMN published BOOLEAN AFTER id, ADD COLUMN created_at DATETIME; UPDATE diaries SET body = "will start groonga!"; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_plain.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_plain.test index 8c4d76a58..fac1f045d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_plain.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_plain.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,14 +23,14 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT + title VARCHAR(40) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; -ALTER TABLE diaries ADD COLUMN body TEXT; +ALTER TABLE diaries ADD COLUMN body VARCHAR(140); UPDATE diaries SET body = "will start groonga!"; SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_type_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_type_comment.test index 037e81c79..c19835814 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_type_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_type_comment.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc 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 83b8aef1c..1440c0b78 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_duplicated.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_duplicated.test index 4476decec..53d4b21ff 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_duplicated.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_duplicated.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc 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 index 424ae89b4..7bb65327f 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_key_multiple_column_with_data.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_key_multiple_column_with_data.test index 94db5d40b..7e584131b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_key_multiple_column_with_data.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_key_multiple_column_with_data.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.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 index 5bc12edad..7ae72d672 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_comment_not_for_mroonga.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_comment_not_for_mroonga.test index 98d26966b..119099c43 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_comment_not_for_mroonga.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_comment_not_for_mroonga.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_have_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_have_index.test index 575d65e44..c01f7a957 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_have_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_have_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_after.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_after.test index 295bb91e0..e680e6e20 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_after.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_after.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,12 +23,12 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -ALTER TABLE diaries CHANGE body description TEXT AFTER id; +ALTER TABLE diaries CHANGE body description VARCHAR(140) AFTER id; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_first.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_first.test index 01682688a..20624ad95 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_first.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_first.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,12 +23,12 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -ALTER TABLE diaries CHANGE body description TEXT FIRST; +ALTER TABLE diaries CHANGE body description VARCHAR(140) FIRST; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test index b732f0458..7d982ae42 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,15 +23,15 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; ALTER TABLE diaries - CHANGE body description TEXT FIRST, - CHANGE title subject TEXT AFTER internal_id, - CHANGE id internal_id INT; + CHANGE body description VARCHAR(140) FIRST, + CHANGE title subject VARCHAR(40) AFTER internal_id, + CHANGE id internal_id INT AUTO_INCREMENT; SHOW CREATE TABLE diaries; INSERT INTO diaries (subject, description) diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_no_order.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_no_order.test index 88a69111f..2394be863 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_no_order.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_no_order.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,12 +23,12 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -ALTER TABLE diaries CHANGE body description TEXT; +ALTER TABLE diaries CHANGE body description VARCHAR(140); SHOW CREATE TABLE diaries; INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_engine_decimal.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine_decimal.test similarity index 84% rename from storage/mroonga/mysql-test/mroonga/storage/t/alter_table_engine_decimal.test rename to storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine_decimal.test index 71e0fda38..e8e0bd416 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_engine_decimal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine_decimal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc @@ -24,19 +24,18 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, temperature DECIMAL(6, 3) ) ENGINE InnoDB DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); +INSERT INTO diaries (temperature) VALUES (21.281); SELECT * FROM diaries; ALTER TABLE diaries ENGINE = mroonga; SELECT * FROM diaries; -INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); -INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); +INSERT INTO diaries (temperature) VALUES (14.213); +INSERT INTO diaries (temperature) VALUES (17.821); SELECT * FROM diaries; SHOW CREATE TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine_fulltext_index.test similarity index 90% rename from storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine.test rename to storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine_fulltext_index.test index a477d0919..f8c4dfa34 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine_fulltext_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,9 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) ENGINE MyISAM DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; +SELECT table_name, engine + FROM information_schema.tables + WHERE table_name = 'diaries'; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); @@ -37,7 +39,9 @@ SELECT * FROM diaries MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); ALTER TABLE diaries ENGINE = mroonga; -SHOW CREATE TABLE diaries; +SELECT table_name, engine + FROM information_schema.tables + WHERE table_name = 'diaries'; SELECT * FROM diaries WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND 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 92380fdb8..c1bf17ba4 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_create_fulltext.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_create_fulltext.test index 1f6980cc0..d1f830826 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_create_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_create_fulltext.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc 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 index 5cba17d20..17b86b473 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_ujis.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_ujis.test index d7f7f4464..028fb33f1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_ujis.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_ujis.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_utf8.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_utf8.test index 626a1bc80..00015dcfa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_utf8.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_utf8.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_multiple_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_multiple_column.test index ea424df2e..5760887e7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_multiple_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_multiple_column.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_normal.test index 186e1f509..69dbe23cc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_normal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_normal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_primary.test index 4348efeb0..dce2ea513 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_primary.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_primary.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_truncate.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_truncate.test index 49d9f0b8d..00f6d30a5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_truncate.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_truncate.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_updating.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_updating.test index 58e53cb06..020579106 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_updating.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_updating.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_multiple.test index fc3acad90..32da1b3a5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_multiple.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_multiple.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,8 +23,8 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_one.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_one.test index 6b790e5d6..ec5735f06 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_one.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_one.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,8 +23,8 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_key_multiple_column_with_data.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_key_multiple_column_with_data.test index 956f397b9..eb80d3036 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_key_multiple_column_with_data.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_key_multiple_column_with_data.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.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 index 95f683f1d..da06f680d 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext.test index 62bbe4a4d..08d84f7b5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index d87078e7e..3309f60a3 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_ujis.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_ujis.test index cb6ade7a4..2f3b61efc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_ujis.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_ujis.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_utf8.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_utf8.test index 62bbe4a4d..08d84f7b5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_utf8.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_utf8.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_multiple_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_multiple_column.test index 13afdcfe0..1d073dc64 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_multiple_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_multiple_column.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_normal.test index bf2cc8bd6..870b1bb60 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_normal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_normal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_primary.test index 3d9523ab5..34ee3fcd2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_primary.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_primary.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_no_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_no_primary_key.test index 193680296..b34941184 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_no_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_no_primary_key.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_normal.test index bf7e75017..6316eac4f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_normal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_normal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -31,9 +31,8 @@ INSERT INTO memos (content) values ("Started Groonga."); INSERT INTO memos (content) values ("Starting Mroonga..."); ALTER TABLE memos ADD FULLTEXT INDEX content_index (content); -SHOW CREATE TABLE memos; -SELECT * FROM memos WHERE MATCH(content) AGAINST("groonga"); +SELECT * FROM memos WHERE MATCH(content) AGAINST("+groonga" IN BOOLEAN MODE); DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_table.test index c719318d8..f4facdcb7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_table.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_drop_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_drop_table.test index 11799a51a..165b71a86 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_drop_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_drop_table.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_after.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_after.test index 8bdfd1002..ce1e52efa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_after.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_after.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,15 +23,15 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); SELECT * FROM diaries; -ALTER TABLE diaries MODIFY body TEXT AFTER id; +ALTER TABLE diaries MODIFY body VARCHAR(140) AFTER id; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_first.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_first.test index a4dd52d9f..22c6b59e0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_first.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_first.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,15 +23,15 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); SELECT * FROM diaries; -ALTER TABLE diaries MODIFY body TEXT FIRST; +ALTER TABLE diaries MODIFY body VARCHAR(140) FIRST; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_no_order.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_no_order.test index 45f4748e9..eed22d066 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_no_order.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_no_order.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,8 +23,8 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_recreate_anonymous_index_at_once.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_recreate_anonymous_index_at_once.test index c44937b3f..77d0bc741 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_recreate_anonymous_index_at_once.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_recreate_anonymous_index_at_once.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( body TEXT, FULLTEXT 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 ("survey", "will start mroonga!"); @@ -44,8 +43,6 @@ SELECT * FROM diaries; SELECT * FROM diaries WHERE MATCH (body) AGAINST ("+groonga" IN BOOLEAN MODE); -SHOW CREATE TABLE diaries; - DROP TABLE diaries; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_rename_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_rename_table.test index 91898b5bb..6c15161ed 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_rename_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_rename_table.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,9 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; +SELECT table_name, engine + FROM information_schema.tables + WHERE table_name = 'diaries'; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); SELECT * FROM diaries; @@ -42,7 +44,9 @@ SELECT * FROM memos WHERE MATCH(title) AGAINST("groonga") AND MATCH(body) AGAINST("starting"); -SHOW CREATE TABLE memos; +SELECT table_name, engine + FROM information_schema.tables + WHERE table_name = 'memos'; DROP TABLE memos; 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 e696d12f1..09e0ea8a1 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 @@ -12,11 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -25,7 +25,7 @@ DROP TABLE IF EXISTS shops; CREATE TABLE shops ( id INT PRIMARY KEY AUTO_INCREMENT, - name TEXT, + name VARCHAR(40), location GEOMETRY NOT NULL ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_TODO_SPLIT_ME.test index db018023a..f452e402d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_table_param.test b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_table_param.test index 169260cc8..2d0840ce9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_table_param.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_table_param.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_text.test b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_text.test index ee4db7172..2d854ec35 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_text.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_text.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/binlog_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/binlog_TODO_SPLIT_ME.test index c67aff066..eff9259a7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/binlog_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/binlog_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_log_bin.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/check_table_broken.test b/storage/mroonga/mysql-test/mroonga/storage/t/check_table_broken.test new file mode 100644 index 000000000..77271b4f1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/check_table_broken.test @@ -0,0 +1,45 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET NAMES UTF8; + +CREATE DATABASE check_test; +USE check_test; + +CREATE TABLE diaries ( + title TEXT, + FULLTEXT INDEX (title) +); + +INSERT INTO diaries VALUES ('Hello'); + +--remove_file $MYSQLD_DATADIR/check_test.mrn.000010C + +FLUSH TABLES; + +CHECK TABLE diaries; + +REPAIR TABLE diaries; +DROP TABLE diaries; + +DROP DATABASE check_test; +USE test; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/check_table_not_broken.test b/storage/mroonga/mysql-test/mroonga/storage/t/check_table_not_broken.test new file mode 100644 index 000000000..1460732b2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/check_table_not_broken.test @@ -0,0 +1,38 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + title TEXT +); + +INSERT INTO diaries VALUES ('Hello'); + +CHECK TABLE diaries; + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_general_ci_french.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_general_ci_french.test index d0df70716..101c16e96 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_general_ci_french.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_general_ci_french.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_french.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_french.test index f9e9a817a..2c28edb33 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_french.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_french.test @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings 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 index 4beec67b4..1d9998eee 100644 --- 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 @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_french.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_french.test index 045c9ef2a..f69e5594e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_french.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_french.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_japanese.test index 199e2904d..5d48a1a62 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_japanese.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_japanese.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_index_not_for_mroonga.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_index_not_for_mroonga.test index 4c63dedfc..42c5e1d22 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_index_not_for_mroonga.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_index_not_for_mroonga.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_normal_not_for_mroonga.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_normal_not_for_mroonga.test index 0fcc80688..6761869d4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_normal_not_for_mroonga.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_normal_not_for_mroonga.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_with_index.test index cc713a80e..8645a2d7e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -22,7 +22,7 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, + title VARCHAR(40), created_at DATE, KEY (created_at) ) DEFAULT CHARSET UTF8; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_without_index.test index d5587876c..21dcf156e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_without_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -22,7 +22,7 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, + title VARCHAR(40), created_at DATE ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test index 91a200397..552a2dfb6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test @@ -1,4 +1,5 @@ # Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 2016-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +13,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/skip_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test index 054ea2282..bf08b878e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('2038-01-18 03:14:07', '2038-01-18 03:14:07'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test index 1a1ce992a..71ee07139 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test index 3fac76bb6..5b25cf38e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test index 1e1d950ea..e93e38cd3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_2038.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_2038.test index 3abf611a8..af04133ef 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_2038.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_2038.test @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('2038-01-19 03:14:07', '2038-01-19 03:14:07'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test index 586367147..a3e355cc1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test @@ -13,12 +13,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -30,10 +28,9 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) - VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); + VALUES ('1000-01-02 00:00:00', '1000-01-02 00:00:00'); SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_max.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_max.test index 6599a554e..3f4bb7b1e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_max.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_max.test @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_strict_sql_mode_out_of_range.test similarity index 86% rename from storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test rename to storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_strict_sql_mode_out_of_range.test index 95fa60e7e..47266e017 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_strict_sql_mode_out_of_range.test @@ -13,12 +13,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/have_64bit.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc +--source ../../include/mroonga/have_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -30,8 +29,8 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; +--error ER_TRUNCATED_WRONG_VALUE INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_55_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_5_out_of_range.test similarity index 89% rename from storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_55_out_of_range.test rename to storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_5_out_of_range.test index bdc21cccf..23ddc373a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_55_out_of_range.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_5_out_of_range.test @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc ---source ../../include/mroonga/have_version_55.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc +--source ../../include/mroonga/have_version_5_5.inc --source ../../include/mroonga/have_mysql.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_6_or_later_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_6_or_later_out_of_range.test new file mode 100644 index 000000000..55457c167 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_6_or_later_out_of_range.test @@ -0,0 +1,41 @@ +# Copyright(C) 2012 Kentoku SHIBA +# Copyright(C) 2014 Kenji Maruyama +# +# 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-1301 USA + +--source ../../include/mroonga/skip_freebsd.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc +--source ../../include/mroonga/skip_strict_sql_mode.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, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; + +INSERT INTO diaries (title, created_at) + VALUES ('2012', '2012'); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_with_index.test index efa54b1e0..94eb237f1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_fractional_seconds.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( created_at DATETIME(6), KEY (created_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01.111111"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_without_index.test index f0f51fba5..5dc033f1c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_without_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_fractional_seconds.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME(6) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01.111111"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_freebsd_before_unix_epoch.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_freebsd_before_unix_epoch.test index e75539d4a..d66ed5617 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_freebsd_before_unix_epoch.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_freebsd_before_unix_epoch.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_freebsd.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date_strict.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_date.test similarity index 88% rename from storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date_strict.test rename to storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_date.test index 808313da9..3382a1c1e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date_strict.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_date.test @@ -1,4 +1,4 @@ -# Copyright(C) 2015 Kouhei Sutou +# Copyright(C) 2015-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/have_mariadb_10_2_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -24,12 +25,9 @@ CREATE TABLE timestamps ( id INT PRIMARY KEY AUTO_INCREMENT, create_dt DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE timestamps; -SET sql_mode='STRICT_TRANS_TABLES'; --error ER_WARN_DATA_OUT_OF_RANGE INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00"); -SET sql_mode=default; SELECT * FROM timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_month_day.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_month_day.test new file mode 100644 index 000000000..f95b0947f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_month_day.test @@ -0,0 +1,39 @@ +# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 2016-2017 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-1301 USA + +--source ../../include/mroonga/have_mariadb_10_2_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS timestamps; +--enable_warnings + +CREATE TABLE timestamps ( + id INT PRIMARY KEY AUTO_INCREMENT, + create_dt DATETIME +) DEFAULT CHARSET UTF8; + +--error ER_WARN_DATA_OUT_OF_RANGE +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +--error ER_WARN_DATA_OUT_OF_RANGE +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); + +SELECT * FROM timestamps; + +DROP TABLE timestamps; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_date.test new file mode 100644 index 000000000..2b6a05915 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_date.test @@ -0,0 +1,39 @@ +# Copyright(C) 2015-2016 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-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS timestamps; +--enable_warnings + +CREATE TABLE timestamps ( + id INT PRIMARY KEY AUTO_INCREMENT, + create_dt DATETIME +) DEFAULT CHARSET UTF8; + +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00"); + +SELECT * FROM timestamps; + +INSERT INTO timestamps (create_dt) VALUES ("2015-06-17 00:00:00"); +SELECT * FROM timestamps; + +DROP TABLE timestamps; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_month_day.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_month_day.test new file mode 100644 index 000000000..4419231a9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_month_day.test @@ -0,0 +1,39 @@ +# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS timestamps; +--enable_warnings + +CREATE TABLE timestamps ( + id INT PRIMARY KEY AUTO_INCREMENT, + create_dt DATETIME +) DEFAULT CHARSET UTF8; + +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); + +SELECT * FROM timestamps; + +DROP TABLE timestamps; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_null.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_null.test index 8c3050903..fcea54313 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_null.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_null.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('NULL', NULL); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_with_index.test index b49897800..bf415b177 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( created_at DATETIME, KEY (created_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_without_index.test index b1168f633..c6c9edec5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_without_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test index 5742de6e3..c5107e6c8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test @@ -1,4 +1,4 @@ -# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 2015-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source include/not_embedded.inc +--source ../../include/mroonga/skip_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -24,14 +26,16 @@ CREATE TABLE timestamps ( id INT PRIMARY KEY AUTO_INCREMENT, create_dt DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE timestamps; -INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); -INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); +SET sql_mode='STRICT_TRANS_TABLES'; +--error ER_WARN_DATA_OUT_OF_RANGE +INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00"); +SET sql_mode=default; SELECT * FROM timestamps; -SELECT * FROM timestamps WHERE create_dt = "2012-01-01 00:00:00"; +INSERT INTO timestamps (create_dt) VALUES ("2015-06-17 00:00:00"); +SELECT * FROM timestamps; DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_month_day.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_month_day.test new file mode 100644 index 000000000..12b586241 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_month_day.test @@ -0,0 +1,39 @@ +# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 2016-2017 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-1301 USA + +--source ../../include/mroonga/skip_strict_sql_mode.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS timestamps; +--enable_warnings + +CREATE TABLE timestamps ( + id INT PRIMARY KEY AUTO_INCREMENT, + create_dt DATETIME +) DEFAULT CHARSET UTF8; + +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); + +SELECT * FROM timestamps; + +SELECT * FROM timestamps WHERE create_dt = "2012-01-01 00:00:00"; + +DROP TABLE timestamps; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_with_index.test index 921337933..03cb6b64d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( temperature DECIMAL(6, 3), KEY (temperature) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_without_index.test index 91e4b789a..ca59d052e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_without_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE diaries ( title TEXT, temperature DECIMAL(6, 3) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_with_index.test index 46d9ea374..14303454a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( temperature DECIMAL, KEY (temperature) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, temperature) VALUES ("clear day", 21); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_without_index.test index acda07ab9..ef8609a78 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_without_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE diaries ( title TEXT, temperature DECIMAL ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, temperature) VALUES ("clear day", 21); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_less_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_less_with_index.test index 2b7fd7de8..6a7a5bcc3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_less_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_less_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_many_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_many_with_index.test index f4b317576..92eabc11d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_many_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_many_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_add_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_add_column.test new file mode 100644 index 000000000..8561688db --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_add_column.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); + +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED; +ALTER TABLE logs ADD FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"'; + +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_delete.test new file mode 100644 index 000000000..a54ee0e26 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_delete.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +DELETE FROM logs WHERE id = 1; + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_drop_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_drop_column.test new file mode 100644 index 000000000..0bd963874 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_drop_column.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +ALTER TABLE logs DROP COLUMN message; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_insert.test new file mode 100644 index 000000000..841c2f444 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_insert.test @@ -0,0 +1,40 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_reindex.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_reindex.test new file mode 100644 index 000000000..725c32384 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_reindex.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +ALTER TABLE logs DISABLE KEYS; +ALTER TABLE logs ENABLE KEYS; + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_update.test new file mode 100644 index 000000000..08969fa57 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_update.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; + +SELECT * FROM logs WHERE MATCH(message) AGAINST("hut" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_add_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_add_column.test new file mode 100644 index 000000000..80437aa0e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_add_column.test @@ -0,0 +1,41 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); + +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL; + +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_delete.test new file mode 100644 index 000000000..c36913cec --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_delete.test @@ -0,0 +1,41 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +DELETE FROM logs WHERE id = 1; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_drop_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_drop_column.test new file mode 100644 index 000000000..0946b1f30 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_drop_column.test @@ -0,0 +1,41 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +ALTER TABLE logs DROP COLUMN message; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_insert.test new file mode 100644 index 000000000..90cb52476 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_insert.test @@ -0,0 +1,39 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_add_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_add_index.test new file mode 100644 index 000000000..340c5e70f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_add_index.test @@ -0,0 +1,35 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_mariadb_10_2_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +--error 16509 +ALTER TABLE logs ADD INDEX (message); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.test new file mode 100644 index 000000000..480cc1f7b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.test @@ -0,0 +1,32 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_mariadb_10_2_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +--error 16509 +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL, + FULLTEXT INDEX (message) +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mysql_5_7_or_later_add_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mysql_5_7_or_later_add_index.test new file mode 100644 index 000000000..7c953d30d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mysql_5_7_or_later_add_index.test @@ -0,0 +1,35 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +--error ER_ILLEGAL_HA_CREATE_OPTION +ALTER TABLE logs ADD INDEX (message); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_update.test new file mode 100644 index 000000000..68d97f990 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_update.test @@ -0,0 +1,41 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id__id.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id__id.test index ca4f154d4..39031cabf 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id__id.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id__id.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id_invalid_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id_invalid_id.test index c1c16d3af..6b4c637a3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id_invalid_id.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id_invalid_id.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 9c83c94b4..4d4a0f5a6 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.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 index 5143f06a2..b96fa9b03 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.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 9be02c2a1..d3caeba70 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_reference.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_reference.test index b7e859093..59471f7e9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_reference.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_reference.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc 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 index 432aab886..e0ab1ad4c 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/support_libgroonga_lz4.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 index 0f21e37c2..7d5665b04 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/support_libgroonga_zlib.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zstd.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zstd.test new file mode 100644 index 000000000..99ac2cdbb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zstd.test @@ -0,0 +1,37 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/support_libgroonga_zstd.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_ZSTD"' +) 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 index d057e0bcf..4d0a80ad5 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/unsupport_libgroonga_lz4.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 index 1066270e4..bbaaa51be 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/unsupport_libgroonga_zlib.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zstd.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zstd.test new file mode 100644 index 000000000..6b5eb5cd8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zstd.test @@ -0,0 +1,37 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/unsupport_libgroonga_zstd.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_ZSTD"' +) 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_with_not_for_mroonga_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_with_not_for_mroonga_comment.test index b168716ed..e18f17b7c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_with_not_for_mroonga_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_with_not_for_mroonga_comment.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_order_by_with_function.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_order_by_with_function.test index 2098e878e..3675db38c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_order_by_with_function.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_order_by_with_function.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_reference.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_reference.test index 995fafefe..9b6c8d301 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_reference.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_reference.test @@ -1,4 +1,4 @@ -# Copyright(C) 2013 Kouhei Sutou +# Copyright(C) 2013-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc @@ -29,8 +29,9 @@ CREATE TABLE tags ( CREATE TABLE bugs ( id INT UNSIGNED PRIMARY KEY, - tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"' + tags VARCHAR(128) DEFAULT '' COMMENT 'flags "COLUMN_VECTOR", type "tags"' ) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE bugs; INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_int_with_index_zero_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_int_with_index_zero_value.test index d8d181228..038d29c9e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_int_with_index_zero_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_int_with_index_zero_value.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_json_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_json_insert.test new file mode 100644 index 000000000..9bba55b0b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_json_insert.test @@ -0,0 +1,37 @@ +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_0_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs VALUES ('{"message": "start"}'); +INSERT INTO logs VALUES ('{"message": "restart"}'); +INSERT INTO logs VALUES ('{"message": "shutdown"}'); + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_cp932.test new file mode 100644 index 000000000..f7eae384d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_cp932.test @@ -0,0 +1,51 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES cp932; + +CREATE TABLE users ( + –¼‘O text, + FULLTEXT INDEX (–¼‘O) +) DEFAULT CHARSET=cp932; + +INSERT INTO users VALUES ("‚â‚Ü‚¾"); +INSERT INTO users VALUES ("‚½‚È‚©"); +INSERT INTO users VALUES ("‚·‚¸‚«"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--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_multibyte_utf8.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_utf8.test new file mode 100644 index 000000000..6d6c44ceb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_utf8.test @@ -0,0 +1,51 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES utf8; + +CREATE TABLE users ( + åå‰ text, + FULLTEXT INDEX (åå‰) +) DEFAULT CHARSET=utf8; + +INSERT INTO users VALUES ("ã‚„ã¾ã "); +INSERT INTO users VALUES ("ãŸãªã‹"); +INSERT INTO users VALUES ("ã™ãšã"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--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_set_16_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_16_with_index.test index ede3a07f5..a4e229dd1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_16_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_16_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_24_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_24_with_index.test index c43f5c70e..5d7b8c4df 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_24_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_24_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_32_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_32_with_index.test index ccddec38f..3391fb7b7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_32_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_32_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_64_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_64_with_index.test index c041a3f9e..219bb085c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_64_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_64_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_8_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_8_with_index.test index d8a6a0ac3..79d56f4e8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_8_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_8_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_bigint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_bigint_with_index.test index 0a2f9d307..a031cab87 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_bigint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_bigint_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_int_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_int_with_index.test index b64d97fd2..287d0407b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_int_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_int_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_mediumint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_mediumint_with_index.test index f2252055c..704cc4d41 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_mediumint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_mediumint_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_smallint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_smallint_with_index.test index ff2eeef6a..2200efc71 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_smallint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_smallint_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_tinyint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_tinyint_with_index.test index 50824bb2c..33f07c474 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_tinyint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_tinyint_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_time_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_time_fractional_seconds_with_index.test index 54d127c73..c8e6dddf4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_time_fractional_seconds_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_time_fractional_seconds_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_fractional_seconds.inc @@ -28,7 +28,6 @@ CREATE TABLE running_records ( max TIME(6), KEY (average) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; INSERT INTO running_records (title, average, max) VALUES ("normal condition", "01:00:00.000001", "01:05:00.000001"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_time_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_time_with_index.test index cfa760bca..e950411cb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_time_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_time_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ CREATE TABLE running_records ( max TIME, KEY (average) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; INSERT INTO running_records (title, average, max) VALUES ("normal condition", "01:00:00", "01:05:00"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test index c2407cb1b..19dadc2c2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/skip_mariadb_55.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc --source ../../include/mroonga/have_fractional_seconds.inc --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ CREATE TABLE diaries ( updated_at TIMESTAMP(6), KEY (updated_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at, updated_at) VALUES ("clear day", diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test index f398fb9b9..cc063faa6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test @@ -1,4 +1,4 @@ -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -23,11 +23,10 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, - created_at TIMESTAMP, - updated_at TIMESTAMP, + created_at TIMESTAMP DEFAULT '2016-04-21 00:00:00', + updated_at TIMESTAMP DEFAULT '2016-04-21 00:00:00', KEY (updated_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at, updated_at) VALUES ("clear day", "2012-01-29 21:51:01", "2012-01-29 21:51:02"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_tinyint_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_tinyint_without_index.test index 9cf9cb631..de0cbedf0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_tinyint_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_tinyint_without_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_with_index.test index 2da118e27..b7cb86943 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_without_index.test index dea569704..912f86fb7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_without_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_int_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_int_with_index.test index a2eb99b1d..f20348bee 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_int_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_int_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_mediumint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_mediumint_with_index.test index e219fc075..44fb656a9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_mediumint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_mediumint_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_smallint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_smallint_with_index.test index e9dcd7e1e..c98569d19 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_smallint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_smallint_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_tinyint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_tinyint_with_index.test index d90c71df9..9414eee1f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_tinyint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_tinyint_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_year_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_year_with_index.test index e7cb3f696..82004e197 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_year_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_year_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE aniversary_memos ( party_year YEAR, KEY (party_year) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE aniversary_memos; INSERT INTO aniversary_memos (title, party_year) VALUES ("We need a big cake!", "11"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_year_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_year_without_index.test index 8b798a718..e7530cec0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_year_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_year_without_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE aniversary_memos ( title TEXT, party_year YEAR ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE aniversary_memos; INSERT INTO aniversary_memos (title, party_year) VALUES ("We need a big cake!", "11"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/count_star.test b/storage/mroonga/mysql-test/mroonga/storage/t/count_star.test new file mode 100644 index 000000000..f57d40fd5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/count_star.test @@ -0,0 +1,35 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id int PRIMARY KEY +); + +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); + +SELECT COUNT(*) FROM ids; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_database_name_slash.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_database_name_slash.test index 28262bb4b..191346935 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_database_name_slash.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_database_name_slash.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_TODO_SPLIT_ME.test index f02e4ddcb..1f7bbf12b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -64,6 +64,8 @@ create table t1 (c1 time); desc t1; drop table t1; create table t1 (c1 timestamp); +# For MariaDB 10.2.3 +-- replace_result current_timestamp() CURRENT_TIMESTAMP desc t1; drop table t1; create table t1 (c1 datetime); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_flags_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_comment.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_flags_comment.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_comment.test index c01d80a20..908a2fcbd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_flags_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_comment.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_flags_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_parameter.test similarity index 97% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_flags_parameter.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_parameter.test index cb86cddcb..fc66ae12f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_flags_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_parameter.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source include/not_embedded.inc @@ -29,7 +29,6 @@ CREATE TABLE bugs ( id INT UNSIGNED PRIMARY KEY, tags TEXT FLAGS='COLUMN_VECTOR' ) DEFAULT CHARSET=utf8; -SHOW CREATE TABLE bugs; SELECT mroonga_command("dump --dump_plugins no"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_comment.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_comment.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_comment.test index d7514512b..b39da499d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_comment.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_nonexistent.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_nonexistent.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_nonexistent.test index 10d00bfcb..0350a299b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_nonexistent.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_nonexistent.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_parameter.test similarity index 95% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_parameter.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_parameter.test index 4b820f7b8..d208e62e8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_parameter.test @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_type_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_comment.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_type_comment.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_comment.test index 18cfbb33d..77965a70c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_type_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_comment.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_type_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_nonexistent.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_type_nonexistent.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_nonexistent.test index 1c3b89be6..46becfdc2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_type_nonexistent.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_nonexistent.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_comment_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_comment_normal.test index 18a68fb1f..aecfab1f6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_comment_normal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_comment_normal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.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 054d311bd..c5fa91c5c 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_comment.test index 9a22c1b09..568c9ac78 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_comment.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_medium.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_medium.test new file mode 100644 index 000000000..df509ed0d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_medium.test @@ -0,0 +1,39 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 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, + content_size INT NOT NULL, + KEY (content_size) COMMENT 'flags "INDEX_MEDIUM"' +) 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_index_small.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_small.test new file mode 100644 index 000000000..fc37e28eb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_small.test @@ -0,0 +1,39 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 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, + is_read BOOL NOT NULL, + KEY (is_read) COMMENT 'flags "INDEX_SMALL"' +) 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_none.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_none.test index 470283e94..cc54ab34a 100644 --- 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 @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_parameter.test index 77a7683bc..0c87494e3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_parameter.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_none.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_none.test index e3680ad34..700564354 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_none.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_none.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_with_position_and_with_weight.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_with_position_and_with_weight.test index 7add6db78..4700c280d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_with_position_and_with_weight.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_with_position_and_with_weight.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_comment.test index 42a91ecfc..5251bf984 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_comment.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_fulltext_index_bin.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_fulltext_index_bin.test new file mode 100644 index 000000000..2815b2850 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_fulltext_index_bin.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 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-1301 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 "NormalizerAuto"' +) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + +INSERT INTO diaries VALUES ("2013-04-23", "ブラックコーヒーを飲んã ã€‚"); + +SELECT * FROM diaries + WHERE MATCH (content) AGAINST ("+ãµã‚‰ã¤ã" IN BOOLEAN MODE); +SELECT * FROM diaries + WHERE MATCH (content) AGAINST ("+ブラック" 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_index_normalizer_index_bin.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_index_bin.test new file mode 100644 index 000000000..5270372e3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_index_bin.test @@ -0,0 +1,37 @@ +# Copyright(C) 2016 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-1301 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, + INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + +SELECT mroonga_command("dump --dump_plugins no"); + +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_index_normalizer_no_utf8_charset_with_utf8_normalizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_no_utf8_charset_with_utf8_normalizer.test index c35c7dc15..2d7ff6643 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_no_utf8_charset_with_utf8_normalizer.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_no_utf8_charset_with_utf8_normalizer.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_none.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_none.test index fe9037843..15045b546 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_none.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_none.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_parameter.test index 5739e118a..16b76e0ec 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_parameter.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source ../../include/mroonga/have_mroonga.inc 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 index 7048ab6e7..c712c2ed0 100644 --- 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 @@ -12,8 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +27,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX body_index (body) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"' ) DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_default.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_default.test index e163201e8..e247e3d17 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_default.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_default.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); 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 index 69a48eb78..a2484a90a 100644 --- 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 @@ -12,8 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -25,7 +26,6 @@ CREATE TABLE variables ( name TEXT, FULLTEXT INDEX (name) COMMENT 'parser "off"' ) DEFAULT CHARSET=utf8; -SHOW CREATE TABLE variables; INSERT INTO variables (name) VALUES ("mroonga_database_path_prefix"); INSERT INTO variables (name) VALUES ("mroonga_default_parser"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_multiple_token_filters.test index a58a408cf..b91819e99 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_multiple_token_filters.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_multiple_token_filters.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_one_token_filter.test index 0d5605821..4fe85314d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_one_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_one_token_filter.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_parameter.test index 956044c76..ba5f9a969 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_parameter.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_comment.test index 688783b97..1066ffebb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_comment.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX body_index (body) COMMENT 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' ) DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_default.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_default.test index c7acf23cb..e7902c7b2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_default.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_default.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_off.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_off.test index e9c1fdf47..1fc724f51 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_off.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_off.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE variables ( name TEXT, FULLTEXT INDEX (name) COMMENT 'tokenizer "off"' ) DEFAULT CHARSET=utf8; -SHOW CREATE TABLE variables; INSERT INTO variables (name) VALUES ("mroonga_database_path_prefix"); INSERT INTO variables (name) VALUES ("mroonga_default_tokenizer"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_parameter.test index 222cc59e4..7ffedeaea 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_parameter.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( body text, FULLTEXT INDEX body_index (body) TOKENIZER='TokenBigramSplitSymbolAlphaDigit' ) DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_default.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_default.test index c161c5062..1eaf8fa61 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_default.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_default.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_hash.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_hash.test index 22b3061ce..626172020 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_hash.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_hash.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_multiple_token_filters.test index 0c0fb1394..2120efe0f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_multiple_token_filters.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_multiple_token_filters.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_one_token_filter.test index 74d40a1ad..317730f20 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_one_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_one_token_filter.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_stop_word.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_stop_word.test index 62cc9ed17..2639f3251 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_stop_word.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_stop_word.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_fulltext_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_fulltext_column.test index 89e6c347c..6c2c62822 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/delete_fulltext_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_fulltext_column.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_btree_many_records.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_btree_many_records.test index aa38839f9..36f984837 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_btree_many_records.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_btree_many_records.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_no_unique.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_no_unique.test index 44f6bba6a..00f9336c1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_no_unique.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_no_unique.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_unique.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_unique.test index 7c562842a..be309e71b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_unique.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_unique.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_normal_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_normal_column.test index 513c56f07..3598a17f7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/delete_normal_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_normal_column.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_unsigned_bigint.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_unsigned_bigint.test index 0199dd14a..1bd21b658 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/delete_unsigned_bigint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_unsigned_bigint.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_TODO_SPLIT_ME.test index 3d8430703..383ada185 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_no_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_no_table.test new file mode 100644 index 000000000..764db3d6f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_no_table.test @@ -0,0 +1,57 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP DATABASE IF EXISTS another; +--enable_warnings + +CREATE DATABASE another; +USE another; + +CREATE TABLE diaries ( + title TEXT, + FULLTEXT INDEX (title) +); + +DROP TABLE diaries; + + +USE test; + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + title TEXT, + FULLTEXT INDEX (title) +); + + +DROP DATABASE another; + +SELECT mroonga_command('object_exist mroonga_operations'); + +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/drop_table_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/drop_table_TODO_SPLIT_ME.test index 39aff4e4b..b27fda75e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/drop_table_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/drop_table_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/flush_logs.test b/storage/mroonga/mysql-test/mroonga/storage/t/flush_logs.test index 887b204c7..44d6438bb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/flush_logs.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/flush_logs.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_add.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_add.test new file mode 100644 index 000000000..57947bb39 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_add.test @@ -0,0 +1,47 @@ +# Copyright(C) 2013 Kentoku SHIBA +# +# 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-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/skip_mariadb_10_1.inc +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +--enable_warnings + +CREATE TABLE comments ( + comment int unsigned PRIMARY KEY, + content text NOT NULL +); + +CREATE TABLE articles ( + content text NOT NULL, + comment int unsigned +); + +ALTER TABLE articles ADD FOREIGN KEY (comment) REFERENCES comments (comment); + +SHOW CREATE TABLE articles; + +SELECT * FROM information_schema.referential_constraints; + +DROP TABLE articles; +DROP TABLE comments; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_drop.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_drop.test new file mode 100644 index 000000000..9be7cc7d2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_drop.test @@ -0,0 +1,48 @@ +# Copyright(C) 2013 Kentoku SHIBA +# +# 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-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/skip_mariadb_10_1.inc +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +--enable_warnings + +CREATE TABLE comments ( + comment int unsigned PRIMARY KEY, + content text NOT NULL +); + +CREATE TABLE articles ( + content text NOT NULL, + comment int unsigned, + FOREIGN KEY (comment) REFERENCES comments (comment) +); + +ALTER TABLE articles DROP FOREIGN KEY comment; + +SHOW CREATE TABLE articles; + +SELECT * FROM information_schema.referential_constraints; + +DROP TABLE articles; +DROP TABLE comments; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test index 7f02c81db..e8c8540be 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test @@ -12,102 +12,35 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/skip_mysql_55.inc ---source ../../include/mroonga/skip_mariadb_55.inc +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/skip_mariadb_10_1.inc --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings -drop table if exists articles2; -drop table if exists articles; -drop table if exists comments2; -drop table if exists comments; +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; --enable_warnings -create table comments( - comment int unsigned, - content text not null, - primary key(comment) -); - -create table articles( - content text not null, - comment int unsigned, - FOREIGN KEY (comment) REFERENCES comments (comment) -); - -insert into comments (comment, content) values -(1, 'aaa bbb'),(2, 'ccc ddd'),(3, 'eee fff'); - -insert into articles (content, comment) values -('111aaa', 1),('222bbb', 2),('222ccc', 2); - -select comment, content from comments; - -select content, comment from articles; - -show create table comments; - -show create table articles; - -select * from information_schema.referential_constraints; - -rename table comments to comments2; -rename table articles to articles2; - -create table comments( - comment int unsigned, - content text not null, - primary key(comment) +CREATE TABLE comments ( + comment int unsigned PRIMARY KEY, + content text NOT NULL ); -create table articles( - content text not null, +CREATE TABLE articles ( + content text NOT NULL, comment int unsigned, FOREIGN KEY (comment) REFERENCES comments (comment) ); -insert into comments (comment, content) values -(1, 'ab'),(2, 'cd'),(3, 'ef'); - -insert into articles (content, comment) values -('1a', 1),('2b', 2),('2c', 2); - -select comment, content from comments; - -select content, comment from articles; - -select comment, content from comments2; - -select content, comment from articles2; - -show create table comments; - -show create table articles; - -show create table comments2; - -show create table articles2; - -select * from information_schema.referential_constraints; - -alter table articles drop foreign key comment; - -show create table articles; - -select content, comment from articles; - -alter table articles add FOREIGN KEY (comment) REFERENCES comments (comment); - -show create table articles; +SHOW CREATE TABLE articles; -select content, comment from articles; +SELECT * FROM information_schema.referential_constraints; -drop table articles2; -drop table articles; -drop table comments2; -drop table comments; +DROP TABLE articles; +DROP TABLE comments; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_existent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_existent.test new file mode 100644 index 000000000..29453f691 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_existent.test @@ -0,0 +1,53 @@ +# Copyright(C) 2017 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-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_warnings + +CREATE TABLE comments ( + id int unsigned PRIMARY KEY, + content varchar(140) NOT NULL +); + +CREATE TABLE entries ( + content varchar(140) NOT NULL, + comment_id int unsigned, + FOREIGN KEY (comment_id) REFERENCES comments (id) +); + +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +--error ER_ROW_IS_REFERENCED_2 +DELETE FROM comments WHERE id = 100; + +SELECT * FROM entries; +SELECT * FROM comments; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE entries; +DROP TABLE comments; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_nonexistent.test new file mode 100644 index 000000000..e2635efc5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_nonexistent.test @@ -0,0 +1,53 @@ +# Copyright(C) 2017 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-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_warnings + +CREATE TABLE comments ( + id int unsigned PRIMARY KEY, + content varchar(140) NOT NULL +); + +CREATE TABLE entries ( + content varchar(140) NOT NULL, + comment_id int unsigned, + FOREIGN KEY (comment_id) REFERENCES comments (id) +); + +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO comments (id, content) VALUES (200, 'Very good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +DELETE FROM comments WHERE id = 200; + +SELECT * FROM entries; +SELECT * FROM comments; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE entries; +DROP TABLE comments; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_existent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_existent.test new file mode 100644 index 000000000..0b859c834 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_existent.test @@ -0,0 +1,51 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_warnings + +CREATE TABLE comments ( + id int unsigned PRIMARY KEY, + content varchar(140) NOT NULL +); + +CREATE TABLE entries ( + content varchar(140) NOT NULL, + comment_id int unsigned, + FOREIGN KEY (comment_id) REFERENCES comments (id) +); + +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); + +SELECT * FROM entries; +SELECT * FROM comments; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE entries; +DROP TABLE comments; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_nonexistent.test new file mode 100644 index 000000000..0ed29655d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_nonexistent.test @@ -0,0 +1,51 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_warnings + +CREATE TABLE comments ( + id int unsigned PRIMARY KEY, + content varchar(140) NOT NULL +); + +CREATE TABLE entries ( + content varchar(140) NOT NULL, + comment_id int unsigned, + FOREIGN KEY (comment_id) REFERENCES comments (id) +); + +--error ER_NO_REFERENCED_ROW_2 +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 1); + +SELECT * FROM entries; +SELECT * FROM comments; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE entries; +DROP TABLE comments; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_rename.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_rename.test new file mode 100644 index 000000000..e93958bab --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_rename.test @@ -0,0 +1,51 @@ +# Copyright(C) 2013 Kentoku SHIBA +# +# 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-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/skip_mariadb_10_1.inc +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +DROP TABLE IF EXISTS articles2; +DROP TABLE IF EXISTS comments2; +--enable_warnings + +CREATE TABLE comments ( + comment int unsigned PRIMARY KEY, + content text NOT NULL +); + +CREATE TABLE articles ( + content text NOT NULL, + comment int unsigned, + FOREIGN KEY (comment) REFERENCES comments (comment) +); + +RENAME TABLE comments TO comments2; +RENAME TABLE articles TO articles2; + +SHOW CREATE TABLE articles2; + +SELECT * FROM information_schema.referential_constraints; + +DROP TABLE articles2; +DROP TABLE comments2; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_existent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_existent.test new file mode 100644 index 000000000..9b5ee9b9e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_existent.test @@ -0,0 +1,53 @@ +# Copyright(C) 2017 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-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_warnings + +CREATE TABLE comments ( + id int unsigned PRIMARY KEY, + content varchar(140) NOT NULL +); + +CREATE TABLE entries ( + content varchar(140) NOT NULL, + comment_id int unsigned, + FOREIGN KEY (comment_id) REFERENCES comments (id) +); + +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO comments (id, content) VALUES (200, 'Very good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +UPDATE entries SET comment_id = 200 WHERE content = 'Hello!'; + +SELECT * FROM entries; +SELECT * FROM comments; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE entries; +DROP TABLE comments; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_nonexistent.test new file mode 100644 index 000000000..3e0f07482 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_nonexistent.test @@ -0,0 +1,53 @@ +# Copyright(C) 2017 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-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_warnings + +CREATE TABLE comments ( + id int unsigned PRIMARY KEY, + content varchar(140) NOT NULL +); + +CREATE TABLE entries ( + content varchar(140) NOT NULL, + comment_id int unsigned, + FOREIGN KEY (comment_id) REFERENCES comments (id) +); + +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +--error ER_NO_REFERENCED_ROW_2 +UPDATE entries SET comment_id = 200 WHERE content = 'Hello!'; + +SELECT * FROM entries; +SELECT * FROM comments; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE entries; +DROP TABLE comments; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_empty_query.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_empty_query.test index 6a97baa36..4bd9ff2db 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_empty_query.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_empty_query.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_escape.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_escape.test index 6fedec681..89507f090 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_escape.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_escape.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,7 +20,7 @@ DROP TABLE IF EXISTS memos; --enable_warnings -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET NAMES UTF8; CREATE TABLE memos ( @@ -38,6 +38,6 @@ SELECT * FROM memos DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_leading_not.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_leading_not.test index 3e3c517be..a39cfebd2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_leading_not.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_leading_not.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); 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 index f927b45fb..b8d1c0b9c 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test index 1ead74d03..c59bc9d7b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test index ba8f1c1ed..bcbc4963a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test index 655bf1e8f..de10774d8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test index 9c4e92ce5..d99628494 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test index 5f1efdb79..bbebb5b5f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test index b720dcf6f..f4d2112b3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test index 82d0718d1..e6f2a7ce6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_astarisk.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_astarisk.test index c2efa7a85..d2258a399 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_astarisk.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_astarisk.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test index 29107188c..03a2ff874 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test index c5b5f2f79..97cc2623e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_operator.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_operator.test new file mode 100644 index 000000000..00bd029de --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_operator.test @@ -0,0 +1,43 @@ +# Copyright(C) 2016 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); +INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); + +SELECT *, MATCH(title, content) + AGAINST("*SS content @ '天気'" in BOOLEAN MODE) AS score + FROM diaries + WHERE MATCH(title, content) + AGAINST("*SS content @ '天気'" in BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_selector.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_selector.test new file mode 100644 index 000000000..e6034ac2a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_selector.test @@ -0,0 +1,50 @@ +# Copyright(C) 2016 Naoya Murakami +# +# 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +DROP TABLE IF EXISTS readings; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE readings ( + reading VARCHAR(255) PRIMARY KEY +) DEFAULT CHARSET=utf8 + COLLATE=utf8_bin + COMMENT='default_tokenizer "TokenDelimit"'; + +CREATE TABLE items ( + name VARCHAR(255) PRIMARY KEY, + readings TEXT COMMENT 'flags "COLUMN_VECTOR", type "readings"', + FULLTEXT INDEX items_index(readings) COMMENT 'table "readings"' +) DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES("日本", "ニホン ニッãƒãƒ³"); +INSERT INTO items VALUES("ローマ字", "ローマジ"); +INSERT INTO items VALUES("漢字", "カンジ"); + +SELECT *, MATCH(readings) + AGAINST("*SS sub_filter(readings, 'prefix_rk_search(_key, \"niho\")')" in BOOLEAN MODE) AS score + FROM items + WHERE MATCH(readings) + AGAINST("*SS sub_filter(readings, 'prefix_rk_search(_key, \"niho\")')" in BOOLEAN MODE); + +DROP TABLE items; +DROP TABLE readings; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_full_spec.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_full_spec.test index e8ad55ab4..bee227664 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_full_spec.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_full_spec.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_no_weight.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_no_weight.test index 5cc8f4154..b84eb9112 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_no_weight.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_no_weight.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_omit_section.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_omit_section.test index b85580dba..2edac1599 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_omit_section.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_omit_section.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.test index 642b438eb..583ede590 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_three_or_more_sections.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_three_or_more_sections.test index 5ea8c2179..8c4cdb79e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_three_or_more_sections.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_three_or_more_sections.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error.test index b9beffa2e..a972cc6f4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,7 +20,7 @@ DROP TABLE IF EXISTS memos; --enable_warnings -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = ERROR; SET NAMES UTF8; @@ -40,6 +40,6 @@ SELECT * FROM memos DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error_and_log.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error_and_log.test index c4195f2a5..4703fa7df 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error_and_log.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error_and_log.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,7 +20,7 @@ DROP TABLE IF EXISTS memos; --enable_warnings -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = ERROR_AND_LOG; SET NAMES UTF8; @@ -40,6 +40,6 @@ SELECT * FROM memos DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore.test index 9a45d479d..86803c724 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,7 +20,7 @@ DROP TABLE IF EXISTS memos; --enable_warnings -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = "IGNORE"; SET NAMES UTF8; @@ -39,6 +39,6 @@ SELECT * FROM memos DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore_and_log.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore_and_log.test index cf2cd503b..008063232 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore_and_log.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore_and_log.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,7 +20,7 @@ DROP TABLE IF EXISTS memos; --enable_warnings -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = IGNORE_AND_LOG; SET NAMES UTF8; @@ -39,6 +39,6 @@ SELECT * FROM memos DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_ascii.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_ascii.test index 4032ca9e6..d080d70d4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_ascii.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_ascii.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_cp932.test index b6ac95da2..db8fa2b4c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_cp932.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_cp932.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_cp932.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_eucjpms.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_eucjpms.test index c990b2885..39c89dbd7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_eucjpms.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_eucjpms.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_eucjpms.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_japanese.test index 2e457aa76..0de940534 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_japanese.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_japanese.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_utf8mb4.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_utf8mb4.test index 8fc978215..503b96106 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_utf8mb4.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_utf8mb4.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( content TEXT CHARSET utf8mb4 COLLATE utf8mb4_general_ci, FULLTEXT INDEX (content) ) DEFAULT CHARSET utf8mb4; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "Alphabet", "ABCDE"); INSERT INTO diaries VALUES(2, "Mathmatics", "ð€ðð‚ðƒð„ | U+1D400-U+1D405"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_empty_query.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_empty_query.test index 619363f0f..d97e75fef 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_empty_query.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_empty_query.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test index 41d1ab916..38fbc8bb3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -31,7 +31,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_groonga_varchar_vector.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_groonga_varchar_vector.test index e346fb1d3..e1fea8b07 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_groonga_varchar_vector.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_groonga_varchar_vector.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_index_recreate.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_index_recreate.test index 0ac152703..5aa812fcb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_index_recreate.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_index_recreate.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ create table diaries ( content text, fulltext index (title) ) default charset utf8; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); 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 4f932d5ac..2bad02c09 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_values.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_values.test index ef610b983..5c1ec53c5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_values.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_values.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -21,7 +21,6 @@ drop table if exists t1, t2, t3; --enable_warnings create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)); -show create table t1; insert into t1 values (1, "hoge hoge"); insert into t1 values (2, "fuga fuga"); insert into t1 values (3, "moge moge"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_delete.test index ab9522f6f..718d78732 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_delete.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_delete.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_insert.test index 2881d3cf1..7a4bd9b8c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_insert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_insert.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_recreate.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_recreate.test index 353e19804..174374711 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_recreate.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_recreate.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_update.test index 949cc61a4..8ccef3d68 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_update.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_update.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_index.test index 97319b711..72b617812 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ create table diaries ( fulltext index title_index (title), 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..."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_no_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_no_primary_key.test index 419224d4f..3487f704d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_no_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_no_primary_key.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES("Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES("天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_not_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_not_match_against.test index 3f7377d9c..416b61b7c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_not_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_not_match_against.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_or.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_or.test index 5c94603c0..995f92aa4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_or.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_or.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_against.test index 06afa3ce9..dc5901ef7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_against.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_match.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_match.test index c90fdf6f8..73424524f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_match.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_match.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_no_where.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_no_where.test index a230111ba..0d2963af7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_no_where.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_no_where.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_same_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_same_match_against.test index 601ffcb73..0d13720a5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_same_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_same_match_against.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc 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 index 7c0156ffd..aaef394eb 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index c422a6a67..aa1a1a2c1 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index cdb4b9f27..fd9ea74d8 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index 54206e438..c690f92e2 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index 1e84064b1..2919ad862 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index a5040dd80..485e2d84c 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_two_inner_join.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_two_inner_join.test index 17957ab82..bad8e8bc9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_two_inner_join.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_two_inner_join.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_56_no_such_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_10_0_no_such_key.test similarity index 95% rename from storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_56_no_such_key.test rename to storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_10_0_no_such_key.test index 7dbc8fca2..c1d2c6c4c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_56_no_such_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_10_0_no_such_key.test @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_56.inc +--source ../../include/mroonga/have_version_10_0.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_55_no_such_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_5_5_no_such_key.test similarity index 95% rename from storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_55_no_such_key.test rename to storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_5_5_no_such_key.test index da9de2221..7c00c29bc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_55_no_such_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_5_5_no_such_key.test @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_55.inc +--source ../../include/mroonga/have_version_5_5.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_100_no_such_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_5_6_no_such_key.test similarity index 95% rename from storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_100_no_such_key.test rename to storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_5_6_no_such_key.test index cf4c9b602..a102b4acc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_100_no_such_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_5_6_no_such_key.test @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_100.inc +--source ../../include/mroonga/have_version_5_6.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_command_auto-escape.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_auto-escape.test new file mode 100644 index 000000000..091abbc91 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_auto-escape.test @@ -0,0 +1,41 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--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 ( + title TEXT, + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES('It is Groonga'); +INSERT INTO diaries VALUES('It is Mroonga'); + +SELECT mroonga_command('select', + 'table', 'diaries', + 'filter', 'title @ "Groonga"'); + +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/function_command_select.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_select.test index 892b24c5a..501c2ac86 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_command_select.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_select.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_command_special-database-name.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_special-database-name.test new file mode 100644 index 000000000..a74acf89e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_special-database-name.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 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-1301 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 `db-1`; +CREATE DATABASE `db-1`; +USE `db-1`; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries ( + title TEXT, + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE diaries; + +--disable_query_log +USE test; +DROP DATABASE `db-1`; +--enable_query_log + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_missing.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_missing.test index 2712aab22..7eb3bba1f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_missing.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_missing.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_not_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_not_string.test index 862e98c5a..ca18a93e1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_not_string.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_not_string.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_target_characters_is_not_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_target_characters_is_not_string.test index 39f99a7c2..13adc1956 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_target_characters_is_not_string.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_target_characters_is_not_string.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_all.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_all.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_all.test rename to storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_all.test index 1dca70765..993d0b1a4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_all.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_all.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_custom.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_custom.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_custom.test rename to storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_custom.test index e70bb3f36..5b99a0ebe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_custom.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_custom.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_join.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_join.test new file mode 100644 index 000000000..63cb2b320 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_join.test @@ -0,0 +1,54 @@ +# Copyright(C) 2016 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS users; +DROP TABLE IF EXISTS queries; +--enable_warnings + +CREATE TABLE users ( + id INT +); + +CREATE TABLE queries ( + user_id INT, + query TEXT +); + +INSERT INTO users VALUES (1); +INSERT INTO users VALUES (2); +INSERT INTO users VALUES (3); + +INSERT INTO queries VALUES (1, '(a)'); +INSERT INTO queries VALUES (2, '(b)'); +INSERT INTO queries VALUES (3, '(c)'); + +SELECT users.id, mroonga_escape(queries.query) AS escaped_query + FROM queries + LEFT JOIN users ON users.id = queries.user_id + ORDER BY users.id; + +DROP TABLE queries; +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_match_against.test new file mode 100644 index 000000000..3f93ab182 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_match_against.test @@ -0,0 +1,46 @@ +# Copyright(C) 2016 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET GLOBAL mroonga_default_parser = TokenDelimit; + +SET NAMES utf8mb4; +CREATE TABLE memos ( + id INT PRIMARY KEY, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8mb4; + +INSERT INTO memos VALUES(1, "(Groonga) Installed!"); +INSERT INTO memos VALUES(2, "(Mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(Groonga) Upgraded!"); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST(mroonga_escape("(groonga)") IN BOOLEAN MODE); + +DROP TABLE memos; + +SET GLOBAL mroonga_default_parser = TokenBigram; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_named.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_named.test new file mode 100644 index 000000000..cdd431cfa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_named.test @@ -0,0 +1,26 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +SELECT mroonga_escape('+-><~*()\"\\:' AS query) AS escaped_query; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_nested.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_nested.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_nested.test rename to storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_nested.test index 503e2000b..f98c4303e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_nested.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_nested.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_decimal.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_decimal.test new file mode 100644 index 000000000..10041ef83 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_decimal.test @@ -0,0 +1,39 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS data; +--enable_warnings + +CREATE TABLE data ( + value DECIMAL(5, 3) +); + +INSERT INTO data VALUES (2.9); + +SELECT mroonga_escape(value AS script) + FROM data; + +DROP TABLE data; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_integer.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_integer.test new file mode 100644 index 000000000..141def4f8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_integer.test @@ -0,0 +1,26 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +SELECT mroonga_escape(-29 AS script) AS escaped_query; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_real.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_real.test new file mode 100644 index 000000000..663fa69ab --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_real.test @@ -0,0 +1,39 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS data; +--enable_warnings + +CREATE TABLE data ( + value REAL +); + +INSERT INTO data VALUES (2.9); + +SELECT mroonga_escape(value AS script) + FROM data; + +DROP TABLE data; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_string.test new file mode 100644 index 000000000..864cef607 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_string.test @@ -0,0 +1,26 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +SELECT mroonga_escape('a\"\\\'z' AS script) AS escaped_query; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_dynamic_keyword.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_dynamic_keyword.test new file mode 100644 index 000000000..09bdde1c3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_dynamic_keyword.test @@ -0,0 +1,45 @@ +# Copyright(C) 2015-2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + + +--disable_warnings +--disable_query_log +DROP TABLE IF EXISTS keywords; +--enable_query_log +--enable_warnings + +CREATE TABLE keywords ( + keyword text +); + +INSERT INTO keywords VALUES ('Mroonga'); +INSERT INTO keywords VALUES ('Groonga'); + +SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', + keyword) AS highlighted + FROM keywords; + +--disable_query_log +DROP TABLE keywords; +--enable_query_log + + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_japanese.test new file mode 100644 index 000000000..10f44e446 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_japanese.test @@ -0,0 +1,31 @@ +# Copyright(C) 2015-2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES utf8; + +SELECT mroonga_highlight_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', + 'ロック', 'æ›´æ–°') AS highlighted; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_multiple_keywords.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_multiple_keywords.test new file mode 100644 index 000000000..185842e77 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_multiple_keywords.test @@ -0,0 +1,25 @@ +# Copyright(C) 2015-2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', + 'Mroonga', 'Groonga') AS highlighted; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_normalizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_normalizer.test new file mode 100644 index 000000000..19c1ae826 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_normalizer.test @@ -0,0 +1,25 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', + 'mroonga') AS highlighted; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query.test new file mode 100644 index 000000000..089a1d4eb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query.test @@ -0,0 +1,31 @@ +# Copyright(C) 2016-2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES utf8; + +SELECT mroonga_highlight_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', + 'ロック æ›´æ–° -ボトルãƒãƒƒã‚¯' AS query) AS highlighted; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query_pragma.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query_pragma.test new file mode 100644 index 000000000..3ba38c0b8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query_pragma.test @@ -0,0 +1,31 @@ +# Copyright(C) 2017-2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES utf8; + +SELECT mroonga_highlight_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', + '*D- +ロック +æ›´æ–° ボトルãƒãƒƒã‚¯' AS query) AS highlighted; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_record.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_record.test new file mode 100644 index 000000000..db5b06ecd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_record.test @@ -0,0 +1,55 @@ +# Copyright(C) 2015-2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +--disable_query_log +DROP TABLE IF EXISTS memos; +--enable_query_log +--enable_warnings + +CREATE TABLE memos ( + content text +); + +INSERT INTO memos VALUES ('Mroonga is a MySQL storage engine based on Groonga, the full text search engine. + +In MySQL 5.1 or later, Pluggable Storage Engine interface is introduced, and we can use custom storage engines easily. So we implement Mroonga, so that we can use Groonga through MySQL. + +By using Mroonga, you can use Groonga with SQL.'); + +INSERT INTO memos VALUES ('Since Tritonn was the modified version of MySQL, we need to build it by ourselves or use binary files provided by Tritonn project, thus we cannot use the official binary files provided by MySQL. + +On the other hand, Mroonga is an independent program (shared library) using Pluggable Storage Engine interface, and we can dynamically load it on MySQL''s official binary. So we can use it more easily than Tritonn.'); + +INSERT INTO memos VALUES ('Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga''s fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga''s read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data.'); + +SELECT mroonga_highlight_html(content, 'Mroonga') AS highlighted + FROM memos; + +--disable_query_log +DROP TABLE memos; +--enable_query_log + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_grn_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_grn_id.test index 5d80d5230..da116a4a5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_grn_id.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_grn_id.test @@ -14,7 +14,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_reference.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_reference.test index 98e8d9dab..1ba332c4d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_reference.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_reference.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_set.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_set.test index 41f9d3684..1fdd0a605 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_set.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_set.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_default.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_default.test new file mode 100644 index 000000000..d5159b88c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_default.test @@ -0,0 +1,24 @@ +# Copyright(C) 2015 Naoya Murakami +# +# 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SELECT mroonga_normalize('aBcAbCã‘'); + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_normalizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_normalizer.test new file mode 100644 index 000000000..9631313d7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_normalizer.test @@ -0,0 +1,24 @@ +# Copyright(C) 2015 Naoya Murakami +# +# 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SELECT mroonga_normalize('aBcAbCã‘', "NormalizerAuto"); + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_record.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_record.test new file mode 100644 index 000000000..88ee40fc6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_record.test @@ -0,0 +1,40 @@ +# Copyright(C) 2015 Naoya Murakami +# +# 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +--disable_query_log +DROP TABLE IF EXISTS memos; +--enable_query_log +--enable_warnings + +CREATE TABLE memos ( + content text +); + +INSERT INTO memos VALUES ('aBcAbCã‘'); + +SELECT mroonga_normalize(content) FROM memos; + +--disable_query_log +DROP TABLE memos; +--enable_query_log + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_multiple.test new file mode 100644 index 000000000..ee80cd8b9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_multiple.test @@ -0,0 +1,46 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS synonyms; +--enable_warnings + +CREATE TABLE synonyms ( + term varchar(255), + synonym varchar(255), + INDEX (term) +); + +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); +INSERT INTO synonyms VALUES ('Mroonga', 'Mroonga'); +INSERT INTO synonyms VALUES ('Mroonga', 'Groonga MySQL'); + +SELECT mroonga_query_expand('synonyms', + 'term', + 'synonym', + 'Mroonga Rroonga PGroonga') AS query; + +DROP TABLE synonyms; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_no_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_no_index.test new file mode 100644 index 000000000..1a2c9d844 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_no_index.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS synonyms; +--enable_warnings + +CREATE TABLE synonyms ( + term varchar(255), + synonym varchar(255) +); + +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); + +SELECT mroonga_query_expand('synonyms', + 'term', + 'synonym', + 'Mroonga Rroonga PGroonga') AS query; + +DROP TABLE synonyms; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_one.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_one.test new file mode 100644 index 000000000..50e4fc558 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_one.test @@ -0,0 +1,44 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS synonyms; +--enable_warnings + +CREATE TABLE synonyms ( + term varchar(255), + synonym varchar(255), + INDEX (term) +); + +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); + +SELECT mroonga_query_expand('synonyms', + 'term', + 'synonym', + 'Mroonga Rroonga PGroonga') AS query; + +DROP TABLE synonyms; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_pragma.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_pragma.test new file mode 100644 index 000000000..2a8aad83d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_pragma.test @@ -0,0 +1,45 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS synonyms; +--enable_warnings + +CREATE TABLE synonyms ( + term varchar(255), + synonym varchar(255), + INDEX (term) +); + +INSERT INTO synonyms VALUES ('D+', '[D+]'); +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); + +SELECT mroonga_query_expand('synonyms', + 'term', + 'synonym', + '*D+ Mroonga Rroonga PGroonga') AS query; + +DROP TABLE synonyms; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_ascii.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_ascii.test index 0cb551dbc..028bdb750 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_ascii.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_ascii.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_cp932.test index 338417021..2d85633ab 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_cp932.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_cp932.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source include/have_cp932.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_eucjpms.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_eucjpms.test index fa8dbb20e..525c14a30 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_eucjpms.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_eucjpms.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source include/have_eucjpms.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_dynamic_keyword.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_dynamic_keyword.test new file mode 100644 index 000000000..5faed5188 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_dynamic_keyword.test @@ -0,0 +1,45 @@ +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + + +--disable_warnings +--disable_query_log +DROP TABLE IF EXISTS keywords; +--enable_query_log +--enable_warnings + +CREATE TABLE keywords ( + keyword text +); + +INSERT INTO keywords VALUES ('Mroonga'); +INSERT INTO keywords VALUES ('Groonga'); + +SELECT mroonga_snippet_html('Mroonga is the Groonga based storage engine.', + keyword) as snippet + FROM keywords; + +--disable_query_log +DROP TABLE keywords; +--enable_query_log + + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_japanese.test new file mode 100644 index 000000000..c01d29885 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_japanese.test @@ -0,0 +1,31 @@ +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES utf8; + +SELECT mroonga_snippet_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', + 'ロック', 'æ›´æ–°') as snippet; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_keywords.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_keywords.test new file mode 100644 index 000000000..60d206d2b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_keywords.test @@ -0,0 +1,25 @@ +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SELECT mroonga_snippet_html('Mroonga is the Groonga based storage engine.', + 'Mroonga', 'Groonga') as snippet; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_snippets.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_snippets.test new file mode 100644 index 000000000..b4dfd0c5f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_snippets.test @@ -0,0 +1,29 @@ +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SELECT mroonga_snippet_html('Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga''s fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga''s read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data.', + 'lock') as snippet; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query.test new file mode 100644 index 000000000..998a080c7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query.test @@ -0,0 +1,31 @@ +# Copyright(C) 2016 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES utf8; + +SELECT mroonga_snippet_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', + 'ロック æ›´æ–° -ボトルãƒãƒƒã‚¯' AS query) as snippet; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query_pragma.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query_pragma.test new file mode 100644 index 000000000..b01dcbcd5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query_pragma.test @@ -0,0 +1,31 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES utf8; + +SELECT mroonga_snippet_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', + '*D- +ロック +æ›´æ–° ボトルãƒãƒƒã‚¯' AS query) as snippet; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_record.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_record.test new file mode 100644 index 000000000..59163fe45 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_record.test @@ -0,0 +1,55 @@ +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +--disable_query_log +DROP TABLE IF EXISTS memos; +--enable_query_log +--enable_warnings + +CREATE TABLE memos ( + content text +); + +INSERT INTO memos VALUES ('Mroonga is a MySQL storage engine based on Groonga, the full text search engine. + +In MySQL 5.1 or later, Pluggable Storage Engine interface is introduced, and we can use custom storage engines easily. So we implement Mroonga, so that we can use Groonga through MySQL. + +By using Mroonga, you can use Groonga with SQL.'); + +INSERT INTO memos VALUES ('Since Tritonn was the modified version of MySQL, we need to build it by ourselves or use binary files provided by Tritonn project, thus we cannot use the official binary files provided by MySQL. + +On the other hand, Mroonga is an independent program (shared library) using Pluggable Storage Engine interface, and we can dynamically load it on MySQL''s official binary. So we can use it more easily than Tritonn.'); + +INSERT INTO memos VALUES ('Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga''s fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga''s read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data.'); + +SELECT mroonga_snippet_html(content, 'Mroonga') as snippet + FROM memos; + +--disable_query_log +DROP TABLE memos; +--enable_query_log + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_nonexistent_charset.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_nonexistent_charset.test index a4e24ce03..2547000aa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_nonexistent_charset.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_nonexistent_charset.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_unsupported_charset.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_unsupported_charset.test index 4df02c14e..e8805b492 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_unsupported_charset.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_unsupported_charset.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_japanese.test index 3d41de6a9..1678a3ed2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_japanese.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_japanese.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.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 2397bdd9c..887d8fb51 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 @@ -12,11 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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_version_5_6_or_later.inc +--source ../../include/mroonga/skip_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings 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 4aed7b247..94d802407 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test @@ -1,4 +1,4 @@ -# Copyright(C) 2011-2012 Kouhei Sutou +# Copyright(C) 2011-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc +--source ../../include/mroonga/skip_mysql_5_7.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -28,7 +29,6 @@ CREATE TABLE shops ( location GEOMETRY NOT NULL, SPATIAL KEY location_index (location) ); -SHOW CREATE TABLE shops; INSERT INTO shops (name, location) VALUES ('nezu-no-taiyaki', @@ -144,6 +144,11 @@ 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; +EXPLAIN +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; --source ../../include/mroonga/have_mroonga_deinit.inc 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_strict_sql_mode_bulk_insert_null.test similarity index 86% rename from storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null_57.test rename to storage/mroonga/mysql-test/mroonga/storage/t/geometry_strict_sql_mode_bulk_insert_null.test index 00efe1e4a..2fd4fad68 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null_57.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_strict_sql_mode_bulk_insert_null.test @@ -1,5 +1,5 @@ # Copyright(C) 2014 Kenji Maruyama -# Copyright(C) 2015 Kouhei Sutou +# Copyright(C) 2015-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -13,10 +13,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_geometry.inc ---source ../../include/mroonga/have_version_57.inc +--source ../../include/mroonga/have_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -27,9 +27,8 @@ CREATE TABLE shops ( location GEOMETRY NOT NULL ); -SET SESSION sql_mode = ''; +--error ER_BAD_NULL_ERROR INSERT INTO shops VALUES (NULL), (NULL); -SET SESSION sql_mode = default; SELECT ST_AsText(location) FROM shops; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_strict_sql_mode_contains.test b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_strict_sql_mode_contains.test new file mode 100644 index 000000000..605e03833 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_strict_sql_mode_contains.test @@ -0,0 +1,152 @@ +# Copyright(C) 2011-2016 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-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS shops; +--enable_warnings + +CREATE TABLE shops ( + id INT PRIMARY KEY AUTO_INCREMENT, + name TEXT, + location GEOMETRY NOT NULL, + SPATIAL KEY location_index (location) +); + +INSERT INTO shops (name, location) + VALUES ('nezu-no-taiyaki', + ST_GeomFromText('POINT(139.762573 35.720253)')); +INSERT INTO shops (name, location) + VALUES ('taiyaki-kataoka', + ST_GeomFromText('POINT(139.715591 35.712521)')); +INSERT INTO shops (name, location) + VALUES ('soba-taiyaki-ku', + ST_GeomFromText('POINT(139.659088 35.683712)')); +INSERT INTO shops (name, location) + VALUES ('kuruma', + ST_GeomFromText('POINT(139.706207 35.721516)')); +INSERT INTO shops (name, location) + VALUES ('hirose-ya', + ST_GeomFromText('POINT(139.685608 35.714844)')); +INSERT INTO shops (name, location) + VALUES ('sazare', + ST_GeomFromText('POINT(139.685043 35.714653)')); +INSERT INTO shops (name, location) + VALUES ('omede-taiyaki', + ST_GeomFromText('POINT(139.817154 35.700516)')); +INSERT INTO shops (name, location) + VALUES ('onaga-ya', + ST_GeomFromText('POINT(139.81105 35.698254)')); +INSERT INTO shops (name, location) + VALUES ('shiro-ya', + ST_GeomFromText('POINT(139.638611 35.705517)')); +INSERT INTO shops (name, location) + VALUES ('fuji-ya', + ST_GeomFromText('POINT(139.637115 35.703938)')); +INSERT INTO shops (name, location) + VALUES ('miyoshi', + ST_GeomFromText('POINT(139.537323 35.644539)')); +INSERT INTO shops (name, location) + VALUES ('juju-ya', + ST_GeomFromText('POINT(139.695755 35.628922)')); +INSERT INTO shops (name, location) + VALUES ('tatsumi-ya', + ST_GeomFromText('POINT(139.638657 35.665501)')); +INSERT INTO shops (name, location) + VALUES ('tetsuji', + ST_GeomFromText('POINT(139.76857 35.680912)')); +INSERT INTO shops (name, location) + VALUES ('gazuma-ya', + ST_GeomFromText('POINT(139.647598 35.700817)')); +INSERT INTO shops (name, location) + VALUES ('honma-mon', + ST_GeomFromText('POINT(139.652573 35.722736)')); +INSERT INTO shops (name, location) + VALUES ('naniwa-ya', + ST_GeomFromText('POINT(139.796234 35.730061)')); +INSERT INTO shops (name, location) + VALUES ('kuro-dai', + ST_GeomFromText('POINT(139.704834 35.650345)')); +INSERT INTO shops (name, location) + VALUES ('daruma', + ST_GeomFromText('POINT(139.770599 35.681461)')); +INSERT INTO shops (name, location) + VALUES ('yanagi-ya', + ST_GeomFromText('POINT(139.783981 35.685341)')); +INSERT INTO shops (name, location) + VALUES ('sharaku', + ST_GeomFromText('POINT(139.794846 35.716969)')); +INSERT INTO shops (name, location) + VALUES ('takane', + ST_GeomFromText('POINT(139.560913 35.698601)')); +INSERT INTO shops (name, location) + VALUES ('chiyoda', + ST_GeomFromText('POINT(139.652817 35.642601)')); +INSERT INTO shops (name, location) + VALUES ('da-ka-po', + ST_GeomFromText('POINT(139.727356 35.627346)')); +INSERT INTO shops (name, location) + VALUES ('matsushima-ya', + ST_GeomFromText('POINT(139.737381 35.640556)')); +INSERT INTO shops (name, location) + VALUES ('kazuya', + ST_GeomFromText('POINT(139.760895 35.673508)')); +INSERT INTO shops (name, location) + VALUES ('furuya-kogane-an', + ST_GeomFromText('POINT(139.676071 35.680603)')); +INSERT INTO shops (name, location) + VALUES ('hachi-no-ie', + ST_GeomFromText('POINT(139.668106 35.608021)')); +INSERT INTO shops (name, location) + VALUES ('azuki-chan', + ST_GeomFromText('POINT(139.673203 35.64151)')); +INSERT INTO shops (name, location) + VALUES ('kuriko-an', + ST_GeomFromText('POINT(139.796829 35.712013)')); +INSERT INTO shops (name, location) + VALUES ('yume-no-aru-machi-no-taiyaki-ya-san', + ST_GeomFromText('POINT(139.712524 35.616199)')); +INSERT INTO shops (name, location) + VALUES ('naze-ya', + ST_GeomFromText('POINT(139.665833 35.609039)')); +INSERT INTO shops (name, location) + VALUES ('sanoki-ya', + ST_GeomFromText('POINT(139.770721 35.66592)')); +INSERT INTO shops (name, location) + VALUES ('shigeta', + ST_GeomFromText('POINT(139.780273 35.672626)')); +INSERT INTO shops (name, location) + VALUES ('nishimi-ya', + ST_GeomFromText('POINT(139.774628 35.671825)')); +INSERT INTO shops (name, location) + VALUES ('hiiragi', + 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) + ORDER BY id; + +EXPLAIN +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; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_datetime.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_datetime.test index 0354e9b7e..ccc51b79e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_datetime.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_datetime.test @@ -14,11 +14,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_time.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_time.test index a1429859a..478ae97ba 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_time.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_time.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_timestamp.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_timestamp.test index 0f63eed4b..a1c43cc41 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_timestamp.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_timestamp.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_normal_column_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_normal_column_insert.test index dcf029593..f342c049f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_normal_column_insert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_normal_column_insert.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_normal.test index a28a912e2..bfb3f4563 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_normal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_normal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test index dd0b6ba44..7925f4ffc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test @@ -1,4 +1,5 @@ # Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2016-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,24 +13,28 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/skip_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings -drop table if exists t1, t2, t3; +DROP TABLE IF EXISTS t1; --enable_warnings -create table t1 (_id int, a int, primary key (_id) using hash); +CREATE TABLE t1 (_id int, a int, PRIMARY KEY (_id) USING HASH); + --error ER_BAD_NULL_ERROR -insert into t1 values(null, 100); -insert into t1 values(1,100); -insert into t1 values(1,100); -insert into t1 values(1,100); -insert into t1 values(1,100); -select * from t1; -select * from t1 where _id = 2; -select * from t1 where _id = 20; -drop table t1; +INSERT INTO t1 VALUES(null, 100); +INSERT INTO t1 VALUES(1,100); +INSERT INTO t1 VALUES(1,100); +INSERT INTO t1 VALUES(1,100); +INSERT INTO t1 VALUES(1,100); + +SELECT * FROM t1; +SELECT * FROM t1 WHERE _id = 2; +SELECT * FROM t1 WHERE _id = 20; + +DROP TABLE t1; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_unique.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_unique.test index 8f1e6b889..bf665e83b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_unique.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_unique.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_normal_column_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_normal_column_insert.test index acb298ef8..e9f203876 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_normal_column_insert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_normal_column_insert.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_strict_sql_mode_id_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_strict_sql_mode_id_primary.test new file mode 100644 index 000000000..b2629c806 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_strict_sql_mode_id_primary.test @@ -0,0 +1,44 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2016-2017 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-1301 USA + +--source ../../include/mroonga/have_strict_sql_mode.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (_id int, a int, PRIMARY KEY (_id) USING HASH); + +--error ER_BAD_NULL_ERROR +INSERT INTO t1 VALUES(null, 100); +--error 1265 +INSERT INTO t1 VALUES(1,100); +--error 1265 +INSERT INTO t1 VALUES(1,100); +--error 1265 +INSERT INTO t1 VALUES(1,100); +--error 1265 +INSERT INTO t1 VALUES(1,100); + +SELECT * FROM t1; +SELECT * FROM t1 WHERE _id = 2; +SELECT * FROM t1 WHERE _id = 20; + +DROP TABLE t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_delete.test index ebf331d2f..5cb0eed10 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_delete.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_delete.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test index 5afdd36b5..c5d97a297 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_bigint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_bigint.test index 314dbd85d..be7b7eefd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_bigint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_bigint.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_int.test index 82372d635..23e75a580 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_int.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_smallint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_smallint.test index a221c40dc..eef9de2d0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_smallint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_smallint.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_varchar.test index b765bab67..8d2d6c92a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_varchar.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_asc_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_asc_asc.test new file mode 100644 index 000000000..521061cdf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_asc_asc.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + score3 INT, + INDEX (score1, score2, score3) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, score3) VALUES(1, 10, -100); +INSERT INTO items (score1, score2, score3) VALUES(1, 10, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 10, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 100); + +SELECT * + FROM items + WHERE score1 = 2 + ORDER BY score2 ASC, score3 ASC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_desc_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_desc_desc.test new file mode 100644 index 000000000..d48c0e56b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_desc_desc.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + score3 INT, + INDEX (score1, score2, score3) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, score3) VALUES(1, 10, -100); +INSERT INTO items (score1, score2, score3) VALUES(1, 10, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 10, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 100); + +SELECT * + FROM items + WHERE score1 = 2 + ORDER BY score2 DESC, score3 DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_delete.test index 40b39fe85..92a830880 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_delete.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_delete.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_select_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_select_int.test index 52cee4c7b..8978ee2af 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_select_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_select_int.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_strict_sql_mode_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_strict_sql_mode_update.test new file mode 100644 index 000000000..6abe39795 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_strict_sql_mode_update.test @@ -0,0 +1,47 @@ +# Copyright(C) 2011-2017 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-1301 USA + +--source ../../include/mroonga/have_strict_sql_mode.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS scores; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE scores ( + name char(30) NOT NULL, + score int NOT NULL, + PRIMARY KEY (name, score) +) DEFAULT CHARSET=utf8; + +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES ("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 10); + +SELECT * FROM scores; + +--error 1265 +UPDATE scores SET name = "Taro Yamada" + WHERE name = "Jiro Yamada" AND score = 27; + +SELECT * FROM scores + WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test index 0568da450..64292cf18 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test @@ -1,4 +1,4 @@ -# Copyright(C) 2011 Kouhei Sutou +# Copyright(C) 2011-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,28 +12,35 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/skip_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings -drop table if exists listing; +DROP TABLE IF EXISTS scores; --enable_warnings -set names utf8; -create table scores ( - name char(30) not null, - score int not null, - primary key (name, score) -) default charset utf8; -show create table scores; -insert into scores (name, score) values("Taro Yamada", 29); -insert into scores (name, score) values("Taro Yamada", -12); -insert into scores (name, score) values("Jiro Yamada", 27); -insert into scores (name, score) values("Taro Yamada", 10); -select * from scores; -update scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27; -select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); -drop table scores; +SET NAMES utf8; +CREATE TABLE scores ( + name char(30) NOT NULL, + score int NOT NULL, + PRIMARY KEY (name, score) +) DEFAULT CHARSET=utf8; + +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES ("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 10); + +SELECT * FROM scores; + +UPDATE scores SET name = "Taro Yamada" + WHERE name = "Jiro Yamada" AND score = 27; + +SELECT * FROM scores + WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); + +DROP TABLE scores; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_greater_than.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_greater_than.test rename to storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_greater_than.test index 431f12349..0cfbea670 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_greater_than.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_greater_than_or_equal.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_greater_than_or_equal.test rename to storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_greater_than_or_equal.test index bc739fdfb..e5543a66b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_greater_than_or_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_less_than.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_less_than.test rename to storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_less_than.test index a3c3b7663..e326aca26 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_less_than.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_less_than_or_equal.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_less_than_or_equal.test rename to storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_less_than_or_equal.test index 3cbac1c1f..d2e09033f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_less_than_or_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than.test new file mode 100644 index 000000000..49d0d7798 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than.test @@ -0,0 +1,50 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE score1 = 2 AND created_at > "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.test new file mode 100644 index 000000000..d8e90a15d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.test @@ -0,0 +1,50 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE score1 = 2 AND created_at >= "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than.test new file mode 100644 index 000000000..317517f4c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than.test @@ -0,0 +1,50 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE score1 = 2 AND created_at < "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.test new file mode 100644 index 000000000..310cc4764 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.test @@ -0,0 +1,50 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE score1 = 2 AND created_at <= "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than.test new file mode 100644 index 000000000..7449e21ef --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than.test @@ -0,0 +1,44 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# +# 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE created_at > "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.test new file mode 100644 index 000000000..3ea5db149 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.test @@ -0,0 +1,44 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# +# 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE created_at >= "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than.test new file mode 100644 index 000000000..50e9ca0d7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than.test @@ -0,0 +1,44 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# +# 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE created_at < "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.test new file mode 100644 index 000000000..125143d71 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.test @@ -0,0 +1,45 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE created_at <= "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_recreate.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_recreate.test index 430b3bb94..c674388e1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_recreate.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_recreate.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_replace.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_replace.test index 18db29cc8..4bffa8c39 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_replace.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_replace.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_double.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_double.test index 07ab3d380..01139dc63 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_double.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_double.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_float.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_float.test index 567d32e0f..902750ba2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_float.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_float.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_int.test index 0658bbced..4172666fa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_int.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_max.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_max.test new file mode 100644 index 000000000..2077b9144 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_max.test @@ -0,0 +1,44 @@ +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS listing; +--enable_warnings + +CREATE TABLE scores ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT NOT NULL, + score2 INT NOT NULL, + INDEX (score1, score2) +) DEFAULT CHARSET=UTF8; + +INSERT INTO scores (score1, score2) VALUES(1, 1); +INSERT INTO scores (score1, score2) VALUES(1, 2); +INSERT INTO scores (score1, score2) VALUES(2, 3); +INSERT INTO scores (score1, score2) VALUES(2, 2); +INSERT INTO scores (score1, score2) VALUES(2, 1); +INSERT INTO scores (score1, score2) VALUES(2, 0); +INSERT INTO scores (score1, score2) VALUES(2, -1); +INSERT INTO scores (score1, score2) VALUES(2, -2); +INSERT INTO scores (score1, score2) VALUES(2, -3); + +SELECT MAX(score2) FROM scores WHERE score1 = 2; + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_min.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_min.test new file mode 100644 index 000000000..8541aadda --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_min.test @@ -0,0 +1,44 @@ +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS listing; +--enable_warnings + +CREATE TABLE scores ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT NOT NULL, + score2 INT NOT NULL, + INDEX (score1, score2) +) DEFAULT CHARSET=UTF8; + +INSERT INTO scores (score1, score2) VALUES(1, 1); +INSERT INTO scores (score1, score2) VALUES(1, 2); +INSERT INTO scores (score1, score2) VALUES(2, 3); +INSERT INTO scores (score1, score2) VALUES(2, 2); +INSERT INTO scores (score1, score2) VALUES(2, 1); +INSERT INTO scores (score1, score2) VALUES(2, 0); +INSERT INTO scores (score1, score2) VALUES(2, -1); +INSERT INTO scores (score1, score2) VALUES(2, -2); +INSERT INTO scores (score1, score2) VALUES(2, -3); + +SELECT MIN(score2) FROM scores WHERE score1 = 2; + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_string.test index a79567bde..936a57bc2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_string.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_string.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_varchar.test index 7c9af9aa9..4778da9af 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_varchar.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test index adc1c8823..1f6151508 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test @@ -13,9 +13,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test index c842ff428..1323b4ce4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test @@ -14,12 +14,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -33,13 +31,13 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (1, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-02", "9999-12-31"); INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-02"); SELECT * FROM ranges FORCE INDEX(range_key) - WHERE start = "1000-01-01" AND end = "9999-12-31"; + WHERE start = "1000-01-02" AND end = "9999-12-31"; DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_index_read.test index 708ba0b44..666b9566e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_index_read.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_index_read.test @@ -14,11 +14,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -32,10 +31,10 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (1, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-02", "9999-12-31"); INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-02"); SELECT start, end FROM ranges FORCE INDEX(range_key) diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test index 94a73a363..0f4306b3e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test @@ -13,9 +13,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test index 6dc1ef845..939d885a6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test @@ -13,9 +13,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test index 92bd9915a..89108b727 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test @@ -14,12 +14,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -34,9 +32,9 @@ CREATE TABLE ranges ( ); INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); -INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-02"); +INSERT INTO ranges VALUES (4, "1000-01-02", "9999-12-31"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start, end; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test index a25cd4d87..3cb5bcae3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test @@ -14,12 +14,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -34,9 +32,9 @@ CREATE TABLE ranges ( ); INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); -INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-02"); +INSERT INTO ranges VALUES (4, "1000-01-02", "9999-12-31"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start DESC, end DESC; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_reinsert.test index 6a04c4a9d..182f185a0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_reinsert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_reinsert.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test index 0807e78c0..d33d2c1f8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test @@ -14,12 +14,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -33,10 +31,10 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); -INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (1, "1000-01-02 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (2, "1000-01-02 00:00:00", "9999-12-31 23:59:59"); INSERT INTO ranges VALUES (3, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); -INSERT INTO ranges VALUES (4, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); +INSERT INTO ranges VALUES (4, "9999-12-31 23:59:59", "1000-01-02 00:00:00"); SELECT start, end FROM ranges FORCE INDEX(range_key) diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test index f20c2fd13..fb647f5c6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test @@ -1,4 +1,4 @@ -# Copyright(C) 2015 Kouhei Sutou +# Copyright(C) 2015-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/skip_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test index 3fcc92f7a..b4b5f500c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test @@ -14,12 +14,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -34,9 +32,9 @@ CREATE TABLE ranges ( ); INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); -INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); -INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); -INSERT INTO ranges VALUES (4, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (2, "1000-01-02 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-02 00:00:00"); +INSERT INTO ranges VALUES (4, "1000-01-02 00:00:00", "9999-12-31 23:59:59"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start, end; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test index 4d25f29cf..a2c456425 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test @@ -14,12 +14,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -34,9 +32,9 @@ CREATE TABLE ranges ( ); INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); -INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); -INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); -INSERT INTO ranges VALUES (4, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (2, "1000-01-02 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-02 00:00:00"); +INSERT INTO ranges VALUES (4, "1000-01-02 00:00:00", "9999-12-31 23:59:59"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start DESC, end DESC; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_reinsert.test index eb6df3af8..bd360544e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_reinsert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_reinsert.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_decimal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_decimal.test index faf590d84..38265a6ed 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_decimal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_decimal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_index_read.test index 52e4113dc..fa4780d54 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_index_read.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_index_read.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_asc.test index a8e36f2ff..af3394b1f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_asc.test @@ -13,9 +13,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_desc.test index c13ed51cf..bc8a7e723 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_desc.test @@ -13,9 +13,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_reinsert.test index 497010df0..63f708afb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_reinsert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_reinsert.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test index 2ee8ae466..7e7357108 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test @@ -1,5 +1,5 @@ # Copyright(C) 2012 Kentoku SHIBA -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -23,8 +23,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, - start timestamp, - end timestamp, + start timestamp DEFAULT '2016-04-21 00:00:00', + end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test index efb7ab70a..3f337d055 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test @@ -13,9 +13,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -24,8 +24,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, - start timestamp, - end timestamp, + start timestamp DEFAULT '2016-04-21 00:00:00', + end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test index 1b1e62951..6dbc49388 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test @@ -1,5 +1,5 @@ # Copyright(C) 2012 Kentoku SHIBA -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -13,9 +13,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -24,8 +24,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, - start timestamp, - end timestamp, + start timestamp DEFAULT '2016-04-21 00:00:00', + end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test index 74bd0eb13..7a1bd6bc7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test @@ -1,5 +1,5 @@ # Copyright(C) 2012 Kentoku SHIBA -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -23,8 +23,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, - start timestamp, - end timestamp, + start timestamp DEFAULT '2016-04-21 00:00:00', + end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_varchar.test index e116e7a25..67ae21224 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_varchar.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test index 45be9e2b9..a0277c18c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test @@ -13,9 +13,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_64bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_64bit_equal.test index 2505b47b1..21a3b936a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_64bit_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_64bit_equal.test @@ -13,11 +13,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc ---source ../../include/mroonga/skip_osx.inc --disable_warnings DROP TABLE IF EXISTS ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_index_read.test index b475b857f..fa91ca317 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_index_read.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_index_read.test @@ -13,11 +13,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc ---source ../../include/mroonga/skip_osx.inc --disable_warnings DROP TABLE IF EXISTS ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test index 47e4d7c24..1539d9a77 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test @@ -13,9 +13,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test index 88a09a18a..92492d599 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test @@ -13,9 +13,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_asc.test index 5a4525fe7..226a51b43 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_asc.test @@ -13,11 +13,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc ---source ../../include/mroonga/skip_osx.inc --disable_warnings DROP TABLE IF EXISTS ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_desc.test index 8865c3610..0f1830ff6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_desc.test @@ -13,11 +13,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc ---source ../../include/mroonga/skip_osx.inc --disable_warnings DROP TABLE IF EXISTS ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_reinsert.test index e7ac3a8a9..b80986c39 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_reinsert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_reinsert.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_int.test index d1c23dfbc..0d303496a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_int.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_string.test index 19fc2c36d..e250885d0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_string.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_string.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_exact_length.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_exact_length.test index 37cd919eb..a954ffd4e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_exact_length.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_exact_length.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_null_character.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_null_character.test index 9cdee6b1e..19cedaffc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_null_character.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_null_character.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_short.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_short.test index 1e1029d0d..9228b1ffb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_short.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_short.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_date.test index 9b94d3158..dc9db9652 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_date.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_date.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE diaries ( day DATE PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (day, title) VALUES ("2012-01-29", "clear day"); INSERT INTO diaries (day, title) VALUES ("2012-01-30", "rainy day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_with_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_with_fractional_seconds.test index 44a9fcaca..7ddd48617 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_with_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_with_fractional_seconds.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_fractional_seconds.inc --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE diaries ( day DATETIME(6) PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (day, title) VALUES ("2012-01-29 21:51:01.111111", "clear day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_without_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_without_fractional_seconds.test index 82b663267..aba0d8755 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_without_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_without_fractional_seconds.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE diaries ( day DATETIME PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (day, title) VALUES ("2012-01-29 21:51:01", "clear day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_with_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_with_fractional_seconds.test index c9134275c..4e2bd44d2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_with_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_with_fractional_seconds.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE releases ( version DECIMAL(6, 3) PRIMARY KEY, message TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE releases; INSERT INTO releases (version, message) VALUES (10.000, "10th release!"); INSERT INTO releases (version, message) VALUES (10.001, "minor fix."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_without_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_without_fractional_seconds.test index f9cdd093f..a5073a633 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_without_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_without_fractional_seconds.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE releases ( version DECIMAL PRIMARY KEY, message TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE releases; INSERT INTO releases (version, message) VALUES (1, "the first release!!!"); INSERT INTO releases (version, message) VALUES (10, "10th release!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_with_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_with_fractional_seconds.test index 7b8f48e18..bf61a4fbd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_with_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_with_fractional_seconds.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_fractional_seconds.inc @@ -25,7 +25,6 @@ CREATE TABLE running_records ( time TIME(6) PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; INSERT INTO running_records (time, title) VALUES ("01:00:00.000001", "normal condition"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_without_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_without_fractional_seconds.test index d71dd6485..6e5c369ff 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_without_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_without_fractional_seconds.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE running_records ( time TIME PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; INSERT INTO running_records (time, title) VALUES ("01:00:00", "normal condition"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_with_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_with_fractional_seconds.test index f59ee6273..1eb103b76 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_with_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_with_fractional_seconds.test @@ -12,9 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/skip_mariadb_55.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc --source ../../include/mroonga/have_fractional_seconds.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( time TIMESTAMP(6) PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (time, title) VALUES ("2012-01-29 21:51:01.111111", "clear day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_without_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_without_fractional_seconds.test index 7d8c17783..341dfd21c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_without_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_without_fractional_seconds.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE diaries ( time TIMESTAMP PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (time, title) VALUES ("2012-01-29 21:51:01", "clear day"); INSERT INTO diaries (time, title) VALUES ("2012-01-30 01:23:45", "rainy day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_varchar_null_character.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_varchar_null_character.test index 9c8e4e46c..a610944d8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_varchar_null_character.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_varchar_null_character.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_year.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_year.test index 6236b2d96..a390eba41 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_year.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_year.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE aniversary_memos ( party_year YEAR PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE aniversary_memos; INSERT INTO aniversary_memos (party_year, title) VALUES ("11", "We need a big cake!"); 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 index 9358c7c0e..97e8efc73 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index 9fe769897..a3e040b55 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index 24967c9d1..454326ea2 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index 7f4bc666f..1a9a06f8b 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index 58604aa34..d19cfcb22 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index df89318fb..aa0761aa8 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index 97dc161f1..068f53fea 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index 2e4451b9f..b90333239 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_asc.test index 76729da27..5b1e16538 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_asc.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_desc.test index 692953f93..10446b115 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_desc.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_asc.test index d5c73ac3d..66d29dfb8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_asc.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_desc.test index b8d2dac9c..7dcbb6e90 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_desc.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_asc.test index 8f262237c..8537caed4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_asc.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_desc.test index 994eff8b6..d7d48ea72 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_desc.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_asc.test index 9e58d3cd8..216c5f4ef 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_asc.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_desc.test index 14c97749c..90f241ad2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_desc.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint.test index 318ccbfb8..58e58f4db 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint_unsigned.test index ef89fbdd1..2b81524ae 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint_unsigned.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint_unsigned.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_double.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_double.test index e35baa130..7ad385098 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_double.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_double.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_float.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_float.test index aca93729e..0baa5d4b3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_float.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_float.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int.test index f9563018b..15e539b55 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int_unsigned.test index b95dca5fe..a3e1d3564 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int_unsigned.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int_unsigned.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint.test index a817dfc28..c63a8a867 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint_unsigned.test index f9f42e48a..81d6df92f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint_unsigned.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint_unsigned.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint.test index 977629729..c64bd185b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint_unsigned.test index bba35ebbd..82ea8949d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint_unsigned.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint_unsigned.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint.test index 04344db00..685570228 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint_unsigned.test index 27ef9af3a..c513983d8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint_unsigned.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint_unsigned.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar.test index 518eabe1c..51ed0a3bb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar_collation.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar_collation.test index 08b9c5b56..9d9d02c4b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar_collation.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar_collation.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_int.test index 84f2adce7..04584d2f7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_int.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_varchar.test index 995dd9d77..7b8a6fecb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_varchar.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_int.test index 106a5bdd9..c23076423 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_int.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_varchar.test index 4a0b2ff34..c4004e420 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_varchar.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_all.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_all.test new file mode 100644 index 000000000..f4d468b71 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_all.test @@ -0,0 +1,39 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id int, + UNIQUE KEY (id) +); + +INSERT INTO ids VALUES (1); +DELETE FROM ids; +INSERT INTO ids VALUES (1); + +SELECT * FROM ids; + +-- error ER_DUP_ENTRY +INSERT INTO ids VALUES (1); + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_by_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_by_primary_key.test index 27c094ace..3b3743b8b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_by_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_by_primary_key.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_insert_after_error.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_insert_after_error.test index 4acdfc0f1..70c6ec857 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_insert_after_error.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_insert_after_error.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc 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 index 7642ee733..27fb6eea8 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_varchar.test index 8bcdb56cc..fe222c377 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_varchar.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_update_multiple_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_update_multiple_column.test index fbf776d9e..b1a37b5ac 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_update_multiple_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_update_multiple_column.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_update_single_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_update_single_column.test index 557ce195a..3d4750054 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_update_single_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_update_single_column.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test index 43988b71a..fb462fd76 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_none.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_none.test index f6d2d8fb5..2dcf6716e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_none.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_none.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_use.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_use.test index 3135ad9fa..f1aac9c1c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_use.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_use.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_data_length.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_data_length.test index 7b54e8d3a..445bcfabe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_data_length.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_data_length.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_TODO_SPLIT_ME.test index 6e3ce140e..95c21513d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/insert_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -77,22 +77,6 @@ insert into t1 values("2010/03/26 11:22:33"); select * from t1; drop table t1; - -# for virtual columns -create table t1 (c1 int, _id int); -set sql_mode=""; -# warning WARN_DATA_TRUNCATED -insert into t1 (c1,_id) values (1,1); -set sql_mode="strict_all_tables"; -# We can't use WARN_DATA_TRUNCATED here because "WXXX" isn't supported -# MySQL 5.5, 5.6 and MariaDB 5.6. MariaDB 10.0 only supports it. -# We share this test with all MySQL servers. So we use number here. ---error 1265 -insert into t1 (c1,_id) values (4,1); -select * from t1; -drop table t1; - - # duplicated key error create table t1 (c1 int primary key, c2 int); insert into t1 values(1,100); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_delayed.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_delayed.test index d58d43267..e52d11c55 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/insert_delayed.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_delayed.test @@ -1,4 +1,4 @@ -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,9 +12,12 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +skip "This test is too fragile."; --source include/not_embedded.inc +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.test index a53e672cb..e6c0cae16 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_primary_key.test index c25e46063..1b07775d6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_primary_key.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE diaries ( day DATE PRIMARY KEY, title TEXT ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (day, title) VALUES ("2012-02-14", "clear day") 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 5542b0ece..f5b6db7ba 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, UNIQUE KEY day (day) ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (day, title) VALUES ("2012-02-14", "clear day1") diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_virtual_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_virtual_column.test new file mode 100644 index 000000000..3f3fd208a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_virtual_column.test @@ -0,0 +1,42 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2016 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (c1 int, _id int); +--disable_warnings +SET sql_mode=""; +--enable_warnings +# warning WARN_DATA_TRUNCATED +INSERT INTO t1 (c1,_id) VALUES (1,1); +--disable_warnings +SET sql_mode="STRICT_ALL_TABLES"; +--enable_warnings +# We can't use WARN_DATA_TRUNCATED here because "WXXX" isn't supported +# MySQL 5.5, 5.6 and MariaDB 5.6. MariaDB 10.0 only supports it. +# We share this test with all MySQL servers. So we use number here. +--error 1265 +INSERT INTO t1 (c1,_id) VALUES (4,1); +SELECT * FROM t1; +DROP TABLE t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/like_unicode_ci.test b/storage/mroonga/mysql-test/mroonga/storage/t/like_unicode_ci.test index 48d50135b..1f9c5fd38 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/like_unicode_ci.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/like_unicode_ci.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/lock_tables_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/lock_tables_read.test index eeda3dac4..6c7627e79 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/lock_tables_read.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/lock_tables_read.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_TODO_SPLIT_ME.test deleted file mode 100644 index 2355e5d4a..000000000 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_TODO_SPLIT_ME.test +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright(C) 2010 Kentoku SHIBA -# -# 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 02111-1301 USA - ---source ../../include/mroonga/have_mroonga.inc - ---disable_warnings -drop table if exists t1, t2, t3; ---enable_warnings - -flush status; -create table t1 (c1 int primary key, c2 int, c3 text, key idx1(c2), fulltext index ft(c3)); -insert into t1 values(1,10,"aa ii uu ee oo"); -insert into t1 values(2,20,"ka ki ku ke ko"); -insert into t1 values(3,30,"sa si su se so"); -insert into t1 values(4,40,"ta ti tu te to"); -insert into t1 values(5,50,"aa ii uu ee oo"); -show status like 'mroonga_count_skip'; -select * from t1; -show status like 'mroonga_count_skip'; -select count(*) from t1; -show status like 'mroonga_count_skip'; -select * from t1 force index(primary) where c1 between 2 and 4; -show status like 'mroonga_count_skip'; -select count(*) from t1 force index(primary) where c1 between 2 and 4; -show status like 'mroonga_count_skip'; -select c1 from t1 force index(primary) where c1 < 3; -show status like 'mroonga_count_skip'; -select count(c1) from t1 force index(primary) where c1 < 3; -show status like 'mroonga_count_skip'; -select 1 from t1 force index(primary) where c1 > 3; -show status like 'mroonga_count_skip'; -select count(1) from t1 force index(primary) where c1 > 3; -show status like 'mroonga_count_skip'; -select * from t1 where match(c3) against("su"); -show status like 'mroonga_count_skip'; -select count(*) from t1 where match(c3) against("su"); -show status like 'mroonga_count_skip'; -select * from t1 where match(c3) against("+su" in boolean mode); -show status like 'mroonga_count_skip'; -select count(*) from t1 where match(c3) against("+su" in boolean mode); -show status like 'mroonga_count_skip'; -select * from t1 force index(idx1) where c2 between 20 and 40; -show status like 'mroonga_count_skip'; -select count(*) from t1 force index(idx1) where c2 between 20 and 40; -show status like 'mroonga_count_skip'; -drop table t1; - ---source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test index 6d07ab7b6..69713752f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,11 +30,17 @@ CREATE TABLE diaries ( INSERT INTO diaries VALUES("Hello mroonga!"); INSERT INTO diaries VALUES("It's funny."); +disable_query_log; CONNECT (thread2, localhost, root, ,); CONNECTION thread2; +enable_query_log; + INSERT INTO diaries VALUES("Happy birthday!"); + +disable_query_log; DISCONNECT thread2; CONNECTION default; +enable_query_log; SHOW STATUS LIKE 'mroonga_count_skip'; SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test index 26930d475..07bbc7739 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test index fedf31810..2014a8fa4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ CREATE TABLE diaries ( content TEXT, FULLTEXT INDEX(content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_and.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_and.test new file mode 100644 index 000000000..3c63ecc9c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_and.test @@ -0,0 +1,44 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT, + age INT, + INDEX (id, age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id, age) VALUES (1, 28); +INSERT INTO users (id, age) VALUES (1, 28); +INSERT INTO users (id, age) VALUES (1, 29); +INSERT INTO users (id, age) VALUES (2, 29); +INSERT INTO users (id, age) VALUES (2, 29); +INSERT INTO users (id, age) VALUES (3, 29); + +SELECT COUNT(*) FROM users WHERE id = 2 AND age = 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test new file mode 100644 index 000000000..cccb0d3f4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); + +SELECT COUNT(*) FROM users WHERE age BETWEEN 28 AND 30; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_equal.test new file mode 100644 index 000000000..f8ebad5d7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_equal.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); + +SELECT COUNT(*) FROM users WHERE age = 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_boolean_mode.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_boolean_mode.test new file mode 100644 index 000000000..9e3c6fd8a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_boolean_mode.test @@ -0,0 +1,43 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; + +INSERT INTO memos (content) VALUES ('Groonga is good.'); +INSERT INTO memos (content) VALUES ('Groonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga is good.'); +INSERT INTO memos (content) VALUES ('Mroonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga uses Groonga.'); + +SELECT COUNT(*) FROM memos + WHERE MATCH(content) AGAINST('+Groonga' IN BOOLEAN MODE); + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_natural_language_mode.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_natural_language_mode.test new file mode 100644 index 000000000..634428c5c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_natural_language_mode.test @@ -0,0 +1,43 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; + +INSERT INTO memos (content) VALUES ('Groonga is good.'); +INSERT INTO memos (content) VALUES ('Groonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga is good.'); +INSERT INTO memos (content) VALUES ('Mroonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga uses Groonga.'); + +SELECT COUNT(*) FROM memos + WHERE MATCH(content) AGAINST('Groonga'); + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test new file mode 100644 index 000000000..0feababfb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); + +SELECT COUNT(*) FROM users WHERE age > 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test new file mode 100644 index 000000000..5e69f1684 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); + +SELECT COUNT(*) FROM users WHERE age >= 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test new file mode 100644 index 000000000..8aa1ba176 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); + +SELECT COUNT(*) FROM users WHERE age < 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test new file mode 100644 index 000000000..a6e0f3a51 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); + +SELECT COUNT(*) FROM users WHERE age <= 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--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 new file mode 100644 index 000000000..f07d1b9be --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); + +SELECT COUNT(*) FROM users WHERE age <> 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_view.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_view.test index 378f4424d..cc3de7c3c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_view.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_view.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_multiple_conditions.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_multiple_conditions.test new file mode 100644 index 000000000..1f49597bb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_multiple_conditions.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT, + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id, age) VALUES (1, 29); +INSERT INTO users (id, age) VALUES (2, 29); +INSERT INTO users (id, age) VALUES (3, 29); + +SELECT COUNT(*) FROM users WHERE id = 3 AND age = 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test new file mode 100644 index 000000000..1c9e7354c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id BETWEEN 2 AND 4; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_equal.test new file mode 100644 index 000000000..23fb2152f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_equal.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id = 3; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test new file mode 100644 index 000000000..9020dd11e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id > 3; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test new file mode 100644 index 000000000..f4c1e0687 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id >= 3; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less.test new file mode 100644 index 000000000..bcf5afa52 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id < 3; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less_equal.test new file mode 100644 index 000000000..ddfad77ce --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less_equal.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id <= 3; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_not_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_not_equal.test new file mode 100644 index 000000000..c49385ed8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_not_equal.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id <> 3; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test index 20b89f724..e65e44d1f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_multiple_match_againsts.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_multiple_match_againsts.test new file mode 100644 index 000000000..14f548db1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_multiple_match_againsts.test @@ -0,0 +1,57 @@ +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT UNSIGNED NOT NULL, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(title), + FULLTEXT INDEX(content) +) DEFAULT CHARSET UTF8; + +INSERT INTO memos VALUES(5, "title 1", "content a"); +INSERT INTO memos VALUES(12, "title 1", "content a"); +INSERT INTO memos VALUES(10, "title 1", "content a"); +INSERT INTO memos VALUES(4, "title 2", "content b"); +INSERT INTO memos VALUES(6, "title 2", "content b"); +INSERT INTO memos VALUES(1, "title 2", "content b"); +INSERT INTO memos VALUES(11, "title 1-a", "content a-1"); +INSERT INTO memos VALUES(3, "title 2-b", "content a-2"); +INSERT INTO memos VALUES(2, "title 2-c", "content a-3"); +INSERT INTO memos VALUES(8, "title 1-a", "content b-1"); +INSERT INTO memos VALUES(9, "title 2-b", "content b-2"); +INSERT INTO memos VALUES(7, "title 2-c", "content b-3"); + +SELECT * FROM memos + WHERE MATCH(title) AGAINST("+1" IN BOOLEAN MODE) AND + MATCH(content) AGAINST("+a" IN BOOLEAN MODE) + ORDER BY id + LIMIT 1,3; + +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/storage/t/optimization_order_limit_not_optimized_no_limit.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test index b1246ddfb..eb9e7ef55 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_cp932.test new file mode 100644 index 000000000..c14ee787f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_cp932.test @@ -0,0 +1,46 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES CP932; +CREATE TABLE memos ( + ޝ•ÊŽq INT UNSIGNED, + “à—e TEXT, + FULLTEXT INDEX(“à—e), + KEY(ޝ•ÊŽq) +) DEFAULT CHARSET CP932; + +INSERT INTO memos VALUES(2, "–¾“ú‚ÍŽR“o‚èB"); +INSERT INTO memos VALUES(3, "¡“ú‚̓Tƒ{ƒeƒ“‚ð‚à‚ç‚Á‚½B"); +INSERT INTO memos VALUES(1, "¡“ú‚Í“V‹C‚ª‚æ‚­‚Ă悩‚Á‚½B"); + +SELECT * FROM memos + WHERE MATCH(“à—e) AGAINST("¡“ú" IN BOOLEAN MODE) + ORDER BY ޝ•ÊŽq + LIMIT 1; + +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/storage/t/optimization_order_limit_optimized_datetime_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test index 41d5facf6..04cd30ab3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test index f6440777a..cdc7b4335 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test index 5b57d2980..c7a524404 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:34", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:34", "Tomorrow will be fine."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test index 4f878af84..0f87b7018 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test index e8735fda4..922e72e2b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test index 4a748bc13..78f8f19a1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test index 80fe51e1e..2b12fa6cc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); 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 index b36a13f37..1908ce34d 100644 --- 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 @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_name.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_name.test new file mode 100644 index 000000000..834a39fe7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_name.test @@ -0,0 +1,49 @@ +# Copyright(C) 2017 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES utf8; +CREATE TABLE memos ( + id int PRIMARY KEY, + tag ENUM('Groonga', 'Mroonga'), + content TEXT, + FULLTEXT INDEX(content), + KEY(tag), + KEY(id) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES(1, 'Groonga', 'Groonga is great!'); +INSERT INTO memos VALUES(2, 'Mroonga', 'Mroonga is great!'); +INSERT INTO memos VALUES(3, 'Mroonga', 'Mroonga is a MySQL storage engine.'); +INSERT INTO memos VALUES(4, 'Mroonga', 'Mroonga is based on Groonga.'); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("+Groonga" IN BOOLEAN MODE) AND + tag = 'Mroonga' + ORDER BY id LIMIT 1; + +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/storage/t/optimization_order_limit_optimized_enum_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_value.test new file mode 100644 index 000000000..703d79dc8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_value.test @@ -0,0 +1,49 @@ +# Copyright(C) 2017 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES utf8; +CREATE TABLE memos ( + id int PRIMARY KEY, + tag ENUM('Groonga', 'Mroonga'), + content TEXT, + FULLTEXT INDEX(content), + KEY(tag), + KEY(id) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES(1, 'Groonga', 'Groonga is great!'); +INSERT INTO memos VALUES(2, 'Mroonga', 'Mroonga is great!'); +INSERT INTO memos VALUES(3, 'Mroonga', 'Mroonga is a MySQL storage engine.'); +INSERT INTO memos VALUES(4, 'Mroonga', 'Mroonga is based on Groonga.'); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("+Groonga" IN BOOLEAN MODE) AND + tag = 2 + ORDER BY id LIMIT 1; + +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/storage/t/optimization_order_limit_optimized_have_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test index bcc678360..9c44110bf 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -33,7 +33,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test index e0a2df2e5..32345f661 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test index c8f698cdb..508f85f3a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test index ee510ab75..a2024e8dd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test index 76f2de814..4924cb374 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test index caca6b56b..b81247ed2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test index 1c26bef93..d32d9f112 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test index 4df32d8a5..9289bee30 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test index 07907f1df..23adb84f9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -33,7 +33,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test index 0e0b3f8e1..1031427f9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test index 213605adc..78b42e5d8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test index 58505edf7..f09a2a0e3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test index 92178a451..9a7585609 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -35,7 +35,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(NULL, 1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(NULL, 2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test index 4ec5a8b15..e49a79a7d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test index eaedbbdc7..b563028c8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test index 72d2890a1..c11603c94 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test index eeb2e36ae..71f93c6ee 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test index 666887d33..883f676e4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:34", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:34", "Tomorrow will be fine."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test index feeae64b8..a8af0bbb7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!" ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test index 4744add78..a0795f8eb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!" ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test index cb407d354..4087207c2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test index b9327e425..e423a4b93 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test index 7c460d108..60565dd7b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -35,7 +35,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test index ffebd0a4b..dcde93733 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test index c4e86ac10..4e7c117d6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test index 57b512ed8..d6e7b345c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test index 729d8b037..bac104482 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test index 6bd955cc9..9ffae4a65 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test index 3e40e8858..09015f9c2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test index 44fb92877..35adc2983 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test index f7d0865f3..831ef4c3e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.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 index 25270f14d..4e59a2ca3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/partition_insert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/partition_insert.test @@ -12,9 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/skip_mariadb_100_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_0_or_later.inc +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source include/have_partition.inc --source ../../include/mroonga/have_mroonga.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 index d601b4d4f..eaf3304da 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/partition_update.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/partition_update.test @@ -12,9 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/skip_mariadb_100_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_0_or_later.inc +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source include/have_partition.inc --source ../../include/mroonga/have_mroonga.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 index 65989b60e..22fade591 100644 --- 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 @@ -12,9 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc +--source ../../include/mroonga/skip_solaris.inc --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_mroonga_helper.inc @@ -27,7 +28,6 @@ CREATE TABLE diaries ( 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..."); @@ -35,11 +35,11 @@ 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 +--remove_file $MYSQLD_DATADIR/repair_test.mrn.000010E.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 system call error: No such file or directory: failed to open path: --error ER_CANT_OPEN_FILE SELECT * FROM diaries WHERE MATCH(body) AGAINST("+starting" IN BOOLEAN MODE); 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 81dcbe318..e9ba60c2c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test @@ -12,10 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_select_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_select_varchar.test index 0f8e90c0c..3ff231857 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_select_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_select_varchar.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # Based on #910. diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_text.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_text.test index bb134cd04..4aba5eda2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_text.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_text.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ create table diaries ( content text, fulltext index (content) ) default charset utf8; -show create table diaries; insert into diaries values(1, "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_varchar.test index 231e8b097..da3faa030 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_varchar.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ create table diaries ( content varchar(256), fulltext index (content) ) default charset utf8; -show create table diaries; insert into diaries values(1, "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_vector.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_vector.test index 2e06bf7e5..22cbf1388 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_vector.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_vector.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc 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 index fb8a6750f..db5b90ab0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_without_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_without_key.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_all.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_all.test index c3973cb91..b607c314a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_all.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_all.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_equal.test index c624f8e0c..52630fec0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_not_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_not_equal.test index 59c358cc1..75d00e7a7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_not_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_not_equal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_with_index.test index 4424cf283..ad71ac711 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_with_index.test @@ -1,4 +1,4 @@ -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -31,7 +31,7 @@ INSERT INTO users VALUES ("Alice", 20); INSERT INTO users VALUES ("Bob", 20); INSERT INTO users VALUES ("Charry", 29); -SELECT *, COUNT(*) FROM users GROUP BY age; +SELECT age, COUNT(*) FROM users GROUP BY age; DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_without_index.test index 46c0e5aa7..710bea0dd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_without_index.test @@ -1,4 +1,4 @@ -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,9 +30,7 @@ INSERT INTO users VALUES ("Alice", 20); INSERT INTO users VALUES ("Bob", 20); INSERT INTO users VALUES ("Charry", 29); -EXPLAIN SELECT *, COUNT(*) FROM users GROUP BY age; - -SELECT *, COUNT(*) FROM users GROUP BY age; +SELECT age, COUNT(*) FROM users GROUP BY age; DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_pkey.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_pkey.test index a0afe1198..0bce1387b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_pkey.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_pkey.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_secondary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_secondary_key.test index 231e7c270..32bb5758a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_secondary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_secondary_key.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/show_create_table_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/show_create_table_TODO_SPLIT_ME.test index 3f0004909..95007d803 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/show_create_table_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/show_create_table_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/sub_query_fulltext.test b/storage/mroonga/mysql-test/mroonga/storage/t/sub_query_fulltext.test index c2df2522b..a7460343c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/sub_query_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/sub_query_fulltext.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -31,7 +31,6 @@ CREATE TABLE diaries ( title TEXT, FULLTEXT INDEX (title) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO users (name) VALUES ("alice"); INSERT INTO users (name) VALUES ("bob"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/temporary_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/temporary_table.test index e71a2322b..ef26b467d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/temporary_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/temporary_table.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_osx.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TEMPORARY TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title) VALUES ("clear day"); INSERT INTO diaries (title) VALUES ("rainy day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/truncate.test b/storage/mroonga/mysql-test/mroonga/storage/t/truncate.test index 7e5bc2d01..840ff3754 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/truncate.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/truncate.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -31,7 +31,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_binlog_row.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_binlog_row.test new file mode 100644 index 000000000..c90a8cbf1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_binlog_row.test @@ -0,0 +1,38 @@ +# Copyright(C) 2017 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET SESSION binlog_format = 'ROW'; + +CREATE TABLE memos ( + title varchar(20) PRIMARY KEY, + content varchar(140) NOT NULL +) COLLATE=utf8mb4_general_ci + DEFAULT CHARSET=utf8mb4; + +INSERT INTO memos (title, content) VALUES ('Mroonga', 'Mroonga is great!'); +SELECT * FROM memos; +UPDATE memos SET content = 'Mroonga is very great!' WHERE title = 'Mroonga'; +SELECT * FROM memos; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_fulltext.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_fulltext.test index 33ccec429..dbcfd6654 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/update_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_fulltext.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_id_hash_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_id_hash_index.test index 5b5a47ad4..526d6f18c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/update_id_hash_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_id_hash_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_id_unique_hash_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_id_unique_hash_index.test index f1c91bfd8..0f9ecdbf3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/update_id_unique_hash_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_id_unique_hash_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_int.test index 7f40ba09b..eb4af2c11 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/update_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_int.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_last_insert_grn_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_last_insert_grn_id.test index 65f0ce3b2..872f16735 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/update_last_insert_grn_id.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_last_insert_grn_id.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_virtual_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_virtual_column.test index a50bfd692..e0cb953d5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/update_virtual_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_virtual_column.test @@ -12,32 +12,38 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings -drop table if exists t1, t2, t3; +DROP TABLE IF EXISTS t1; --enable_warnings # for virtual columns -create table t1 (c1 int, _id int); -insert into t1 values(1,null); -insert into t1 values(2,null); -insert into t1 values(3,null); -select * from t1; -set sql_mode=""; +CREATE TABLE t1 (c1 int, _id int); +INSERT INTO t1 VALUES(1,null); +INSERT INTO t1 VALUES(2,null); +INSERT INTO t1 VALUES(3,null); +SELECT * FROM t1; +--disable_warnings +SET sql_mode=""; +--enable_warnings # warning WARN_DATA_TRUNCATED -update t1 set _id = 10 where c1 = 1; -select * from t1; -set sql_mode="strict_all_tables"; +UPDATE t1 SET _id = 10 WHERE c1 = 1; +SELECT * FROM t1; +--disable_warnings +SET sql_mode="STRICT_ALL_TABLES"; +--enable_warnings # We can't use WARN_DATA_TRUNCATED here because "WXXX" isn't supported # MySQL 5.5, 5.6 and MariaDB 5.6. MariaDB 10.0 only supports it. # We share this test with all MySQL servers. So we use number here. --error 1265 -update t1 set _id = 11 where c1 = 1; -select * from t1; -drop table t1; +UPDATE t1 SET _id = 11 WHERE c1 = 1; +SELECT * FROM t1; +DROP TABLE t1; + +SET sql_mode=DEFAULT; --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 index 2cba585bc..83dc25e49 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released. --source ../../include/mroonga/have_mysql.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 index bdd4f915b..21879480c 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released. --source ../../include/mroonga/have_mysql.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 index c7f549253..77c4c1db2 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released. --source ../../include/mroonga/have_mysql.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 index b3265d964..b312b31ad 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released. --source ../../include/mroonga/have_mysql.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 index 61613ef29..6509eeee2 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released. --source ../../include/mroonga/have_mysql.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 ad9346961..b7a4b80b6 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_new_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_new_value.test index e71dcfe0d..83138aee0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_new_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_new_value.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_same_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_same_value.test index 4cfbe489b..41aac1a14 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_same_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_same_value.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_new_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_new_value.test new file mode 100644 index 000000000..4c518b28e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_new_value.test @@ -0,0 +1,25 @@ +# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014 Kentoku SHIBA +# +# 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +SET @mroonga_default_tokenizer_backup = @@mroonga_default_tokenizer; +SET GLOBAL mroonga_default_tokenizer = "TokenBigramSplitAlpha"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_default_tokenizer'; +SET GLOBAL mroonga_default_tokenizer = @mroonga_default_tokenizer_backup; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_same_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_same_value.test new file mode 100644 index 000000000..ebd08460b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_same_value.test @@ -0,0 +1,22 @@ +# Copyright(C) 2014 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-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +SET GLOBAL mroonga_default_tokenizer = "TokenBigram"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_default_tokenizer'; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_delete.test index de97096e5..767ce3f92 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_delete.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_delete.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; insert into diaries (body) values ("will start groonga!"); select * from diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_insert.test index b52385793..4ad242dd5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_insert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_insert.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; insert into diaries (body) values ("will start groonga!"); select * from diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_update.test index 47c244215..66f82a5c0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_update.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_update.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; insert into diaries (body) values ("will start groonga!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test new file mode 100644 index 000000000..ad2b8167d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test @@ -0,0 +1,50 @@ +# Copyright(C) 2017 Naoya Murakami +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + title TEXT +) DEFAULT CHARSET=utf8; + +SELECT mroonga_command('truncate mroonga_operations'); +INSERT INTO diaries VALUES("Unlogged: Research for Mroonga"); +SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +SELECT mroonga_command('select mroonga_operations --output_columns _id'); + +SET GLOBAL mroonga_enable_operations_recording = false; +FLUSH TABLES; + +SELECT mroonga_command('truncate mroonga_operations'); +INSERT INTO diaries VALUES("Logged: Research for Mroonga"); +SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +SELECT mroonga_command('select mroonga_operations --output_columns _id'); + +DROP TABLE diaries; +SELECT mroonga_command('truncate mroonga_operations'); + +SET GLOBAL mroonga_enable_operations_recording = default; +FLUSH TABLES; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_disable.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_disable.test index 3e2c5bfe7..a3720f2ef 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_disable.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_disable.test @@ -1,4 +1,4 @@ -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,17 +12,17 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_100_or_later.inc +--source ../../include/mroonga/have_version_10_0_or_later.inc --source ../../include/mroonga/have_mroonga.inc SET GLOBAL mroonga_lock_timeout = -1; SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; -disable_query_log; -SET GLOBAL mroonga_lock_timeout = 10000000; -enable_query_log; +--disable_query_log +SET GLOBAL mroonga_lock_timeout = DEFAULT; +--enable_query_log --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_invalid.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_invalid.test index 7358389bb..54c834d7e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_invalid.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_invalid.test @@ -1,4 +1,4 @@ -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,17 +12,17 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_100_or_later.inc +--source ../../include/mroonga/have_version_10_0_or_later.inc --source ../../include/mroonga/have_mroonga.inc SET GLOBAL mroonga_lock_timeout = -2; SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; -disable_query_log; -SET GLOBAL mroonga_lock_timeout = 10000000; -enable_query_log; +--disable_query_log +SET GLOBAL mroonga_lock_timeout = DEFAULT; +--enable_query_log --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_no_retry.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_no_retry.test index c25d1747b..60e468bf0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_no_retry.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_no_retry.test @@ -1,4 +1,4 @@ -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,8 +20,8 @@ SET GLOBAL mroonga_lock_timeout = 0; SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; -disable_query_log; -SET GLOBAL mroonga_lock_timeout = 10000000; -enable_query_log; +--disable_query_log +SET GLOBAL mroonga_lock_timeout = DEFAULT; +--enable_query_log --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_valid.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_valid.test index 523baa1b3..4b490b8a7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_valid.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_valid.test @@ -1,4 +1,4 @@ -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,8 +20,8 @@ SET GLOBAL mroonga_lock_timeout = 1000; SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; -disable_query_log; -SET GLOBAL mroonga_lock_timeout = 10000000; -enable_query_log; +--disable_query_log +SET GLOBAL mroonga_lock_timeout = DEFAULT; +--enable_query_log --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_new_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_new_value.test index c96b021be..07a4afbe7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_new_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_new_value.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_nonexistent_path.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_nonexistent_path.test index d05cbd234..13c544b95 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_nonexistent_path.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_nonexistent_path.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_same_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_same_value.test index ead099e0c..e2cda37b7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_same_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_same_value.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_level_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_level_TODO_SPLIT_ME.test index 1f73f4f44..2cf196f49 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_level_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_level_TODO_SPLIT_ME.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_global.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_global.test index 8585c1c2f..fda1f8768 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_global.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_global.test @@ -1,4 +1,4 @@ -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,7 +20,7 @@ DROP TABLE IF EXISTS diaries; --enable_warnings -# 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 GLOBAL mroonga_match_escalation_threshold = -1; @@ -30,24 +30,31 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, - FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' + FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); -INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello Groonga!", "groonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello Mroonga!", "mroonga install"); +disable_query_log; +CONNECT (new_connection, localhost, root, ,); +CONNECTION new_connection; +enable_query_log; -SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+install" IN BOOLEAN MODE); -SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" 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); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+gr" IN BOOLEAN MODE); SET mroonga_match_escalation_threshold = 0; -SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+gr" IN BOOLEAN MODE); +disable_query_log; +CONNECTION default; +DISCONNECT new_connection; +enable_query_log; DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_session.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_session.test index 8743c3faa..0a7d192f7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_session.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_session.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,9 +24,8 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, - FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' + FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); 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 index 043d8d334..9ce8cf8ba 100644 --- 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 @@ -1,4 +1,4 @@ -# Copyright(C) 2015 Kouhei Sutou +# Copyright(C) 2015-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -38,13 +39,17 @@ INSERT INTO ids VALUES (10); SET GLOBAL mroonga_max_n_records_for_estimate = 1; +disable_query_log; CONNECT (new_connection, localhost, root, ,); CONNECTION new_connection; +enable_query_log; EXPLAIN SELECT * FROM ids WHERE id > 5; +disable_query_log; CONNECTION default; DISCONNECT new_connection; +enable_query_log; SET GLOBAL mroonga_max_n_records_for_estimate = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.test new file mode 100644 index 000000000..757a7f959 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.test @@ -0,0 +1,60 @@ +# Copyright(C) 2015-2016 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-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--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; + +disable_query_log; +CONNECT (new_connection, localhost, root, ,); +CONNECTION new_connection; +enable_query_log; + +EXPLAIN SELECT * FROM ids WHERE id > 5; + +disable_query_log; +CONNECTION default; +DISCONNECT new_connection; +enable_query_log; + +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_mysql_5_7_or_later_not_found_in_limit.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_not_found_in_limit.test new file mode 100644 index 000000000..df9f49863 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_not_found_in_limit.test @@ -0,0 +1,43 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id INT, + INDEX (id) +) DEFAULT CHARSET=UTF8; + +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); + +DELETE FROM ids WHERE id < 2; + +SET mroonga_max_n_records_for_estimate = 1; + +EXPLAIN SELECT * FROM ids WHERE id > 0; + +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/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.test new file mode 100644 index 000000000..19b4b2836 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.test @@ -0,0 +1,47 @@ +# Copyright(C) 2015-2016 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-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--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/storage/t/variable_max_n_records_for_estimate_not_found_in_limit.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_not_found_in_limit.test new file mode 100644 index 000000000..0b9357e06 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_not_found_in_limit.test @@ -0,0 +1,43 @@ +# Copyright(C) 2016 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-1301 USA + +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id INT, + INDEX (id) +) DEFAULT CHARSET=UTF8; + +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); + +DELETE FROM ids WHERE id < 2; + +SET mroonga_max_n_records_for_estimate = 1; + +EXPLAIN SELECT * FROM ids WHERE id > 0; + +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/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 index 894e14f48..5e31c8b0d 100644 --- 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 @@ -1,4 +1,4 @@ -# Copyright(C) 2015 Kouhei Sutou +# Copyright(C) 2015-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_empty_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_empty_value.test new file mode 100644 index 000000000..912c2e2bf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_empty_value.test @@ -0,0 +1,32 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; + +SET GLOBAL mroonga_query_log_file = ""; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +--exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log + +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; + +--remove_file $MYSQLD_DATADIR/groonga-query-log.log + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_null_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_null_value.test new file mode 100644 index 000000000..a63f4f75a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_null_value.test @@ -0,0 +1,32 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; + +SET GLOBAL mroonga_query_log_file = NULL; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +--exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log + +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; + +--remove_file $MYSQLD_DATADIR/groonga-query-log.log + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_empty_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_empty_value.test new file mode 100644 index 000000000..e37b163b5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_empty_value.test @@ -0,0 +1,34 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; + +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; + +SET GLOBAL mroonga_query_log_file = ""; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +--exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log + +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; + +--remove_file $MYSQLD_DATADIR/groonga-query-log.log + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_null_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_null_value.test new file mode 100644 index 000000000..2df00d6a4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_null_value.test @@ -0,0 +1,34 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; + +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; + +SET GLOBAL mroonga_query_log_file = NULL; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +--exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log + +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; + +--remove_file $MYSQLD_DATADIR/groonga-query-log.log + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_new_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_new_value.test new file mode 100644 index 000000000..a3a7dc9b0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_new_value.test @@ -0,0 +1,34 @@ +# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2014 Kentoku SHIBA +# Copyright(C) 2017 Kentaro Hayashi +# +# 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; + +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +--exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log + +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; + +--remove_file $MYSQLD_DATADIR/groonga-query-log.log + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_same_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_same_value.test new file mode 100644 index 000000000..66024f5cf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_same_value.test @@ -0,0 +1,35 @@ +# Copyright(C) 2014-2017 Kouhei Sutou +# Copyright(C) 2017 Kentaro Hayashi +# +# 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-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; + +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; + +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +--exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log + +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; + +--remove_file $MYSQLD_DATADIR/groonga-query-log.log + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_vector_column_delimiter.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_vector_column_delimiter.test index d2ae3fd87..f1fe11864 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_vector_column_delimiter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_vector_column_delimiter.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test index 6c21f8d50..2bd4496a2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column.result index 22dbbff96..2be9834c6 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; id title @@ -26,12 +19,4 @@ id title body 1 survey will start groonga! 2 groonga (1) starting groonga... 3 groonga (2) started groonga. -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`) -) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_cp932.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_cp932.result new file mode 100644 index 000000000..9628df686 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_cp932.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS users; +SET NAMES cp932; +CREATE TABLE users ( +id int unsigned PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET=cp932 COMMENT='Engine "InnoDB"'; +ALTER TABLE users +ADD COLUMN –¼‘O text, +ADD FULLTEXT INDEX (–¼‘O); +INSERT INTO users (–¼‘O) VALUES ("‚â‚Ü‚¾"); +INSERT INTO users (–¼‘O) VALUES ("‚½‚È‚©"); +INSERT INTO users (–¼‘O) VALUES ("‚·‚¸‚«"); +SELECT * FROM users; +id –¼‘O +1 ‚â‚Ü‚¾ +2 ‚½‚È‚© +3 ‚·‚¸‚« +SELECT * FROM users +WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); +id –¼‘O +2 ‚½‚È‚© +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_HASH_KEY ShortText + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_utf8.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_utf8.result new file mode 100644 index 000000000..abd2271f0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_utf8.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS users; +SET NAMES utf8; +CREATE TABLE users ( +id int unsigned PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET=utf8 COMMENT='Engine "InnoDB"'; +ALTER TABLE users +ADD COLUMN åå‰ text, +ADD FULLTEXT INDEX (åå‰); +INSERT INTO users (åå‰) VALUES ("ã‚„ã¾ã "); +INSERT INTO users (åå‰) VALUES ("ãŸãªã‹"); +INSERT INTO users (åå‰) VALUES ("ã™ãšã"); +SELECT * FROM users; +id åå‰ +1 ã‚„ã¾ã  +2 ãŸãªã‹ +3 ã™ãšã +SELECT * FROM users +WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); +id åå‰ +2 ãŸãªã‹ +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_HASH_KEY ShortText + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_engine.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_engine.result index e5ce4692a..7197d3a9d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_engine.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_engine.result @@ -6,16 +6,11 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) ENGINE MyISAM 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 `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 +SELECT table_name, engine, table_comment +FROM information_schema.tables +WHERE table_name = 'diaries'; +table_name engine table_comment +diaries MyISAM INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); SELECT * FROM diaries @@ -24,16 +19,11 @@ MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); id title body 1 survey will start groonga! ALTER TABLE diaries ENGINE = mroonga COMMENT = 'ENGINE "InnoDB"'; -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 `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +SELECT table_name, engine, table_comment +FROM information_schema.tables +WHERE table_name = 'diaries'; +table_name engine table_comment +diaries Mroonga ENGINE "InnoDB" SELECT * FROM diaries WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_comment_change_engine.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_comment_change_engine.result index 1106fcffc..05bd0e4e1 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_comment_change_engine.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_comment_change_engine.result @@ -6,28 +6,15 @@ title VARCHAR(64), content TEXT, FULLTEXT INDEX(content) ) DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"'; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(64) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"' INSERT INTO memos (title, content) VALUES ("Hello", "I start to write memos!"); INSERT INTO memos (title, content) VALUES ("groonga", "I start to use groonga!"); INSERT INTO memos (title, content) VALUES ("mroonga", "I use mroonga too!"); ALTER TABLE memos COMMENT='engine "MyISAM"'; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(64) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='engine "MyISAM"' +SELECT table_name, table_comment +FROM information_schema.tables +WHERE table_name = 'memos'; +table_name table_comment +memos engine "MyISAM" SELECT * FROM memos; id title content 1 Hello I start to write memos! diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_drop_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_drop_column.result index 07c149a8f..25cb53ded 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_drop_column.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_drop_column.result @@ -4,26 +4,11 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, body TEXT ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -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`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); SELECT * FROM diaries; id title body 1 survey will start groonga! ALTER TABLE diaries DROP COLUMN body; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - PRIMARY KEY (`id`) -) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' SELECT * FROM diaries; id title 1 survey diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result index cc64daac3..37f03b406 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, FULLTEXT INDEX title_index (title) ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; id title @@ -39,14 +31,4 @@ WHERE MATCH(title) AGAINST("groonga") AND MATCH(body) AGAINST("starting"); id title body 2 groonga (1) starting groonga... -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 `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_rename_table.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_rename_table.result index 08e526baa..bfbe96d14 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_rename_table.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_rename_table.result @@ -6,16 +6,6 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -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 `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); SELECT * FROM diaries; id title body @@ -32,14 +22,4 @@ SELECT * FROM memos WHERE MATCH(title) AGAINST("groonga") AND MATCH(body) AGAINST("starting"); id title body -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' DROP TABLE memos; 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 0e2f4c3bc..fa42d4a1f 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 @@ -119,13 +119,4 @@ id name location_text 14 tetsuji POINT(139.76857 35.680912) 19 daruma POINT(139.770599 35.681461) 26 kazuya POINT(139.760895 35.673508) -SHOW CREATE TABLE shops; -Table Create Table -shops CREATE TABLE `shops` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - `location` geometry NOT NULL, - PRIMARY KEY (`id`), - SPATIAL KEY `location_index` (`location`) -) ENGINE=Mroonga AUTO_INCREMENT=37 DEFAULT CHARSET=latin1 COMMENT='ENGINE "InnoDB"' DROP TABLE shops; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/check_table_for_upgrade.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/check_table_for_upgrade.result new file mode 100644 index 000000000..61122f784 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/check_table_for_upgrade.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id int NOT NULL PRIMARY KEY, +content text, +FULLTEXT INDEX (content) +) COMMENT='engine "InnoDB"'; +INSERT INTO memos VALUES (1, 'Hello MySQL'); +INSERT INTO memos VALUES (2, 'Hello Mroonga'); +CHECK TABLE memos FOR UPGRADE; +Table Op Msg_type Msg_text +test.memos check status OK +FLUSH TABLES; +SELECT * FROM memos +WHERE MATCH(content) AGAINST('+mroonga' IN BOOLEAN MODE); +id content +2 Hello Mroonga +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_add_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_add_column.result new file mode 100644 index 000000000..5b379d08e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_add_column.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED; +ALTER TABLE logs ADD FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"'; +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_delete.result new file mode 100644 index 000000000..24c9275b5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_delete.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +DELETE FROM logs WHERE id = 1; +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_drop_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_drop_column.result new file mode 100644 index 000000000..65a55204a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_drop_column.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +ALTER TABLE logs DROP COLUMN message; +SELECT * FROM logs; +id record +1 {"level": "info", "message": "start"} +2 {"level": "info", "message": "restart"} +3 {"level": "warn", "message": "abort"} +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_insert.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_insert.result new file mode 100644 index 000000000..febfd3434 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_insert.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_reindex.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_reindex.result new file mode 100644 index 000000000..c0d9452f1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_reindex.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +ALTER TABLE logs DISABLE KEYS; +ALTER TABLE logs ENABLE KEYS; +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_update.result new file mode 100644 index 000000000..ae9c244d8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_update.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; +SELECT * FROM logs WHERE MATCH(message) AGAINST("hut" IN BOOLEAN MODE); +id record message +2 {"level": "info", "message": "shutdown"} "shutdown" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_column.result new file mode 100644 index 000000000..6daeb5e2f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_column.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL; +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs; +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_fulltext_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_fulltext_index.result new file mode 100644 index 000000000..82a46e3fc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_fulltext_index.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) +VALUES (1, '{"level": "info", "message": "start server"}'); +ALTER TABLE logs ADD FULLTEXT INDEX (message); +INSERT INTO logs(id, record) +VALUES (2, '{"level": "info", "message": "start server"}'); +INSERT INTO logs(id, record) +VALUES (3, '{"level": "warn", "message": "abort server"}'); +SELECT * FROM logs WHERE MATCH(message) AGAINST('+start' IN BOOLEAN MODE); +id record message +2 {"level": "info", "message": "start server"} "start server" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_index.result new file mode 100644 index 000000000..09cd18915 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_index.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +level VARCHAR(255) GENERATED ALWAYS AS +(json_unquote(json_extract(`record`, '$.level'))) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) +VALUES (1, '{"level": "info", "message": "start server"}'); +ALTER TABLE logs ADD INDEX (level); +INSERT INTO logs(id, record) +VALUES (2, '{"level": "info", "message": "start server"}'); +INSERT INTO logs(id, record) +VALUES (3, '{"level": "warn", "message": "abort server"}'); +SELECT * FROM logs WHERE level = 'info'; +id record level +1 {"level": "info", "message": "start server"} info +2 {"level": "info", "message": "start server"} info +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_delete.result new file mode 100644 index 000000000..8c1ceaf13 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_delete.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +DELETE FROM logs WHERE id = 1; +SELECT * FROM logs; +id record message +2 {"level": "info", "message": "restart"} "restart" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_drop_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_drop_column.result new file mode 100644 index 000000000..7d3226175 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_drop_column.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +ALTER TABLE logs DROP COLUMN message; +SELECT * FROM logs; +id record +1 {"level": "info", "message": "start"} +2 {"level": "info", "message": "restart"} +3 {"level": "warn", "message": "abort"} +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_insert.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_insert.result new file mode 100644 index 000000000..5a0e63ed7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_insert.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs; +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_update.result new file mode 100644 index 000000000..2411f7a72 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_update.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; +SELECT * FROM logs; +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "shutdown"} "shutdown" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_cp932.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_cp932.result new file mode 100644 index 000000000..38185f5ec --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_cp932.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS users; +SET NAMES cp932; +CREATE TABLE users ( +id int unsigned PRIMARY KEY AUTO_INCREMENT, +–¼‘O text, +FULLTEXT INDEX (–¼‘O) +) DEFAULT CHARSET=cp932 COMMENT='Engine "InnoDB"'; +INSERT INTO users (–¼‘O) VALUES ("‚â‚Ü‚¾"); +INSERT INTO users (–¼‘O) VALUES ("‚½‚È‚©"); +INSERT INTO users (–¼‘O) VALUES ("‚·‚¸‚«"); +SELECT * FROM users; +id –¼‘O +1 ‚â‚Ü‚¾ +2 ‚½‚È‚© +3 ‚·‚¸‚« +SELECT * FROM users +WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); +id –¼‘O +2 ‚½‚È‚© +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_HASH_KEY ShortText + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_utf8.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_utf8.result new file mode 100644 index 000000000..2d3130739 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_utf8.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS users; +SET NAMES utf8; +CREATE TABLE users ( +id int unsigned PRIMARY KEY AUTO_INCREMENT, +åå‰ text, +FULLTEXT INDEX (åå‰) +) DEFAULT CHARSET=utf8 COMMENT='Engine "InnoDB"'; +INSERT INTO users (åå‰) VALUES ("ã‚„ã¾ã "); +INSERT INTO users (åå‰) VALUES ("ãŸãªã‹"); +INSERT INTO users (åå‰) VALUES ("ã™ãšã"); +SELECT * FROM users; +id åå‰ +1 ã‚„ã¾ã  +2 ãŸãªã‹ +3 ã™ãšã +SELECT * FROM users +WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); +id åå‰ +2 ãŸãªã‹ +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_HASH_KEY ShortText + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star.result new file mode 100644 index 000000000..7822d1187 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star.result @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id int PRIMARY KEY +) COMMENT='ENGINE "InnoDB"'; +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); +SELECT COUNT(*) FROM ids; +COUNT(*) +3 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_mysql_5_7_or_later_with_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_mysql_5_7_or_later_with_index.result new file mode 100644 index 000000000..141117f60 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_mysql_5_7_or_later_with_index.result @@ -0,0 +1,30 @@ +CREATE TABLE diaries_innodb ( +id INT PRIMARY KEY AUTO_INCREMENT, +body TEXT, +flag TINYINT(2), +INDEX (flag) +) ENGINE = InnoDB DEFAULT CHARSET UTF8; +CREATE TABLE diaries_mroonga ( +id INT PRIMARY KEY AUTO_INCREMENT, +body TEXT, +flag TINYINT(2), +INDEX (flag) +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; +INSERT INTO diaries_innodb (body) VALUES ("will start groonga!"); +INSERT INTO diaries_innodb (body) VALUES ("starting groonga..."); +INSERT INTO diaries_innodb (body) VALUES ("started groonga."); +INSERT INTO diaries_mroonga (body) VALUES ("will start groonga!"); +INSERT INTO diaries_mroonga (body) VALUES ("starting groonga..."); +INSERT INTO diaries_mroonga (body) VALUES ("started groonga."); +EXPLAIN SELECT COUNT(*) FROM diaries_innodb; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE diaries_innodb NULL index NULL flag 2 NULL 3 100.00 Using index +Warnings: +Note 1003 /* select#1 */ select count(0) AS `COUNT(*)` from `test`.`diaries_innodb` +EXPLAIN SELECT COUNT(*) FROM diaries_mroonga; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE diaries_mroonga NULL index NULL flag 2 NULL 3 100.00 Using index +Warnings: +Note 1003 /* select#1 */ select count(0) AS `COUNT(*)` from `test`.`diaries_mroonga` +DROP TABLE diaries_innodb; +DROP TABLE diaries_mroonga; 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 a6d2f7862..1ebd0ba87 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 @@ -18,9 +18,9 @@ INSERT INTO diaries_mroonga (body) VALUES ("starting groonga..."); INSERT INTO diaries_mroonga (body) VALUES ("started groonga."); EXPLAIN SELECT COUNT(*) FROM diaries_innodb; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE diaries_innodb index NULL flag 2 NULL 3 Using index +1 SIMPLE diaries_innodb index NULL flag 2 NULL # Using index EXPLAIN SELECT COUNT(*) FROM diaries_mroonga; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE diaries_mroonga index NULL flag 2 NULL 3 Using index +1 SIMPLE diaries_mroonga index NULL flag 2 NULL # Using index DROP TABLE diaries_innodb; DROP TABLE diaries_mroonga; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_comment_combined.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_comment_combined.result index ce1b54702..3610ab6f5 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_comment_combined.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_comment_combined.result @@ -3,10 +3,12 @@ CREATE TABLE bugs ( id INT UNSIGNED PRIMARY KEY ) DEFAULT CHARSET=utf8 COMMENT='Free style normal comment, engine "InnoDB"'; -SHOW CREATE TABLE bugs; -Table Create Table -bugs CREATE TABLE `bugs` ( - `id` int(10) unsigned NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='Free style normal comment, engine "InnoDB"' +SELECT mroonga_command("dump --dump_plugins no"); +mroonga_command("dump --dump_plugins no") +table_create bugs TABLE_HASH_KEY ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_comment.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_comment.result index fb03bfe8d..6ff4c1053 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_comment.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_comment.result @@ -5,5 +5,5 @@ FULLTEXT INDEX (content) COMMENT '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 +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_flags_none.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_none.result index 4a7107146..9048b677a 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_none.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_none.result @@ -5,5 +5,5 @@ FULLTEXT INDEX (content) COMMENT '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 +column_create memos#content index COLUMN_INDEX memos DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_parameter.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_parameter.result index 6e00526c7..1c701d0eb 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_parameter.result @@ -12,5 +12,5 @@ memos CREATE TABLE `memos` ( ) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' 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 +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_index_flags_none.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_none.result index 08bdd72ee..e378ba3b7 100644 --- 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 @@ -5,5 +5,5 @@ 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 +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 index a5ac716d3..1367a3adb 100644 --- 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 @@ -5,5 +5,5 @@ 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 +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_normalizer_fulltext_index_bin.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_normalizer_fulltext_index_bin.result new file mode 100644 index 000000000..5230963af --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_normalizer_fulltext_index_bin.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id INT NOT NULL PRIMARY KEY, +content TEXT NOT NULL, +FULLTEXT INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(11) NOT NULL, + `content` text COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) COMMENT 'normalizer "NormalizerAuto"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='ENGINE "InnoDB"' +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; 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 index 7ee07329f..4d9d20dc8 100644 --- 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 @@ -5,15 +5,11 @@ body text, fulltext index body_index (body) comment 'parser "TokenBigramSplitSymbolAlphaDigit"' ) comment = 'engine "innodb"' default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +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; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_multiple_token_filters.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_multiple_token_filters.result index e1e32dccc..7f4885fb0 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_multiple_token_filters.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_multiple_token_filters.result @@ -11,7 +11,12 @@ 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 +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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +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_one_token_filter.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_one_token_filter.result index 11ee04e29..2d7c67489 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_one_token_filter.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_one_token_filter.result @@ -11,7 +11,12 @@ 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 +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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +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_parameter.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_parameter.result index f6d6be1b6..4626d1443 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_parameter.result @@ -19,7 +19,12 @@ 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 +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 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +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_tokenizer_comment.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_comment.result index f6e15804f..34e3f88db 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_comment.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_comment.result @@ -5,14 +5,6 @@ body text, fulltext index body_index (body) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' ) comment = 'engine "innodb"' default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) COMMENT 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_parameter.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_parameter.result index ddec8fdad..219d8e08d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_parameter.result @@ -4,14 +4,6 @@ id int PRIMARY KEY AUTO_INCREMENT, body text, FULLTEXT INDEX body_index (body) TOKENIZER='TokenBigramSplitSymbolAlphaDigit' ) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) `TOKENIZER`='TokenBigramSplitSymbolAlphaDigit' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); INSERT INTO diaries (body) VALUES ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/drop_table_new_connection.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/drop_table_new_connection.result new file mode 100644 index 000000000..f7d5b439b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/drop_table_new_connection.result @@ -0,0 +1,13 @@ +CREATE TABLE logs ( +id INT PRIMARY KEY AUTO_INCREMENT, +message TEXT, +FULLTEXT INDEX (message) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +USE test; +DROP TABLE logs; +CREATE TABLE logs ( +id INT PRIMARY KEY AUTO_INCREMENT, +message TEXT, +FULLTEXT INDEX (message) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_leading_not.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_leading_not.result index 08c37695f..8614eaa73 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_leading_not.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_leading_not.result @@ -6,15 +6,6 @@ title VARCHAR(255), content TEXT, 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, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_multiple_match_against.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_multiple_match_against.result index b0bff2845..1ecf18cb1 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_multiple_match_against.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_multiple_match_against.result @@ -7,16 +7,6 @@ content TEXT, FULLTEXT INDEX (title), 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, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries VALUES(1, "富士山", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気 1月1日", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, "天気 4月4日", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_index_recreate.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_index_recreate.result index fd07ea679..d3bdfca0d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_index_recreate.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_index_recreate.result @@ -6,15 +6,6 @@ title varchar(255), content text, FULLTEXT INDEX (title) ) DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries VALUES (1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES (2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES (3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_select.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_select.result index 7391ee4ba..c25b47c6b 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_select.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_select.result @@ -6,7 +6,11 @@ insert into t1 values (2, "ka ki ku ke ko"); insert into t1 values (3, "aa ii ii ii oo"); insert into t1 values (4, "sa si su se so"); insert into t1 values (5, "ta ti ii ii to"); -insert into t2 (c1,c2) select c1,c2 from t1; +insert into t2 values (1, "aa ii uu ee oo"); +insert into t2 values (2, "ka ki ku ke ko"); +insert into t2 values (3, "aa ii ii ii oo"); +insert into t2 values (4, "sa si su se so"); +insert into t2 values (5, "ta ti ii ii to"); select * from t1; c1 c2 1 aa ii uu ee oo diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_values.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_values.result index 8e1b0845e..f4719cbdd 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_values.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_values.result @@ -1,13 +1,5 @@ drop table if exists t1, t2, t3; create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)) COMMENT = 'engine "innodb"'; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` text, - PRIMARY KEY (`c1`), - FULLTEXT KEY `ft` (`c2`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' insert into t1 values (1, "hoge hoge"); insert into t1 values (2, "fuga fuga"); insert into t1 values (3, "moge moge"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_many_records.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_many_records.result index 03cf96b55..9d1e838b8 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_many_records.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_many_records.result @@ -5,14 +5,6 @@ id int primary key, title varchar(255), fulltext index (title) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' set autocommit=0; insert into diaries values(0, "2011-07-14"); insert into diaries values(1, "2011-07-15"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_matched_and_not_matched_have_where_no_order.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_matched_and_not_matched_have_where_no_order.result index 81ce556e7..39ab80edf 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_matched_and_not_matched_have_where_no_order.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_matched_and_not_matched_have_where_no_order.result @@ -10,15 +10,18 @@ FULLTEXT KEY (not_matched) INSERT INTO texts VALUES (1, 'Hello1', 'World1'); INSERT INTO texts VALUES (2, 'Hello2', 'World2'); INSERT INTO texts VALUES (3, 'Hello3', 'World3'); -SELECT id, +SELECT * +FROM (SELECT id, matched, not_matched, MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE), MATCH(not_matched) AGAINST('+Hello' IN BOOLEAN MODE) FROM texts -WHERE MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE); +WHERE MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE)) +AS searched_texts +ORDER BY id; id matched not_matched MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE) MATCH(not_matched) AGAINST('+Hello' IN BOOLEAN MODE) 1 Hello1 World1 1 0 -3 Hello3 World3 1 0 2 Hello2 World2 1 0 +3 Hello3 World3 1 0 DROP TABLE texts; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_delete.result index 64acf4aae..fbdf241b8 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_delete.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_delete.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), 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, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_insert.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_insert.result index c1661d7fc..074d19915 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_insert.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_insert.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), 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, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_recreate.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_recreate.result index 604aca172..756a70217 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_recreate.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_recreate.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), 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, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_update.result index 6f489bf37..db869eaa6 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_update.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_update.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), 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, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_index.result index d9448ee82..7121e5109 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_index.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_index.result @@ -6,16 +6,6 @@ body text, fulltext index title_index (title), fulltext index body_index (body) ) comment = 'engine "innodb"' 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 `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' 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."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_myisam.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_myisam.result index 860c8e548..90376bdf1 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_myisam.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_myisam.result @@ -1,13 +1,5 @@ drop table if exists t1, t2, t3; create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)) COMMENT = 'engine "myisam"'; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` text, - PRIMARY KEY (`c1`), - FULLTEXT KEY `ft` (`c2`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "myisam"' insert into t1 values (1, "hoge hoge"); insert into t1 values (2, "fuga fuga"); insert into t1 values (3, "moge moge"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_TODO_SPLIT_ME.result index 74d7426eb..f79798cec 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_TODO_SPLIT_ME.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_TODO_SPLIT_ME.result @@ -1,23 +1,13 @@ DROP TABLE IF EXISTS diaries; SET NAMES UTF8; CREATE TABLE ft( -a INT, +a INT DEFAULT 0, b TEXT, c TEXT, PRIMARY KEY(a), FULLTEXT KEY ftx1(b), FULLTEXT KEY ftx2(c) )ENGINE=Mroonga DEFAULT CHARSET=UTF8 COMMENT = 'engine "innodb"'; -SHOW CREATE TABLE ft; -Table Create Table -ft CREATE TABLE `ft` ( - `a` int(11) NOT NULL, - `b` text, - `c` text, - PRIMARY KEY (`a`), - FULLTEXT KEY `ftx1` (`b`), - FULLTEXT KEY `ftx2` (`c`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' INSERT INTO ft VALUES(1,'aaaaa','abcde'); INSERT INTO ft VALUES(2,'bbbbb','bcdef'); INSERT INTO ft VALUES(3,'ccccc','cdefg'); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_transaction.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_transaction.result index 3da64b2de..3ee15c63b 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_transaction.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_transaction.result @@ -6,16 +6,6 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) COMMENT = 'ENGINE "InnoDB"' 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 `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' START TRANSACTION; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); 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 b3f5bee27..550554eac 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result @@ -5,15 +5,6 @@ name text, location geometry NOT NULL, spatial key location_index (location) ) comment = 'engine "innodb"'; -show create table shops; -Table Create Table -shops CREATE TABLE `shops` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - `location` geometry NOT NULL, - PRIMARY KEY (`id`), - SPATIAL KEY `location_index` (`location`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' insert into shops (name, location) values ('nezu-no-taiyaki', ST_GeomFromText('POINT(139.762573 35.720253)')); 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 28b981f9c..615d185f7 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result @@ -5,15 +5,6 @@ name text, location geometry NOT NULL, spatial key location_index (location) ) comment = 'engine "innodb"'; -show create table shops; -Table Create Table -shops CREATE TABLE `shops` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - `location` geometry NOT NULL, - PRIMARY KEY (`id`), - SPATIAL KEY `location_index` (`location`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' insert into shops (name, location) values ('sazare', ST_GeomFromText('POINT(139.685043 35.714653)')); 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 20de4a32c..adfb53e10 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result @@ -5,15 +5,6 @@ name text, location geometry NOT NULL, spatial key location_index (location) ) comment = 'engine "innodb"'; -show create table shops; -Table Create Table -shops CREATE TABLE `shops` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - `location` geometry NOT NULL, - PRIMARY KEY (`id`), - SPATIAL KEY `location_index` (`location`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' insert into shops (name, location) values ('sazare', ST_GeomFromText('POINT(139.685043 35.714653)')); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_bulk.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_bulk.result index be6141947..552cf5868 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_bulk.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_bulk.result @@ -5,14 +5,6 @@ id int primary key, content text, 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, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' LOCK TABLE diaries WRITE; insert into diaries values(1, "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/multi_range_read_mysql_5_7_or_later_disk_sweep.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/multi_range_read_mysql_5_7_or_later_disk_sweep.result new file mode 100644 index 000000000..bf1e67b93 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/multi_range_read_mysql_5_7_or_later_disk_sweep.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS integers; +SET optimizer_switch='mrr_cost_based=off'; +CREATE TABLE integers ( +id INT PRIMARY KEY AUTO_INCREMENT, +value INT, +KEY (value) +) COMMENT='engine "InnoDB"'; +INSERT INTO integers (value) VALUES (0), (1), (2), (3); +EXPLAIN SELECT * FROM integers +WHERE value IN (0, 2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE integers NULL range value value 5 NULL 2 100.00 Using where; Using MRR +Warnings: +Note 1003 /* select#1 */ select `test`.`integers`.`id` AS `id`,`test`.`integers`.`value` AS `value` from `test`.`integers` where (`test`.`integers`.`value` in (0,2)) +SELECT * FROM integers +WHERE value IN (0, 2); +id value +1 0 +3 2 +DROP TABLE integers; 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 e330fa18c..8258a03bf 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 @@ -6,15 +6,6 @@ title TEXT, body TEXT, FULLTEXT INDEX body_index (body) ) COMMENT = 'engine "innodb"' 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 COMMENT='engine "innodb"' 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."); 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 a50123848..cca7aee95 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 @@ -6,15 +6,6 @@ title TEXT, body TEXT, FULLTEXT INDEX body_index (body) ) COMMENT = 'engine "innodb"' 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 COMMENT='engine "innodb"' 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."); @@ -23,7 +14,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.0000106' (No such file or directory) +ERROR HY000: system call error: No such file or directory: failed to open path: 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/temporary_table.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/temporary_table.result index b01e85aa4..d66b463d7 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/temporary_table.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/temporary_table.result @@ -3,13 +3,6 @@ CREATE TEMPORARY TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT ) DEFAULT CHARSET=UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TEMPORARY TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title) VALUES ("clear day"); INSERT INTO diaries (title) VALUES ("rainy day"); INSERT INTO diaries (title) VALUES ("cloudy day"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_delete.result index 11cc18742..9082032ff 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_delete.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_delete.result @@ -6,16 +6,6 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) COMMENT = 'ENGINE "InnoDB"' 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 `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' 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."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_update.result index 7dde8518d..0a424e778 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_update.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_update.result @@ -6,16 +6,6 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) COMMENT = 'ENGINE "InnoDB"' 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 `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' 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."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/truncate.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/truncate.result index d41231ddd..296f87ade 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/truncate.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/truncate.result @@ -10,19 +10,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8 COMMENT = 'engine "innodb"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_delete.result index e451b2b99..ccc28a0f4 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_delete.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_delete.result @@ -4,14 +4,6 @@ id int primary key auto_increment, body text, fulltext index body_index (body) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries (body) values ("will start groonga!"); insert into diaries (body) values ("starting groonga..."); insert into diaries (body) values ("started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_insert.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_insert.result index f11398f37..a9bdd38fa 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_insert.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_insert.result @@ -4,14 +4,6 @@ id int primary key auto_increment, body text, fulltext index body_index (body) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries (body) values ("will start groonga!"); select * from diaries; id body diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_update.result index 47a844c8e..b2fe4607f 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_update.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_update.result @@ -4,14 +4,6 @@ id int primary key auto_increment, body text, fulltext index body_index (body) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries (body) values ("will start groonga!"); set mroonga_dry_write=true; update diaries set body = "starting groonga..." where id = 1; 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 c98847cb5..9405879f4 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 @@ -3,17 +3,8 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, -FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `tags` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"' -) 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 ("gr" IN BOOLEAN MODE); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_session.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_session.result index 3d94ebc93..fa2da48cc 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_session.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_session.result @@ -3,17 +3,8 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, -FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `tags` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"' -) 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); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm b/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm index 7e4f8c177..528ccc5d6 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm +++ b/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm @@ -5,7 +5,7 @@ package My::Suite::Mroonga; return "No Mroonga engine" unless $ENV{HA_MROONGA_SO} or $::mysqld_variables{'mroonga'} eq "ON"; -sub is_default { not $::opt_embedded_server } +sub is_default { 1 } my $groonga_normalizer_mysql_dir=$::basedir . '/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql'; my $groonga_normalizer_mysql_install_dir=$::basedir . '/lib/groonga/plugins'; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column.test index bb4d53899..a6d25d3f4 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; @@ -39,8 +38,6 @@ INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga..."); INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); SELECT * FROM diaries; -SHOW CREATE TABLE diaries; - DROP TABLE diaries; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_cp932.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_cp932.test new file mode 100644 index 000000000..49f65449a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_cp932.test @@ -0,0 +1,54 @@ +# Copyright(C) 2016 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES cp932; + +CREATE TABLE users ( + id int unsigned PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET=cp932 COMMENT='Engine "InnoDB"'; +ALTER TABLE users + ADD COLUMN –¼‘O text, + ADD FULLTEXT INDEX (–¼‘O); + +INSERT INTO users (–¼‘O) VALUES ("‚â‚Ü‚¾"); +INSERT INTO users (–¼‘O) VALUES ("‚½‚È‚©"); +INSERT INTO users (–¼‘O) VALUES ("‚·‚¸‚«"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_utf8.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_utf8.test new file mode 100644 index 000000000..bd5c7389b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_utf8.test @@ -0,0 +1,54 @@ +# Copyright(C) 2016 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES utf8; + +CREATE TABLE users ( + id int unsigned PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET=utf8 COMMENT='Engine "InnoDB"'; +ALTER TABLE users + ADD COLUMN åå‰ text, + ADD FULLTEXT INDEX (åå‰); + +INSERT INTO users (åå‰) VALUES ("ã‚„ã¾ã "); +INSERT INTO users (åå‰) VALUES ("ãŸãªã‹"); +INSERT INTO users (åå‰) VALUES ("ã™ãšã"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_column_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_column_comment.test index a1d5c28ba..dc98dc9c5 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_column_comment.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_column_comment.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_engine.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_engine.test index e1b657b7e..d466b4466 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_engine.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_engine.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc @@ -29,7 +29,9 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) ENGINE MyISAM DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; +SELECT table_name, engine, table_comment + FROM information_schema.tables + WHERE table_name = 'diaries'; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); @@ -38,7 +40,9 @@ SELECT * FROM diaries MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); ALTER TABLE diaries ENGINE = mroonga COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; +SELECT table_name, engine, table_comment + FROM information_schema.tables + WHERE table_name = 'diaries'; SELECT * FROM diaries WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_comment_change_engine.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_comment_change_engine.test index 645d3dad7..ff2b6b47e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_comment_change_engine.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_comment_change_engine.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,14 +28,15 @@ CREATE TABLE memos ( content TEXT, FULLTEXT INDEX(content) ) DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"'; -SHOW CREATE TABLE memos; INSERT INTO memos (title, content) VALUES ("Hello", "I start to write memos!"); INSERT INTO memos (title, content) VALUES ("groonga", "I start to use groonga!"); INSERT INTO memos (title, content) VALUES ("mroonga", "I use mroonga too!"); ALTER TABLE memos COMMENT='engine "MyISAM"'; -SHOW CREATE TABLE memos; +SELECT table_name, table_comment + FROM information_schema.tables + WHERE table_name = 'memos'; SELECT * FROM memos; SELECT * FROM memos WHERE MATCH(content) AGAINST("start" IN BOOLEAN MODE); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_create_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_create_fulltext.test index 68bf5c9bb..13344843e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_create_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_create_fulltext.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_fulltext.test index 0cd02e181..7bfd5fe50 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_fulltext.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_multiple_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_multiple_column.test index 217df7a1e..f05945e1b 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_multiple_column.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_multiple_column.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_normal.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_normal.test index ea3ef4f14..f272698c1 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_normal.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_normal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_primary.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_primary.test index 107f4a9a7..e1de36d25 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_primary.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_primary.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_updating.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_updating.test index 3c63d4a14..2c994bdcc 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_updating.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_updating.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_drop_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_drop_column.test index cc4b79ebf..01fce22c3 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_drop_column.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_drop_column.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc @@ -27,13 +27,11 @@ CREATE TABLE diaries ( title TEXT, body TEXT ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); SELECT * FROM diaries; ALTER TABLE diaries DROP COLUMN body; -SHOW CREATE TABLE diaries; SELECT * FROM diaries; INSERT INTO diaries (title) values ("groonga (1)"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_fulltext.test index e92a2e5c7..bc451c354 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_fulltext.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_lock_tables.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_lock_tables.test index f5f7e307d..66ee293bf 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_lock_tables.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_lock_tables.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_multiple_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_multiple_column.test index 587102c3d..f364ba3d7 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_multiple_column.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_multiple_column.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_normal.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_normal.test index 2f28eef15..7b72b113c 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_normal.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_normal.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_primary.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_primary.test index aaff5f90b..25cdc13ac 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_primary.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_primary.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_fulltext.test index 62e56899a..671b96172 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_fulltext.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( title TEXT, FULLTEXT INDEX title_index (title) ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; @@ -50,8 +49,6 @@ SELECT * FROM diaries WHERE MATCH(title) AGAINST("groonga") AND MATCH(body) AGAINST("starting"); -SHOW CREATE TABLE diaries; - DROP TABLE diaries; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_rename_table.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_rename_table.test index c84e86594..288e5cdc0 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_rename_table.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_rename_table.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc @@ -29,7 +29,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); SELECT * FROM diaries; @@ -43,8 +42,6 @@ SELECT * FROM memos WHERE MATCH(title) AGAINST("groonga") AND MATCH(body) AGAINST("starting"); -SHOW CREATE TABLE memos; - DROP TABLE memos; --source ../../include/mroonga/have_mroonga_deinit.inc 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 34c8bc02a..bcc043485 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 @@ -12,12 +12,12 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --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_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -144,8 +144,6 @@ ALTER TABLE shops ADD SPATIAL KEY location_index (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; - DROP TABLE shops; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/auto_increment_text.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/auto_increment_text.test index b4ebd69a5..57af6f121 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/auto_increment_text.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/auto_increment_text.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/binlog_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/binlog_TODO_SPLIT_ME.test index 224bdfa07..1c120f364 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/binlog_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/binlog_TODO_SPLIT_ME.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/have_log_bin.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/check_table_for_upgrade.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/check_table_for_upgrade.test new file mode 100644 index 000000000..c6d4a9246 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/check_table_for_upgrade.test @@ -0,0 +1,44 @@ +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; + +CREATE TABLE memos ( + id int NOT NULL PRIMARY KEY, + content text, + FULLTEXT INDEX (content) +) COMMENT='engine "InnoDB"'; + +INSERT INTO memos VALUES (1, 'Hello MySQL'); +INSERT INTO memos VALUES (2, 'Hello Mroonga'); + +CHECK TABLE memos FOR UPGRADE; + +FLUSH TABLES; + +SELECT * FROM memos + WHERE MATCH(content) AGAINST('+mroonga' IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_comment_index_not_for_mroonga.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_comment_index_not_for_mroonga.test index 2adbae8af..de195a5b9 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_comment_index_not_for_mroonga.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_comment_index_not_for_mroonga.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_add_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_add_column.test new file mode 100644 index 000000000..e10ecfe9b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_add_column.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); + +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED; +ALTER TABLE logs ADD FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"'; + +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_delete.test new file mode 100644 index 000000000..784f419e2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_delete.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +DELETE FROM logs WHERE id = 1; + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_drop_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_drop_column.test new file mode 100644 index 000000000..de2e40680 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_drop_column.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +ALTER TABLE logs DROP COLUMN message; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_insert.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_insert.test new file mode 100644 index 000000000..a8fcf191e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_insert.test @@ -0,0 +1,41 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_reindex.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_reindex.test new file mode 100644 index 000000000..db4f0ed44 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_reindex.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +ALTER TABLE logs DISABLE KEYS; +ALTER TABLE logs ENABLE KEYS; + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_update.test new file mode 100644 index 000000000..a59e5b6c4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_update.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; + +SELECT * FROM logs WHERE MATCH(message) AGAINST("hut" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_column.test new file mode 100644 index 000000000..502fb1502 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_column.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); + +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL; + +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_fulltext_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_fulltext_index.test new file mode 100644 index 000000000..5103a91e9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_fulltext_index.test @@ -0,0 +1,46 @@ +# Copyright(C) 2017 Naoya Murakami +# Copyright(C) 2017 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mariadb_10_2_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) + VALUES (1, '{"level": "info", "message": "start server"}'); + +ALTER TABLE logs ADD FULLTEXT INDEX (message); + +INSERT INTO logs(id, record) + VALUES (2, '{"level": "info", "message": "start server"}'); +INSERT INTO logs(id, record) + VALUES (3, '{"level": "warn", "message": "abort server"}'); + +SELECT * FROM logs WHERE MATCH(message) AGAINST('+start' IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_index.test new file mode 100644 index 000000000..3b3b67c97 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_index.test @@ -0,0 +1,47 @@ +# Copyright(C) 2017 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + level VARCHAR(255) GENERATED ALWAYS AS + (json_unquote(json_extract(`record`, '$.level'))) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) + VALUES (1, '{"level": "info", "message": "start server"}'); + +ALTER TABLE logs ADD INDEX (level); + +INSERT INTO logs(id, record) + VALUES (2, '{"level": "info", "message": "start server"}'); +INSERT INTO logs(id, record) + VALUES (3, '{"level": "warn", "message": "abort server"}'); + +SELECT * FROM logs WHERE level = 'info'; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_delete.test new file mode 100644 index 000000000..73848a3f2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_delete.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +DELETE FROM logs WHERE id = 1; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_drop_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_drop_column.test new file mode 100644 index 000000000..cd5a9cb40 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_drop_column.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +ALTER TABLE logs DROP COLUMN message; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_insert.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_insert.test new file mode 100644 index 000000000..a5180a973 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_insert.test @@ -0,0 +1,40 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_update.test new file mode 100644 index 000000000..c266ffe6e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_update.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_cp932.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_cp932.test new file mode 100644 index 000000000..cea67376f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_cp932.test @@ -0,0 +1,53 @@ +# Copyright(C) 2016 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES cp932; + +CREATE TABLE users ( + id int unsigned PRIMARY KEY AUTO_INCREMENT, + –¼‘O text, + FULLTEXT INDEX (–¼‘O) +) DEFAULT CHARSET=cp932 COMMENT='Engine "InnoDB"'; + +INSERT INTO users (–¼‘O) VALUES ("‚â‚Ü‚¾"); +INSERT INTO users (–¼‘O) VALUES ("‚½‚È‚©"); +INSERT INTO users (–¼‘O) VALUES ("‚·‚¸‚«"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_utf8.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_utf8.test new file mode 100644 index 000000000..f1e0f3941 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_utf8.test @@ -0,0 +1,53 @@ +# Copyright(C) 2016 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES utf8; + +CREATE TABLE users ( + id int unsigned PRIMARY KEY AUTO_INCREMENT, + åå‰ text, + FULLTEXT INDEX (åå‰) +) DEFAULT CHARSET=utf8 COMMENT='Engine "InnoDB"'; + +INSERT INTO users (åå‰) VALUES ("ã‚„ã¾ã "); +INSERT INTO users (åå‰) VALUES ("ãŸãªã‹"); +INSERT INTO users (åå‰) VALUES ("ã™ãšã"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_normal_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_normal_comment.test index 2e9674c86..ba5786d05 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_normal_comment.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_normal_comment.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star.test new file mode 100644 index 000000000..b557a9651 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star.test @@ -0,0 +1,36 @@ +# Copyright(C) 2016 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id int PRIMARY KEY +) COMMENT='ENGINE "InnoDB"'; + +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); + +SELECT COUNT(*) FROM ids; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_mysql_5_7_or_later_with_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_mysql_5_7_or_later_with_index.test new file mode 100644 index 000000000..b329d9a5f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_mysql_5_7_or_later_with_index.test @@ -0,0 +1,55 @@ +# Copyright(C) 2011-2016 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +CREATE TABLE diaries_innodb ( + id INT PRIMARY KEY AUTO_INCREMENT, + body TEXT, + flag TINYINT(2), + INDEX (flag) +) ENGINE = InnoDB DEFAULT CHARSET UTF8; + +CREATE TABLE diaries_mroonga ( + id INT PRIMARY KEY AUTO_INCREMENT, + body TEXT, + flag TINYINT(2), + INDEX (flag) +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; + +INSERT INTO diaries_innodb (body) VALUES ("will start groonga!"); +INSERT INTO diaries_innodb (body) VALUES ("starting groonga..."); +INSERT INTO diaries_innodb (body) VALUES ("started groonga."); + +INSERT INTO diaries_mroonga (body) VALUES ("will start groonga!"); +INSERT INTO diaries_mroonga (body) VALUES ("starting groonga..."); +INSERT INTO diaries_mroonga (body) VALUES ("started groonga."); + +EXPLAIN SELECT COUNT(*) FROM diaries_innodb; +EXPLAIN SELECT COUNT(*) FROM diaries_mroonga; + +DROP TABLE diaries_innodb; +DROP TABLE diaries_mroonga; + +--source ../../include/mroonga/have_mroonga_deinit.inc 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 6fd0ff197..0a3a5c818 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-2015 Kouhei Sutou +# Copyright(C) 2011-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,9 +12,10 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_query_log @@ -45,7 +46,9 @@ INSERT INTO diaries_mroonga (body) VALUES ("will start groonga!"); INSERT INTO diaries_mroonga (body) VALUES ("starting groonga..."); INSERT INTO diaries_mroonga (body) VALUES ("started groonga."); +-- replace_column 9 # EXPLAIN SELECT COUNT(*) FROM diaries_innodb; +-- replace_column 9 # EXPLAIN SELECT COUNT(*) FROM diaries_mroonga; DROP TABLE diaries_innodb; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_TODO_SPLIT_ME.test index 4eab593cf..1c0d44501 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_TODO_SPLIT_ME.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -65,6 +65,8 @@ create table t1 (c1 time primary key) COMMENT = 'engine "innodb"'; desc t1; drop table t1; create table t1 (c1 timestamp primary key) COMMENT = 'engine "innodb"'; +# For MariaDB 10.2.3 +-- replace_result current_timestamp() CURRENT_TIMESTAMP desc t1; drop table t1; create table t1 (c1 datetime primary key) COMMENT = 'engine "innodb"'; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test index f2d4cf80e..eaad5ed47 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,7 @@ CREATE TABLE bugs ( ) DEFAULT CHARSET=utf8 COMMENT='Free style normal comment, engine "InnoDB"'; -SHOW CREATE TABLE bugs; +SELECT mroonga_command("dump --dump_plugins no"); DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_comment.test index aa6b1f01f..6daa5acfd 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_comment.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_comment.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_none.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_none.test index d116aa6cd..22d28e941 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_none.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_none.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_parameter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_parameter.test index 3c6bb52d1..c3b689580 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_parameter.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source include/have_innodb.inc 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 index b433e54e8..06cb7658c 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.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 index 47cededee..84dc9d852 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_comment.test index 0d26c751c..8846821cf 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_comment.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_comment.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_fulltext_index_bin.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_fulltext_index_bin.test new file mode 100644 index 000000000..5454b1763 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_fulltext_index_bin.test @@ -0,0 +1,40 @@ +# Copyright(C) 2016 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-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; + +CREATE TABLE memos ( + id INT NOT NULL PRIMARY KEY, + content TEXT NOT NULL, + FULLTEXT INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +SHOW CREATE TABLE memos; + +INSERT INTO memos VALUES (1, "1æ—¥ã®æ¶ˆè²»ãŒã¯ç´„2000㌔ãŒ"); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("+カロリー" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_parameter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_parameter.test index 141d15c3c..287d594b7 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_parameter.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source include/have_innodb.inc 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 index 151d15a98..54d63fbe4 100644 --- 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 @@ -12,8 +12,9 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source include/not_embedded.inc --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +28,6 @@ create table diaries ( fulltext index body_index (body) comment 'parser "TokenBigramSplitSymbolAlphaDigit"' ) comment = 'engine "innodb"' default charset utf8; -show create table diaries; insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_multiple_token_filters.test index d5487a3b8..c79744993 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_multiple_token_filters.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_multiple_token_filters.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_one_token_filter.test index 0d863c9f9..80bb5cf87 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_one_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_one_token_filter.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_parameter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_parameter.test index 0532c19db..99343ec60 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_parameter.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source include/have_innodb.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_comment.test index 0a55dd6ae..e3e6d671a 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_comment.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_comment.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ create table diaries ( fulltext index body_index (body) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' ) comment = 'engine "innodb"' default charset utf8; -show create table diaries; insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_parameter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_parameter.test index a2087ca8a..3eadb51a7 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_parameter.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source include/have_innodb.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( body text, FULLTEXT INDEX body_index (body) TOKENIZER='TokenBigramSplitSymbolAlphaDigit' ) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_TODO_SPLIT_ME.test index dae9bf033..b06a60671 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_TODO_SPLIT_ME.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_all.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_all.test index b25fc5968..ca33da8c3 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_all.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_all.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/drop_table_new_connection.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/drop_table_new_connection.test new file mode 100644 index 000000000..c0f492d19 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/drop_table_new_connection.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +CREATE TABLE logs ( + id INT PRIMARY KEY AUTO_INCREMENT, + message TEXT, + FULLTEXT INDEX (message) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +disable_query_log; +CONNECT(drop_connection, localhost, root); +enable_query_log; + +USE test; +DROP TABLE logs; + +disable_query_log; +CONNECTION default; +enable_query_log; + +CREATE TABLE logs ( + id INT PRIMARY KEY AUTO_INCREMENT, + message TEXT, + FULLTEXT INDEX (message) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_leading_not.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_leading_not.test index d835a2074..0234f831f 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_leading_not.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_leading_not.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ CREATE TABLE diaries ( content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET = UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_multiple_match_against.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_multiple_match_against.test index 9882883e5..73de4d5e7 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_multiple_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_multiple_match_against.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX (title), FULLTEXT INDEX (content) ) DEFAULT CHARSET = UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "富士山", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気 1月1日", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test index 1e57b56d6..14fba8d22 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test index 3fdad5365..9cfd841b7 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test index 53251eb2a..b28caa87e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test index f46f73220..1dfdc4969 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test index 8f8130b7b..66f7aaf88 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test index 6fa65d395..54278e976 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test index 9d7f887c9..459fd9135 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test index 7feca394f..3245501d6 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test index ade88c9c6..0e6994113 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_full_spec.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_full_spec.test index ecc1e0d0b..3191ff6c4 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_full_spec.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_full_spec.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_no_weight.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_no_weight.test index 384b951f5..90216c0a4 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_no_weight.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_no_weight.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_omit_section.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_omit_section.test index f259fc853..4a5512791 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_omit_section.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_omit_section.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_ascii.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_ascii.test index 4cec44d01..27af7f5d8 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_ascii.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_ascii.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_cp932.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_cp932.test index 169069fb6..912b3c9ee 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_cp932.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_cp932.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/have_cp932.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_eucjpms.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_eucjpms.test index cda39ce2a..56309998b 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_eucjpms.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_eucjpms.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/have_eucjpms.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_japanese.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_japanese.test index 93e78d6b4..589b4d79d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_japanese.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_japanese.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_index_recreate.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_index_recreate.test index 27af190ed..6b0764762 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_index_recreate.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_index_recreate.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ CREATE TABLE diaries ( content text, FULLTEXT INDEX (title) ) DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES (1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES (2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_select.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_select.test index 083384b04..d4364af2d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_select.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_select.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,11 @@ insert into t1 values (2, "ka ki ku ke ko"); insert into t1 values (3, "aa ii ii ii oo"); insert into t1 values (4, "sa si su se so"); insert into t1 values (5, "ta ti ii ii to"); -insert into t2 (c1,c2) select c1,c2 from t1; +insert into t2 values (1, "aa ii uu ee oo"); +insert into t2 values (2, "ka ki ku ke ko"); +insert into t2 values (3, "aa ii ii ii oo"); +insert into t2 values (4, "sa si su se so"); +insert into t2 values (5, "ta ti ii ii to"); select * from t1; select * from t2; select * from t1 where c1=3; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_values.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_values.test index f4b76888b..ea76dd055 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_values.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_values.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,7 +23,6 @@ drop table if exists t1, t2, t3; --enable_warnings create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)) COMMENT = 'engine "innodb"'; -show create table t1; insert into t1 values (1, "hoge hoge"); insert into t1 values (2, "fuga fuga"); insert into t1 values (3, "moge moge"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_many_records.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_many_records.test index 077504163..38e177002 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_many_records.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_many_records.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ create table diaries ( title varchar(255), fulltext index (title) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; set autocommit=0; insert into diaries values(0, "2011-07-14"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_matched_order.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_matched_order.test index 52700ad01..61ef72370 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_matched_order.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_matched_order.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_no_order.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_no_order.test index b362acd45..1cc2f6c29 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_no_order.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_no_order.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -35,13 +35,16 @@ INSERT INTO texts VALUES (1, 'Hello1', 'World1'); INSERT INTO texts VALUES (2, 'Hello2', 'World2'); INSERT INTO texts VALUES (3, 'Hello3', 'World3'); -SELECT id, - matched, - not_matched, - MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE), - MATCH(not_matched) AGAINST('+Hello' IN BOOLEAN MODE) - FROM texts - WHERE MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE); +SELECT * + FROM (SELECT id, + matched, + not_matched, + MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE), + MATCH(not_matched) AGAINST('+Hello' IN BOOLEAN MODE) + FROM texts + WHERE MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE)) + AS searched_texts + ORDER BY id; DROP TABLE texts; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_no_where_both_order.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_no_where_both_order.test index fa8fb7963..673ed5619 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_no_where_both_order.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_no_where_both_order.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_delete.test index d6defc1fc..2d2ffe7b0 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_delete.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_delete.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_insert.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_insert.test index ebf5c37ad..81047e783 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_insert.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_insert.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_recreate.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_recreate.test index 8ae0dd889..037784e42 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_recreate.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_recreate.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_update.test index a6c12aa17..72662d780 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_update.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_update.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_index.test index 58c0ea3fa..8ecb8eeec 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_index.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_index.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ create table diaries ( fulltext index title_index (title), fulltext index body_index (body) ) comment = 'engine "innodb"' 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..."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_myisam.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_myisam.test index 305f51d4a..818624392 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_myisam.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_myisam.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -22,7 +22,6 @@ drop table if exists t1, t2, t3; --enable_warnings create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)) COMMENT = 'engine "myisam"'; -show create table t1; insert into t1 values (1, "hoge hoge"); insert into t1 values (2, "fuga fuga"); insert into t1 values (3, "moge moge"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_not_match_against.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_not_match_against.test index 7fcffefd2..d65fdefd6 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_not_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_not_match_against.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_TODO_SPLIT_ME.test index cba565b02..55813bd3f 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,14 +23,13 @@ DROP TABLE IF EXISTS diaries; SET NAMES UTF8; CREATE TABLE ft( - a INT, + a INT DEFAULT 0, b TEXT, c TEXT, PRIMARY KEY(a), FULLTEXT KEY ftx1(b), FULLTEXT KEY ftx2(c) )ENGINE=Mroonga DEFAULT CHARSET=UTF8 COMMENT = 'engine "innodb"'; -SHOW CREATE TABLE ft; INSERT INTO ft VALUES(1,'aaaaa','abcde'); INSERT INTO ft VALUES(2,'bbbbb','bcdef'); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_transaction.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_transaction.test index 825cf3615..bcab5307e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_transaction.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_transaction.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; START TRANSACTION; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); @@ -39,22 +38,32 @@ SELECT * FROM diaries WHERE MATCH(body) AGAINST("groonga") ORDER BY id; +disable_query_log; CONNECT(search_connection, localhost, root); +enable_query_log; USE test; SELECT * FROM diaries WHERE MATCH(body) AGAINST("groonga") ORDER BY id; +disable_query_log; CONNECTION default; +enable_query_log; COMMIT; +disable_query_log; CONNECTION search_connection; +enable_query_log; SELECT * FROM diaries WHERE MATCH(body) AGAINST("groonga") ORDER BY id; +disable_query_log; DISCONNECT search_connection; +enable_query_log; +disable_query_log; CONNECTION default; +enable_query_log; SELECT * FROM diaries WHERE MATCH(body) AGAINST("groonga") ORDER BY id; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_reference.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_reference.test index 2cfd00b21..f08337af9 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_reference.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_reference.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_set.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_set.test index b5f7dd80c..d1be7ae64 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_set.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_set.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc 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 88fa88427..8c669052d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test @@ -12,11 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -29,7 +29,6 @@ create table shops ( location geometry NOT NULL, spatial key location_index (location) ) comment = 'engine "innodb"'; -show create table shops; insert into shops (name, location) values ('nezu-no-taiyaki', ST_GeomFromText('POINT(139.762573 35.720253)')); 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 655a84167..3a4d399be 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test @@ -12,11 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -29,7 +29,6 @@ create table shops ( location geometry NOT NULL, spatial key location_index (location) ) comment = 'engine "innodb"'; -show create table shops; insert into shops (name, location) values ('sazare', 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 6a7349581..db7aa344e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test @@ -12,11 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -29,7 +29,6 @@ create table shops ( location geometry NOT NULL, spatial key location_index (location) ) comment = 'engine "innodb"'; -show create table shops; insert into shops (name, location) values ('sazare', diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/index_force_index_not_used.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/index_force_index_not_used.test index b7a4dd4c3..1c73f30b6 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/index_force_index_not_used.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/index_force_index_not_used.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_TODO_SPLIT_ME.test index 87947f1ea..021d3f8e9 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_TODO_SPLIT_ME.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_bulk.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_bulk.test index a5edb8bae..b21dcc5b8 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_bulk.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_bulk.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ create table diaries ( content text, fulltext index (content) ) default charset utf8 comment = 'engine "innodb"'; -show create table diaries; LOCK TABLE diaries WRITE; insert into diaries values(1, "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.test index d16527644..3006bac6d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,6 +26,8 @@ CREATE TABLE diaries ( content TEXT NOT NULL, PRIMARY KEY (date, title) ) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "MyISAM"'; +# For MariaDB 10.2.3 +-- replace_result current_timestamp() CURRENT_TIMESTAMP SHOW CREATE TABLE diaries; INSERT INTO diaries (date, title, content) diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.test index d97823f77..ae993b76b 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,6 +27,8 @@ CREATE TABLE diaries ( content TEXT NOT NULL, UNIQUE INDEX (date, title) ) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "MyISAM"'; +# For MariaDB 10.2.3 +-- replace_result current_timestamp() CURRENT_TIMESTAMP SHOW CREATE TABLE diaries; INSERT INTO diaries (date, title, content) diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_disk_sweep.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_disk_sweep.test index dbe11f03b..ce9cf85e7 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_disk_sweep.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_disk_sweep.test @@ -1,5 +1,5 @@ # Copyright(C) 2013 Kenji Maruyama -# Copyright(C) 2013 Kouhei Sutou +# Copyright(C) 2013-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -13,10 +13,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mysql.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_mysql_5_7_or_later_disk_sweep.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_mysql_5_7_or_later_disk_sweep.test new file mode 100644 index 000000000..fb6529ef7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_mysql_5_7_or_later_disk_sweep.test @@ -0,0 +1,44 @@ +# Copyright(C) 2013 Kenji Maruyama +# Copyright(C) 2013-2016 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-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS integers; +--enable_warnings + +SET optimizer_switch='mrr_cost_based=off'; + +CREATE TABLE integers ( + id INT PRIMARY KEY AUTO_INCREMENT, + value INT, + KEY (value) +) COMMENT='engine "InnoDB"'; + +INSERT INTO integers (value) VALUES (0), (1), (2), (3); + +EXPLAIN SELECT * FROM integers + WHERE value IN (0, 2); + +SELECT * FROM integers + WHERE value IN (0, 2); + +DROP TABLE integers; + +--source ../../include/mroonga/have_mroonga_deinit.inc 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 078e0b6e2..9aeeef0e8 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 @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test index 07a497d78..4a2338714 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test index a74db4417..8b8e4754d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.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 index 25a02398a..f1b6ad62c 100644 --- 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test index 7d663bef6..5ea33c4e1 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc 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 d11a3efe9..31b437122 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 @@ -12,10 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc +--source ../../include/mroonga/skip_solaris.inc --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_mroonga_helper.inc @@ -28,7 +29,6 @@ CREATE TABLE diaries ( body TEXT, FULLTEXT INDEX body_index (body) ) COMMENT = 'engine "innodb"' 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..."); @@ -36,13 +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 ---remove_file $MYSQLD_DATADIR/repair_test.mrn.001 ---remove_file $MYSQLD_DATADIR/repair_test.mrn.0000000 ---remove_file $MYSQLD_DATADIR/repair_test.mrn.0000105 ---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 +--remove_files_wildcard $MYSQLD_DATADIR repair_test.mrn* 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 6d09479e5..f2b1f63a8 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 @@ -12,10 +12,11 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc +--source ../../include/mroonga/skip_solaris.inc --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_mroonga_helper.inc @@ -28,7 +29,6 @@ CREATE TABLE diaries ( body TEXT, FULLTEXT INDEX body_index (body) ) COMMENT = 'engine "innodb"' 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..."); @@ -36,14 +36,11 @@ 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.0000106 +--remove_file $MYSQLD_DATADIR/repair_test.mrn.000010A FLUSH TABLES; -# Error ER_CANT_OPEN_FILE syscall error 'repair_test.mrn.0000104' (No such file or directory) -# The (Error 0)[0]" replaces is for Solaris -# ---replace_result "(Error 0)[0]" "(No such file or directory)" +# Error ER_CANT_OPEN_FILE system call error: No such file or directory: failed to open path: --error ER_CANT_OPEN_FILE SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/temporary_table.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/temporary_table.test index 7d98ca0bf..143270dcf 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/temporary_table.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/temporary_table.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/skip_osx.inc @@ -27,7 +27,6 @@ CREATE TEMPORARY TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT ) DEFAULT CHARSET=UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title) VALUES ("clear day"); INSERT INTO diaries (title) VALUES ("rainy day"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_query_cache.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_query_cache.test index 905571548..7c8486416 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_query_cache.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_query_cache.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -31,22 +31,32 @@ SHOW CREATE TABLE simple_table; INSERT INTO simple_table (id) VALUES (1),(2); +disable_query_log; CONNECT(second_connection, localhost, root); +enable_query_log; USE test; START TRANSACTION; INSERT INTO simple_table (id) VALUES (3); +disable_query_log; CONNECTION default; +enable_query_log; SELECT * FROM simple_table; +disable_query_log; CONNECTION second_connection; +enable_query_log; COMMIT; +disable_query_log; CONNECTION default; +enable_query_log; SELECT * FROM simple_table; DROP TABLE simple_table; +disable_query_log; DISCONNECT second_connection; +enable_query_log; SET GLOBAL query_cache_size = @tmp_query_cache_size; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_delete.test index dd08d93cd..f11ca4a98 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_delete.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_delete.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) COMMENT = 'ENGINE "InnoDB"' 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..."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_update.test index ae9099a7a..36bc09be7 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_update.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_update.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) COMMENT = 'ENGINE "InnoDB"' 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..."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/truncate.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/truncate.test index 1920237fd..b021b26b5 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/truncate.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/truncate.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -32,7 +32,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8 COMMENT = 'engine "innodb"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/update_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/update_fulltext.test index 7afeee05f..9052c434c 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/update_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/update_fulltext.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/update_int.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/update_int.test index db1e2da9a..ffa26994e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/update_int.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/update_int.test @@ -13,7 +13,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_delete.test index 2757c94b4..c6f2a2a14 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_delete.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_delete.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries (body) values ("will start groonga!"); insert into diaries (body) values ("starting groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_insert.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_insert.test index 5e9585282..b80f60fcb 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_insert.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_insert.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries (body) values ("will start groonga!"); select * from diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_update.test index 8e9a9e330..ab75babfb 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_update.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_update.test @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries (body) values ("will start groonga!"); 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 ead26bca2..71d44ab57 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -25,9 +25,8 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, - FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' + FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); @@ -41,11 +40,17 @@ SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); SET GLOBAL mroonga_match_escalation_threshold = -1; --enable_warnings +disable_query_log; CONNECT(search_connection, localhost, root); +enable_query_log; USE test; + SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + +disable_query_log; DISCONNECT search_connection; CONNECTION default; +enable_query_log; SET GLOBAL mroonga_match_escalation_threshold = DEFAULT; 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 5f5ae1698..91196faf6 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 @@ -12,7 +12,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -25,9 +25,8 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, - FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' + FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); diff --git a/storage/mroonga/packages/apt/Makefile.am b/storage/mroonga/packages/apt/Makefile.am index ca0e1dcb1..0ebc7f67d 100644 --- a/storage/mroonga/packages/apt/Makefile.am +++ b/storage/mroonga/packages/apt/Makefile.am @@ -1,11 +1,12 @@ REPOSITORIES_PATH = repositories DISTRIBUTIONS = debian ARCHITECTURES = i386 amd64 -CODE_NAMES = wheezy jessie +CODE_NAMES = jessie stretch +MYSQL_VARIANTS = 5.5 mariadb-10.0 all: -release: build sign-packages update-repository sign-repository upload +release: download build sign-packages update-repository sign-repository upload remove-existing-packages: for distribution in $(DISTRIBUTIONS); do \ @@ -45,21 +46,44 @@ upload: ensure-rsync-path build: build-package-deb -build-package-deb: prepare-build-package-deb +build-package-deb: source env.sh vagrant destroy --force - for architecture in $(ARCHITECTURES); do \ - for code_name in $(CODE_NAMES); do \ - id=debian-$$code_name-$$architecture; \ - vagrant up $$id || exit 1; \ - vagrant destroy --force $$id; \ + for variant in $(MYSQL_VARIANTS); do \ + cp env.sh tmp/; \ + echo "MYSQL_VARIANT=$${variant}" >> tmp/env.sh; \ + for architecture in $(ARCHITECTURES); do \ + for code_name in $(CODE_NAMES); do \ + rm -rf tmp/debian; \ + if [ $${variant} = "5.5" -a $${code_name} = "stretch" ]; then \ + continue; \ + fi; \ + if [ $${code_name} = "stretch" ]; then \ + cp -rp $(srcdir)/../debian-mariadb-10.0 tmp/debian; \ + for f in `find tmp/debian -maxdepth 2 -type f`; do \ + RENAMED=`echo $$f | sed 's/10.0/10.1/'`; \ + sed -i'' 's/10.0/10.1/g' $${f}; \ + if [ $${f} = $$RENAMED ]; then \ + continue; \ + fi; \ + mv $${f} $$RENAMED; \ + done; \ + if [ $${architecture} = "amd64" ]; then \ + sed -i'' 's,lib/mysql/,lib/x86_64-linux-gnu/mariadb18/,' \ + tmp/debian/mariadb-server-10.1-mroonga.install; \ + elif [ $${architecture} = "i386" ]; then \ + sed -i'' 's,lib/mysql/,lib/i386-linux-gnu/mariadb18/,' \ + tmp/debian/mariadb-server-10.1-mroonga.install; \ + fi; \ + else \ + cp -rp $(srcdir)/../debian-$${variant} tmp/debian; \ + fi; \ + id=debian-$$code_name-$$architecture; \ + vagrant up $$id || exit 1; \ + vagrant destroy --force $$id; \ + done; \ done; \ done -prepare-build-package-deb: source env.sh - cp env.sh tmp/ - rm -rf tmp/debian - cp -rp $(srcdir)/../debian tmp/ - source: tmp/$(PACKAGE)-$(VERSION).tar.gz tmp/$(PACKAGE)-$(VERSION).tar.gz: $(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz diff --git a/storage/mroonga/packages/apt/Vagrantfile b/storage/mroonga/packages/apt/Vagrantfile index 2829da879..ee4a6aebc 100644 --- a/storage/mroonga/packages/apt/Vagrantfile +++ b/storage/mroonga/packages/apt/Vagrantfile @@ -7,30 +7,43 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vms = [ { - :id => "debian-wheezy-i386", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-7.8-i386_chef-provisionerless.box", + :id => "debian-jessie-i386", + :box => "bento/debian-8.9-i386", }, { - :id => "debian-wheezy-amd64", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-7.8_chef-provisionerless.box", + :id => "debian-jessie-amd64", + :box => "bento/debian-8.9", }, { - :id => "debian-jessie-i386", - :box_url => "http://packages.groonga.org/tmp/opscode_debian-8.0-i386_chef-provisionerless.box", + :id => "debian-stretch-i386", + :box => "bento/debian-9.1-i386", }, { - :id => "debian-jessie-amd64", - :box_url => "http://packages.groonga.org/tmp/opscode_debian-8.0_chef-provisionerless.box", + :id => "debian-stretch-amd64", + :box => "bento/debian-9.1", }, ] vms.each do |vm| config.vm.define(vm[:id]) do |node| - node.vm.box = vm[:id] - node.vm.box_url = vm[:box_url] + # Use official box + node.vm.box = vm[:box] if vm[:box] + # Use box and box_url until official box is released + node.vm.box = vm[:id] if vm[:box_url] + node.vm.box_url = vm[:box_url] if vm[:box_url] node.vm.provision(:shell, :path => "build-deb.sh") node.vm.provider("virtualbox") do |virtual_box| - virtual_box.memory = 768 + system_n_cpus = 1 + if File.exist?("/proc/cpuinfo") + system_n_cpus = File.readlines("/proc/cpuinfo").grep(/^processor/).size + end + if system_n_cpus > 1 + vm_n_cpus = system_n_cpus / 2 + else + vm_n_cpus = 1 + end + virtual_box.cpus = (ENV["VM_CPUS"] || vm_n_cpus).to_i + virtual_box.memory = (ENV["VM_MEMORY"] || 768).to_i end end end diff --git a/storage/mroonga/packages/apt/build-deb.sh b/storage/mroonga/packages/apt/build-deb.sh index 510886cb2..e0e03d8ec 100755 --- a/storage/mroonga/packages/apt/build-deb.sh +++ b/storage/mroonga/packages/apt/build-deb.sh @@ -2,8 +2,6 @@ LANG=C -mysql_server_package=mysql-server - run() { "$@" @@ -15,14 +13,37 @@ run() . /vagrant/tmp/env.sh +code_name=$(lsb_release --codename --short) +case "${MYSQL_VARIANT}" in + mariadb-*) + case "${code_name}" in + stretch) + mysql_server_package=mariadb-server-10.1 + MYSQL_VARIANT=mariadb-10.1 + ;; + *) + mysql_server_package=mariadb-server-${MYSQL_VARIANT##mariadb-} + ;; + esac + DEPENDED_PACKAGES="${DEPENDED_PACKAGES} libmariadb-client-lgpl-dev" + DEPENDED_PACKAGES="${DEPENDED_PACKAGES} libmariadbd-dev" + ;; + *) + mysql_server_package=mysql-server-${MYSQL_VARIANT} + DEPENDED_PACKAGES="${DEPENDED_PACKAGES} libmysqlclient-dev" + DEPENDED_PACKAGES="${DEPENDED_PACKAGES} libmysqld-dev" + ;; +esac + grep '^deb ' /etc/apt/sources.list | \ sed -e 's/^deb /deb-src /' > /etc/apt/sources.list.d/base-source.list +run sudo sed -i'' -e 's/httpredir/ftp.jp/g' /etc/apt/sources.list + run apt-get update run apt-get install -y lsb-release distribution=$(lsb_release --id --short | tr 'A-Z' 'a-z') -code_name=$(lsb_release --codename --short) case "${distribution}" in debian) component=main @@ -59,16 +80,23 @@ run apt-get install -V -y build-essential devscripts ${DEPENDED_PACKAGES} run apt-get build-dep -y ${mysql_server_package} run mkdir -p build -run cp /vagrant/tmp/${PACKAGE}-${VERSION}.tar.gz \ - build/${PACKAGE}_${VERSION}.orig.tar.gz run cd build -run tar xfz ${PACKAGE}_${VERSION}.orig.tar.gz -run cd ${PACKAGE}-${VERSION}/ +run tar xfz /vagrant/tmp/${PACKAGE}-${VERSION}.tar.gz +run mv ${PACKAGE}-${VERSION} ${PACKAGE}-${MYSQL_VARIANT}-${VERSION} +run tar cfz ${PACKAGE}-${MYSQL_VARIANT}_${VERSION}.orig.tar.gz \ + ${PACKAGE}-${MYSQL_VARIANT}-${VERSION} +run cd ${PACKAGE}-${MYSQL_VARIANT}-${VERSION}/ run cp -rp /vagrant/tmp/debian debian # export DEB_BUILD_OPTIONS=noopt -MYSQL_PACKAGE_INFO=$(apt-cache show mysql-server | grep Version | sort | tail -1) +MYSQL_PACKAGE_INFO=$(apt-cache show ${mysql_server_package} | + grep Version | + sort | + tail -1) MYSQL_PACKAGE_VERSION=${MYSQL_PACKAGE_INFO##Version: } -sed -i "s/MYSQL_VERSION/$MYSQL_PACKAGE_VERSION/" debian/control +sed -i'' \ + -e "s/MYSQL_VERSION/$MYSQL_PACKAGE_VERSION/g" \ + -e "s/MARIADB_VERSION/$MYSQL_PACKAGE_VERSION/g" \ + debian/control run debuild -us -uc run cd - diff --git a/storage/mroonga/packages/apt/env.sh.in b/storage/mroonga/packages/apt/env.sh.in index a44d6b368..51109aee4 100644 --- a/storage/mroonga/packages/apt/env.sh.in +++ b/storage/mroonga/packages/apt/env.sh.in @@ -7,8 +7,9 @@ libgroonga-dev pkg-config libmecab-dev mecab-utils -libmysqlclient-dev -libmysqld-dev +gdb +libxml2-dev +unixodbc-dev libssl-dev groonga-normalizer-mysql wget diff --git a/storage/mroonga/packages/apt/sign-packages.sh b/storage/mroonga/packages/apt/sign-packages.sh index 11a4aea26..57c985f38 100755 --- a/storage/mroonga/packages/apt/sign-packages.sh +++ b/storage/mroonga/packages/apt/sign-packages.sh @@ -23,7 +23,7 @@ run() for code_name in ${CODES}; do case ${code_name} in - squeeze|wheezy|jessie|unstable) + jessie|stretch|unstable) distribution=debian ;; *) diff --git a/storage/mroonga/packages/apt/sign-repository.sh b/storage/mroonga/packages/apt/sign-repository.sh index fb0de850d..e0d963ffb 100755 --- a/storage/mroonga/packages/apt/sign-repository.sh +++ b/storage/mroonga/packages/apt/sign-repository.sh @@ -23,7 +23,7 @@ run() for code_name in ${CODES}; do case ${code_name} in - squeeze|wheezy|jessie|unstable) + jessie|stretch|unstable) distribution=debian ;; *) diff --git a/storage/mroonga/packages/apt/update-repository.sh b/storage/mroonga/packages/apt/update-repository.sh index da1f8cd12..a95ad117c 100755 --- a/storage/mroonga/packages/apt/update-repository.sh +++ b/storage/mroonga/packages/apt/update-repository.sh @@ -109,7 +109,7 @@ EOF for code_name in ${CODES}; do case ${code_name} in - squeeze|wheezy|jessie|unstable) + jessie|stretch|unstable) distribution=debian component=main ;; diff --git a/storage/mroonga/packages/check-utility.sh b/storage/mroonga/packages/check-utility.sh deleted file mode 100755 index 211e231a4..000000000 --- a/storage/mroonga/packages/check-utility.sh +++ /dev/null @@ -1,665 +0,0 @@ -#!/bin/sh - -# Usage: check-utility.sh [--install-groonga] -# [--check-install] -# [--check-address] -# [--enable-repository] -# -# CODES="squeeze wheezy unstable lucid natty oneiric precise" -# DISTRIBUTIONS="centos fedora" - -CHROOT_ROOT=/var/lib/chroot -CHECK_ADDRESS=0 -CHECK_INSTALL=0 -CHECK_INSTALL_PACKAGE=mysql-server-mroonga -CHECK_BUILD=0 -CHECK_DEPENDS=0 -CHECK_PROVIDES=0 -ENABLE_REPOSITORY=0 -DISABLE_REPOSITORY=0 -INSTALL_SCRIPT=0 -INSTALL_MROONGA=0 -UNINSTALL_MROONGA=0 - -common_deb_procedure () -{ - for code in $CODES; do - for arch in $DEB_ARCHITECTURES; do - root_dir=$CHROOT_ROOT/$code-$arch - eval $1 $code $arch $root_dir - done - done -} - -common_rpm_procedure () -{ - for dist in $DISTRIBUTIONS; do - case $dist in - "fedora") - DISTRIBUTIONS_VERSION="19" - ;; - "centos") - DISTRIBUTIONS_VERSION="5 6" - ;; - esac - for ver in $DISTRIBUTIONS_VERSION; do - for arch in $RPM_ARCHITECTURES; do - root_dir=$CHROOT_ROOT/$dist-$ver-$arch - eval $1 $dist $arch $ver $root_dir - done - done - done -} - -echo_packages_repository_address () -{ - root_dir=$1 - code=$2 - arch=$3 - address=`grep "packages.groonga.org" $root_dir/etc/hosts | grep -v "#"` - if [ -z "$address" ]; then - echo "$code-$arch: default" - else - echo "$code-$arch: $address" - fi -} - -setup_distributions () -{ - if [ -z "$DISTRIBUTIONS" ]; then - DISTRIBUTIONS="centos fedora" - fi -} - -setup_rpm_architectures () -{ - if [ -z "$RPM_ARCHITECTURES" ]; then - RPM_ARCHITECTURES="i386 x86_64" - fi -} - -setup_codes () -{ - if [ -z "$CODES" ]; then - CODES="squeeze wheezy jessie unstable lucid precise quantal raring" - fi -} -setup_deb_architectures () -{ - if [ -z "$DEB_ARCHITECTURES" ]; then - DEB_ARCHITECTURES="i386 amd64" - fi -} - -check_packages_repository_address () -{ - common_deb_procedure "check_packages_deb_repository_address" - common_rpm_procedure "check_packages_rpm_repository_address" -} - -check_packages_deb_repository_address () -{ - code=$1 - arch=$2 - root_dir=$4 - echo_packages_repository_address "$root_dir" "$code" "$arch" -} - -check_packages_rpm_repository_address () -{ - dist=$1 - arch=$2 - ver=$3 - root_dir=$4 - echo_packages_repository_address "$root_dir" "$dist-$ver" "$arch" -} - -host_address () -{ - ifconfig_result=`LANG=C /sbin/ifconfig wlan0` - inet_addr=`echo "$ifconfig_result" | grep "inet addr:192"` - address=`echo $inet_addr | ruby -ne '/inet addr:(.+?)\s/ =~ $_ && puts($1)'` - HOST_ADDRESS=$address -} - -check_build_packages () -{ - common_deb_procedure "check_build_deb_packages" - common_rpm_procedure "check_build_rpm_packages" -} - -check_build_deb_packages () -{ - code=$1 - arch=$2 - BASE_VERSION=`cat ../version` - RESULT_SET=`find apt/repositories -name "*$BASE_VERSION*" | grep $code | grep $arch` - if [ -z "$RESULT_SET" ]; then - printf "%8s %5s %s => 0 deb\n" $code $arch $BASE_VERSION - else - PACKAGE_COUNT=`find apt/repositories -name "*$BASE_VERSION*" | grep $code | grep $arch | wc | awk '{print \$1}'` - printf "%8s %5s %s => %2d debs\n" $code $arch $BASE_VERSION $PACKAGE_COUNT - fi -} - -check_build_rpm_packages () -{ - dist=$1 - arch=$2 - ver=$3 - BASE_VERSION=`cat ../version` - FIND_PATH=yum/repositories/$dist/$ver/$arch - RESULT_SET=`find $FIND_PATH -name "*$BASE_VERSION*"` - if [ -z "$RESULT_SET" ]; then - printf "%8s %6s %s => 0 rpm\n" $dist$ver $arch $BASE_VERSION - else - PACKAGE_COUNT=`find $FIND_PATH -name "*$BASE_VERSION*" | wc -l` - printf "%8s %6s %s => %2d rpms\n" $dist$ver $arch $BASE_VERSION $PACKAGE_COUNT - fi -} - -check_depends_packages () -{ - common_deb_procedure "check_depends_deb_packages" - common_rpm_procedure "check_depends_rpm_packages" -} - -check_depends_deb_packages () -{ - code=$1 - arch=$2 - BASE_VERSION=`cat ../version` - FIND_PATH=apt/repositories/*/pool/$code - RESULT_SET=`find $FIND_PATH -name "*$BASE_VERSION*.deb"` - if [ -z "$RESULT_SET" ]; then - printf "%8s %5s %s => 404 deb\n" $code $arch $BASE_VERSION - else - for pkg in $RESULT_SET; do - DEB_NAME=`basename $pkg` - DEPENDS=`dpkg -I $pkg | grep "Depends"` - printf "%8s %5s %s => %s\n" $code $arch $DEB_NAME "$DEPENDS" - done - fi -} - -check_depends_rpm_packages () -{ - dist=$1 - arch=$2 - ver=$3 - BASE_VERSION=`cat ../version` - FIND_PATH=yum/repositories/$dist/$ver/$arch - RESULT_SET=`find $FIND_PATH -name "*$BASE_VERSION*"` - if [ -z "$RESULT_SET" ]; then - printf "%8s %6s %s => 404 rpm\n" $dist$ver $arch $BASE_VERSION - else - for pkg in $RESULT_SET; do - RPM_NAME=`basename $pkg` - DEPENDS=`rpm -qp --requires $pkg | grep -i "mysql" | tr -t '\n' ' '` - printf "%9s %6s %s => %s\n" $dist$ver $arch $RPM_NAME "$DEPENDS" - done - fi -} - -check_provided_mysql_packages () -{ - common_deb_procedure "check_provided_mysql_deb_packages" - common_rpm_procedure "check_provided_mysql_rpm_packages" - for code in $CODES; do - echo $code - cat tmp/$code-amd64-mysql-server.txt - done - for dist in $DISTRIBUTIONS; do - echo $dist - cat tmp/$dist-x86_64-mysql-server.txt - done -} - -check_provided_mysql_deb_packages () -{ - code=$1 - arch=$2 - root_dir=$3 - cat > tmp/check-provided-mysql.sh < /dev/null -apt-cache show mysql-server | grep "Version" | head -1 > /tmp/$code-$arch-mysql-server.txt -EOF - if [ -d $root_dir ]; then - CHECK_SCRIPT=check-provided-mysql.sh - echo "copy check script $CHECK_SCRIPT to $root_dir/tmp" - sudo rm -f $root_dir/tmp/$CHECK_SCRIPT - cp tmp/$CHECK_SCRIPT $root_dir/tmp - sudo chmod 755 $root_dir/tmp/$CHECK_SCRIPT - sudo chname $code-$arch chroot $root_dir /tmp/$CHECK_SCRIPT - cp $root_dir/tmp/$code-$arch-mysql-server.txt tmp - fi -} - -check_provided_mysql_rpm_packages () -{ - dist=$1 - arch=$2 - ver=$3 - root_dir=$4 - cat > tmp/check-provided-mysql.sh < /dev/null -yum info mysql-server | grep "Version" > /tmp/$code-$arch-mysql-server.txt -EOF - if [ -d $root_dir ]; then - CHECK_SCRIPT=check-provided-mysql.sh - echo "copy check script $CHECK_SCRIPT to $root_dir/tmp" - sudo rm -f $root_dir/tmp/$CHECK_SCRIPT - cp tmp/$CHECK_SCRIPT $root_dir/tmp - sudo chmod 755 $root_dir/tmp/$CHECK_SCRIPT - sudo chname $code-$arch chroot $root_dir /tmp/$CHECK_SCRIPT - cp $root_dir/tmp/$code-$arch-mysql-server.txt tmp - fi -} - -check_installed_mroonga_packages () -{ - common_deb_procedure "check_installed_mroonga_deb_packages" - common_rpm_procedure "check_installed_mroonga_rpm_packages" -} - -check_installed_mroonga_deb_packages () -{ - code=$1 - arch=$2 - root_dir=$3 - cat > tmp/check-deb-mroonga.sh < tmp/check-rpm-mroonga.sh < tmp/install-aptitude-mroonga.sh < tmp/install-aptget-mroonga.sh < tmp/install-centos5-mroonga.sh < tmp/install-centos6-mroonga.sh < tmp/install-fedora-mroonga.sh < $UNINSTALL_SCRIPT < tmp/$UNINSTALL_SCRIPT < tmp/enable-repository.sh < /tmp/hosts -echo "$HOST_ADDRESS packages.groonga.org" >> /tmp/hosts -cp -f /tmp/hosts /etc/hosts -EOF - common_deb_procedure "enable_temporaly_mroonga_deb_repository" - common_rpm_procedure "enable_temporaly_mroonga_rpm_repository" - check_packages_repository_address -} - -enable_temporaly_mroonga_deb_repository () -{ - code=$1 - arch=$2 - root_dir=$4 - today=`date '+%Y%m%d.%s'` - if [ -d $root_dir ]; then - sudo cp $root_dir/etc/hosts $root_dir/etc/hosts.$today - sudo cp tmp/enable-repository.sh $root_dir/tmp - sudo chname $code-$arch chroot $root_dir /tmp/enable-repository.sh - fi -} - -enable_temporaly_mroonga_rpm_repository () -{ - dist=$1 - arch=$2 - ver=$3 - root_dir=$4 - today=`date '+%Y%m%d.%s'` - if [ -d $root_dir ]; then - sudo cp $root_dir/etc/hosts $root_dir/etc/hosts.$today - sudo cp tmp/enable-repository.sh $root_dir/tmp - sudo chname $code-$arch chroot $root_dir /tmp/enable-repository.sh - fi -} - -disable_temporaly_mroonga_repository () -{ - cat > tmp/disable-repository.sh < /tmp/hosts -cp -f /tmp/hosts /etc/hosts -EOF - common_deb_procedure "disable_temporaly_mroonga_deb_repository" - common_rpm_procedure "disable_temporaly_mroonga_rpm_repository" - check_packages_repository_address -} - -disable_temporaly_mroonga_deb_repository () -{ - code=$1 - arch=$2 - root_dir=$4 - DISABLE_SCRIPT=disable-repository.sh - today=`date '+%Y%m%d.%s'` - if [ -d $root_dir ]; then - sudo cp $root_dir/etc/hosts $root_dir/etc/hosts.$today - cp tmp/$DISABLE_SCRIPT $root_dir/tmp - chmod 755 $root_dir/tmp/$DISABLE_SCRIPT - sudo chname $code-$arch chroot $root_dir /tmp/$DISABLE_SCRIPT - fi - -} - -disable_temporaly_mroonga_rpm_repository () -{ - dist=$1 - arch=$2 - ver=$3 - root_dir=$4 - DISABLE_SCRIPT=disable-repository.sh - today=`date '+%Y%m%d.%s'` - if [ -d $root_dir ]; then - sudo cp $root_dir/etc/hosts $root_dir/etc/hosts.$today - cp tmp/$DISABLE_SCRIPT $root_dir/tmp - chmod 755 $root_dir/tmp/$DISABLE_SCRIPT - sudo chname $code-$arch chroot $root_dir /tmp/$DISABLE_SCRIPT - fi -} - -host_address -echo $HOST_ADDRESS - -while [ $# -ne 0 ]; do - case $1 in - --check-install) - CHECK_INSTALL=1 - shift - if [ ! -z "$1" ]; then - case $1 in - groonga|mroonga|roonga|mecab|mysql) - CHECK_INSTALL_PACKAGE=$1 - ;; - *) - ;; - esac - fi - ;; - --check-address) - CHECK_ADDRESS=1 - shift - ;; - --check-depends) - CHECK_DEPENDS=1 - shift - ;; - --check-provides) - CHECK_PROVIDES=1 - shift - ;; - --check-build) - CHECK_BUILD=1 - shift - ;; - --enable-repository) - ENABLE_REPOSITORY=1 - shift - ;; - --disable-repository) - DISABLE_REPOSITORY=1 - shift - ;; - --install-mroonga) - INSTALL_MROONGA=1 - shift - ;; - --uninstall-mroonga) - UNINSTALL_MROONGA=1 - shift - ;; - --code) - shift - if [ "$1" = "all" ]; then - setup_codes - else - CODES=$1 - fi - shift - ;; - --code-arch) - shift - if [ "$1" = "all" ]; then - setup_deb_architectures - else - DEB_ARCHITECTURES=$1 - fi - shift - ;; - --dist) - shift - if [ "$1" = "all" ]; then - setup_distributions - else - DISTRIBUTIONS=$1 - fi - shift - ;; - --dist-arch) - shift - if [ "$1" = "all" ]; then - setup_rpm_architectures - else - RPM_ARCHITECTURES=$1 - fi - shift - ;; - *) - shift - ;; - esac -done - -mkdir -p tmp -setup_deb_architectures -setup_rpm_architectures - -if [ $CHECK_INSTALL -ne 0 ]; then - check_installed_mroonga_packages -fi -if [ $CHECK_ADDRESS -ne 0 ]; then - check_packages_repository_address -fi -if [ $CHECK_BUILD -ne 0 ]; then - check_build_packages -fi -if [ $CHECK_DEPENDS -ne 0 ]; then - check_depends_packages -fi -if [ $CHECK_PROVIDES -ne 0 ]; then - check_provided_mysql_packages -fi -if [ $ENABLE_REPOSITORY -ne 0 ]; then - enable_temporaly_mroonga_repository -fi -if [ $DISABLE_REPOSITORY -ne 0 ]; then - disable_temporaly_mroonga_repository -fi -if [ $INSTALL_MROONGA -ne 0 ]; then - install_mroonga_packages -fi -if [ $UNINSTALL_MROONGA -ne 0 ]; then - uninstall_mroonga_packages -fi - diff --git a/storage/mroonga/packages/rpm/centos/Makefile.am b/storage/mroonga/packages/rpm/centos/Makefile.am index e7b22cfa0..72d860a90 100644 --- a/storage/mroonga/packages/rpm/centos/Makefile.am +++ b/storage/mroonga/packages/rpm/centos/Makefile.am @@ -1,9 +1,19 @@ EXTRA_DIST = \ mysql55-mroonga.spec.in \ mysql56-community-mroonga.spec.in \ - mariadb-mroonga.spec.in + mysql57-community-mroonga.spec.in \ + mariadb-mroonga.spec.in \ + mariadb-10.1-mroonga.spec.in \ + mariadb-10.2-mroonga.spec.in \ + percona-server-56-mroonga.spec.in \ + percona-server-57-mroonga.spec.in noinst_DATA = \ mysql55-mroonga.spec \ mysql56-community-mroonga.spec \ - mariadb-mroonga.spec + mysql57-community-mroonga.spec \ + mariadb-mroonga.spec \ + mariadb-10.1-mroonga.spec \ + mariadb-10.2-mroonga.spec \ + percona-server-56-mroonga.spec \ + percona-server-57-mroonga.spec diff --git a/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in b/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in index 04d1c41f2..d23c499fd 100644 --- a/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in +++ b/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in @@ -1,18 +1,18 @@ %define mariadb_epoch_default 1 -%define mariadb_version_default 5.5.41 +%define mariadb_version_default 5.5.56 %define mariadb_release_default 2 -%define mariadb_dist_default .el7_0 -%define mariadb_download_base_url_default http://vault.centos.org/7.1.1503/os/Source/SPackages +%define mariadb_dist_default .el7 +%define mariadb_download_base_url_default http://vault.centos.org/7.4.1708/os/Source/SPackages/ %define mariadb_spec_file_default mariadb.spec -%{!?mariadb_epoch:%define mariadb_epoch %{mariadb_epoch_default}} -%{!?mariadb_version:%define mariadb_version %{mariadb_version_default}} -%{!?mariadb_release:%define mariadb_release %{mariadb_release_default}} -%{!?mariadb_dist:%define mariadb_dist %{mariadb_dist_default}} -%{!?mariadb_download_base_url:%define mariadb_download_base_url %{mariadb_download_base_url_default}} -%{!?mariadb_spec_file:%define mariadb_spec_file %{mariadb_spec_file_default}} +%define _mariadb_epoch %{?mariadb_epoch:%{mariadb_epoch}}%{!?mariadb_epoch:%{mariadb_epoch_default}} +%define _mariadb_version %{?mariadb_version:%{mariadb_version}}%{!?mariadb_version:%{mariadb_version_default}} +%define _mariadb_release %{?mariadb_release:%{mariadb_release}}%{!?mariadb_release:%{mariadb_release_default}} +%define _mariadb_dist %{?mariadb_dist:%{mariadb_dist}}%{!?mariadb_dist:%{mariadb_dist_default}} +%define _mariadb_download_base_url %{?mariadb_download_base_url:%{mariadb_download_base_url}}%{!?mariadb_download_base_url:%{mariadb_download_base_url_default}} +%define _mariadb_spec_file %{?mariadb_spec_file:%{mariadb_spec_file}}%{!?mariadb_spec_file:%{mariadb_spec_file_default}} -%define mariadb_package_version %{mariadb_epoch}:%{mariadb_version}-%{mariadb_release}%{mariadb_dist} +%define _mariadb_package_version %{_mariadb_epoch}:%{_mariadb_version}-%{_mariadb_release}%{_mariadb_dist} %define groonga_required_version @REQUIRED_GROONGA_VERSION@ @@ -30,9 +30,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) BuildRequires: groonga-devel >= %{groonga_required_version} BuildRequires: groonga-normalizer-mysql-devel BuildRequires: wget -BuildRequires: mariadb-devel = %{mariadb_package_version} -Requires: mariadb-server = %{mariadb_package_version} -Requires: mariadb = %{mariadb_package_version} +BuildRequires: mariadb-devel = %{_mariadb_package_version} +Requires: mariadb-server = %{_mariadb_package_version} +Requires: mariadb = %{_mariadb_package_version} Requires: groonga-libs >= %{groonga_required_version} Requires: groonga-normalizer-mysql @@ -53,21 +53,21 @@ Documentation for Mroonga %prep %setup -q -n mroonga-%{version} -mariadb_full_version=%{mariadb_version}-%{mariadb_release}%{mariadb_dist} +mariadb_full_version=%{_mariadb_version}-%{_mariadb_release}%{_mariadb_dist} srpm=mariadb-${mariadb_full_version}.src.rpm if [ ! -f ../../SRPMS/$srpm ]; then - wget --continue -O ../../SRPMS/$srpm %{mariadb_download_base_url}/$srpm + wget --continue -O ../../SRPMS/$srpm %{_mariadb_download_base_url}/$srpm rpm -Uvh ../../SRPMS/$srpm rm ../../SRPMS/$srpm fi %build -mariadb_source=../mariadb-%{mariadb_version} +mariadb_source=../mariadb-%{_mariadb_version} if [ ! -d ${mariadb_source} ]; then rpmbuild -bc \ --define 'runselftest 0' \ --define 'optflags -O0' \ - ../../SPECS/%{mariadb_spec_file} + ../../SPECS/%{_mariadb_spec_file} fi %configure \ --disable-static \ @@ -86,7 +86,7 @@ mv $RPM_BUILD_ROOT%{_datadir}/doc/mroonga/ mysql-mroonga-doc/ rm -rf $RPM_BUILD_ROOT %post -if /usr/bin/mysql -u root -e "quit"; then +if /usr/bin/mysql -u root -e "quit" > /dev/null 2>&1; then password_option="" else password_option="-p" @@ -128,7 +128,7 @@ eval $command || \ %preun uninstall_sql=%{_datadir}/mroonga/uninstall.sql -if mysql -u root -e "quit"; then +if mysql -u root -e "quit" > /dev/null 2>&1; then password_option="" else password_option="-p" @@ -154,6 +154,84 @@ fi %doc mysql-mroonga-doc/* %changelog +* Thu Oct 12 2017 Kentaro Hayashi - 7.07-1 +- new upstream release. + +* Fri Sep 15 2017 Kouhei Sutou - 7.06-2 +- rebuild against the latest MariaDB. + +* Tue Aug 29 2017 Kentaro Hayashi - 7.06-1 +- new upstream release. + +* Sat Jul 29 2017 Kentaro Hayashi - 7.05-1 +- new upstream release. + +* Thu Jun 29 2017 Kentaro Hayashi - 7.04-1 +- new upstream release. + +* Mon May 29 2017 Kentaro Hayashi - 7.03-1 +- new upstream release. + +* Sat Apr 29 2017 Kentaro Hayashi - 7.02-1 +- new upstream release. + +* Wed Mar 29 2017 Kentaro Hayashi - 7.01-1 +- new upstream release. + +* Thu Feb 09 2017 Kentaro Hayashi - 7.00-1 +- new upstream release. + +* Sat Oct 29 2016 Kentaro Hayashi - 6.10-1 +- new upstream release. + +* Thu Sep 29 2016 Kentaro Hayashi - 6.09-1 +- new upstream release. + +* Mon Aug 29 2016 Kentaro Hayashi - 6.08-1 +- new upstream release. + +* Fri Jul 29 2016 Kentaro Hayashi - 6.07-1 +- new upstream release. + +* Thu Jun 30 2016 Masafumi Yokoyama - 6.06-1 +- new upstream release. + +* Wed Jun 29 2016 Kentaro Hayashi - 6.05-1 +- new upstream release. + +* Sun May 29 2016 Kentaro Hayashi - 6.03-1 +- new upstream release. + +* Fri Apr 29 2016 HAYASHI Kentaro - 6.02-1 +- new upstream release. + +* Tue Mar 29 2016 Masafumi Yokoyama - 6.01-1 +- new upstream release. + +* Mon Feb 29 2016 Kouhei Sutou - 6.00-1 +- new upstream release. + +* Tue Dec 29 2015 Kouhei Sutou - 5.11-1 +- new upstream release. + +* Wed Dec 16 2015 Kouhei Sutou - 5.10-2 +- rebuild against MariaDB on CentOS 7.2. Reported by Larry Kim. Thanks!!! + +* Sun Nov 29 2015 Kouhei Sutou - 5.10-1 +- new upstream release. + +* Thu Oct 29 2015 Kouhei Sutou - 5.09-1 +- new upstream release. + +* Tue Sep 29 2015 Kouhei Sutou - 5.08-1 +- new upstream release. + +* Mon Aug 31 2015 Kouhei Sutou - 5.06-1 +- new upstream release. + +* Wed Jul 29 2015 Masafumi Yokoyama - 5.05-1 +- new upstream release. + * Mon Jun 29 2015 Masafumi Yokoyama - 5.04-1 - new upstream release. diff --git a/storage/mroonga/packages/rpm/centos/mysql55-mroonga.spec.in b/storage/mroonga/packages/rpm/centos/mysql55-mroonga.spec.in index e20e1b321..8bd2ba540 100644 --- a/storage/mroonga/packages/rpm/centos/mysql55-mroonga.spec.in +++ b/storage/mroonga/packages/rpm/centos/mysql55-mroonga.spec.in @@ -1,26 +1,26 @@ %{?scl:%scl_package mroonga} %{!?scl:%global pkg_name %{name}} -%{!?centos_ver:%define centos_ver 5} +%define _centos_ver %{?centos_ver:%{centos_ver}}%{!?centos_ver:5} -%if %{centos_ver} == 6 -%define mysql_version_default 5.5.41 -%define mysql_release_default 2 -%define mysql_dist_default el6.centos.alt -%define mysql_download_base_url_default http://vault.centos.org/6.6/SCL/Source/SPackages +%if %{_centos_ver} == 6 +%define mysql_version_default 5.5.52 +%define mysql_release_default 1 +%define mysql_dist_default el6 +%define mysql_download_base_url_default http://vault.centos.org/6.8/sclo/Source/rh/mysql55/ %define mysql_spec_file_default mysql.spec %else -%define mysql_version_default 5.5.40 -%define mysql_release_default 2 +%define mysql_version_default 5.5.45 +%define mysql_release_default 1 %define mysql_dist_default el5 %define mysql_download_base_url_default http://vault.centos.org/5.11/updates/SRPMS %define mysql_spec_file_default mysql.spec %endif -%{!?mysql_version:%define mysql_version %{mysql_version_default}} -%{!?mysql_release:%define mysql_release %{mysql_release_default}} -%{!?mysql_dist:%define mysql_dist %{mysql_dist_default}} -%{!?mysql_download_base_url:%define mysql_download_base_url %{mysql_download_base_url_default}} -%{!?mysql_spec_file:%define mysql_spec_file %{mysql_spec_file_default}} +%define _mysql_version %{?mysql_version:%{mysql_version}}%{!?mysql_version:%{mysql_version_default}} +%define _mysql_release %{?mysql_release:%{mysql_release}}%{!?mysql_release:%{mysql_release_default}} +%define _mysql_dist %{?mysql_dist:%{mysql_dist}}%{!?mysql_dist:%{mysql_dist_default}} +%define _mysql_download_base_url %{?mysql_download_base_url:%{mysql_download_base_url}}%{!?mysql_download_base_url:%{mysql_download_base_url_default}} +%define _mysql_spec_file %{?mysql_spec_file:%{mysql_spec_file}}%{!?mysql_spec_file:%{mysql_spec_file_default}} %define groonga_required_version @REQUIRED_GROONGA_VERSION@ @@ -39,10 +39,10 @@ BuildRequires: groonga-devel >= %{groonga_required_version} BuildRequires: groonga-normalizer-mysql-devel BuildRequires: wget BuildRequires: which -BuildRequires: mysql55-mysql-devel = %{mysql_version}-%{mysql_release}.%{mysql_dist} +BuildRequires: mysql55-mysql-devel = %{_mysql_version}-%{_mysql_release}.%{_mysql_dist} BuildRequires: mysql55-build -Requires: mysql55-mysql-server = %{mysql_version}-%{mysql_release}.%{mysql_dist} -Requires: mysql55-mysql = %{mysql_version}-%{mysql_release}.%{mysql_dist} +Requires: mysql55-mysql-server = %{_mysql_version}-%{_mysql_release}.%{_mysql_dist} +Requires: mysql55-mysql = %{_mysql_version}-%{_mysql_release}.%{_mysql_dist} Requires: groonga-libs >= %{groonga_required_version} Requires: groonga-normalizer-mysql %{?scl:Requires: %scl_runtime} @@ -64,21 +64,21 @@ Documentation for Mroonga %prep %setup -q -n %{pkg_name}-%{version} -mysql_full_version=%{mysql_version}-%{mysql_release}.%{mysql_dist} +mysql_full_version=%{_mysql_version}-%{_mysql_release}.%{_mysql_dist} srpm=mysql55-mysql-${mysql_full_version}.src.rpm if [ ! -f ../../SRPMS/$srpm ]; then - wget --continue -O ../../SRPMS/$srpm %{mysql_download_base_url}/$srpm + wget --continue -O ../../SRPMS/$srpm %{_mysql_download_base_url}/$srpm rpm -Uvh ../../SRPMS/$srpm fi %build -mysql_source=../mysql-%{mysql_version} +mysql_source=../mysql-%{_mysql_version} if [ ! -d ${mysql_source} ]; then specs_dir= MYSQL_RPMBUILD_TEST=no rpmbuild -bp \ --define 'runselftest 0' \ --define 'optflags -O0' \ - ../../SPECS/%{mysql_spec_file} + ../../SPECS/%{_mysql_spec_file} fi %configure --disable-static --with-mysql-source=${mysql_source} \ --disable-fast-mutexes \ @@ -97,10 +97,10 @@ rm -rf $RPM_BUILD_ROOT %post mysql_command=`scl enable mysql55 'which mysql'` -password_option="" -$mysql_command -u root -e "quit" -if [ $? -ne 0 ]; then - password_option="-p" +if $mysql_command -u root -e "quit" > /dev/null 2>&1; then + password_option="" +else + password_option="-p" fi current_version=0 version=`echo %{groonga_required_version} | sed -e 's/\.//g'` @@ -137,7 +137,7 @@ eval $command || \ %preun uninstall_sql=%{_datadir}/mroonga/uninstall.sql mysql_command=`scl enable mysql55 'which mysql'` -if $mysql_command -u root -e "quit"; then +if $mysql_command -u root -e "quit" > /dev/null 2>&1; then password_option="" else password_option="-p" @@ -163,6 +163,87 @@ fi %doc mysql-mroonga-doc/* %changelog +* Thu Oct 12 2017 Kentaro Hayashi - 7.07-1 +- new upstream release. + +* Tue Aug 29 2017 Kentaro Hayashi - 7.06-1 +- new upstream release. + +* Sat Jul 29 2017 Kentaro Hayashi - 7.05-1 +- new upstream release. + +* Thu Jun 29 2017 Kentaro Hayashi - 7.04-1 +- new upstream release. + +* Mon May 29 2017 Kentaro Hayashi - 7.03-1 +- new upstream release. + +* Sat Apr 29 2017 Kentaro Hayashi - 7.02-1 +- new upstream release. + +* Wed Mar 29 2017 Kentaro Hayashi - 7.01-1 +- new upstream release. + +* Thu Feb 09 2017 Kentaro Hayashi - 7.00-1 +- new upstream release. + +* Fri Jan 13 2017 Kouhei Sutou - 6.13-1 +- new upstream release. + +* Thu Dec 29 2016 Kentaro Hayashi - 6.12-1 +- new upstream release. + +* Tue Nov 29 2016 Kentaro Hayashi - 6.11-1 +- new upstream release. + +* Sat Oct 29 2016 Kentaro Hayashi - 6.10-1 +- new upstream release. + +* Thu Sep 29 2016 Kentaro Hayashi - 6.09-1 +- new upstream release. + +* Mon Aug 29 2016 Kentaro Hayashi - 6.08-1 +- new upstream release. + +* Fri Jul 29 2016 Kentaro Hayashi - 6.07-1 +- new upstream release. + +* Thu Jun 30 2016 Masafumi Yokoyama - 6.06-1 +- new upstream release. + +* Wed Jun 29 2016 Kentaro Hayashi - 6.05-1 +- new upstream release. + +* Sun May 29 2016 Kentaro Hayashi - 6.03-1 +- new upstream release. + +* Fri Apr 29 2016 HAYASHI Kentaro - 6.02-1 +- new upstream release. + +* Tue Mar 29 2016 Masafumi Yokoyama - 6.01-1 +- new upstream release. + +* Mon Feb 29 2016 Kouhei Sutou - 6.00-1 +- new upstream release. + +* Fri Jan 29 2016 Kouhei Sutou - 5.12-1 +- new upstream release. + +* Sun Nov 29 2015 Kouhei Sutou - 5.10-1 +- new upstream release. + +* Thu Oct 29 2015 Kouhei Sutou - 5.09-1 +- new upstream release. + +* Tue Sep 29 2015 Kouhei Sutou - 5.08-1 +- new upstream release. + +* Mon Aug 31 2015 Kouhei Sutou - 5.06-1 +- new upstream release. + +* Wed Jul 29 2015 Masafumi Yokoyama - 5.05-1 +- new upstream release. + * Mon Jun 29 2015 Masafumi Yokoyama - 5.04-1 - new upstream release. diff --git a/storage/mroonga/packages/rpm/centos/mysql56-community-mroonga.spec.in b/storage/mroonga/packages/rpm/centos/mysql56-community-mroonga.spec.in index f3233d17a..dea7cebc7 100644 --- a/storage/mroonga/packages/rpm/centos/mysql56-community-mroonga.spec.in +++ b/storage/mroonga/packages/rpm/centos/mysql56-community-mroonga.spec.in @@ -1,24 +1,24 @@ -%{!?centos_ver:%define centos_ver 6} +%define _centos_ver %{?centos_ver:%{centos_ver}}%{!?centos_ver:5} -%if %{centos_ver} == 7 -%define mysql_version_default 5.6.25 +%if %{_centos_ver} == 7 +%define mysql_version_default 5.6.37 %define mysql_release_default 2 %define mysql_dist_default el7 %define mysql_download_base_url_default http://repo.mysql.com/yum/mysql-5.6-community/el/7/SRPMS %define mysql_spec_file_default mysql.spec %else -%define mysql_version_default 5.6.25 +%define mysql_version_default 5.6.37 %define mysql_release_default 2 %define mysql_dist_default el6 %define mysql_download_base_url_default http://repo.mysql.com/yum/mysql-5.6-community/el/6/SRPMS %define mysql_spec_file_default mysql.spec %endif -%{!?mysql_version:%define mysql_version %{mysql_version_default}} -%{!?mysql_release:%define mysql_release %{mysql_release_default}} -%{!?mysql_dist:%define mysql_dist %{mysql_dist_default}} -%{!?mysql_download_base_url:%define mysql_download_base_url %{mysql_download_base_url_default}} -%{!?mysql_spec_file:%define mysql_spec_file %{mysql_spec_file_default}} +%define _mysql_version %{?mysql_version:%{mysql_version}}%{!?mysql_version:%{mysql_version_default}} +%define _mysql_release %{?mysql_release:%{mysql_release}}%{!?mysql_release:%{mysql_release_default}} +%define _mysql_dist %{?mysql_dist:%{mysql_dist}}%{!?mysql_dist:%{mysql_dist_default}} +%define _mysql_download_base_url %{?mysql_download_base_url:%{mysql_download_base_url}}%{!?mysql_download_base_url:%{mysql_download_base_url_default}} +%define _mysql_spec_file %{?mysql_spec_file:%{mysql_spec_file}}%{!?mysql_spec_file:%{mysql_spec_file_default}} %define groonga_required_version @REQUIRED_GROONGA_VERSION@ @@ -38,9 +38,10 @@ BuildRequires: groonga-normalizer-mysql-devel BuildRequires: wget BuildRequires: which BuildRequires: gcc, gcc-c++ -BuildRequires: mysql-community-devel = %{mysql_version}-%{mysql_release}.%{mysql_dist} -Requires: mysql-community-server = %{mysql_version}-%{mysql_release}.%{mysql_dist} -Requires: mysql-community-client = %{mysql_version}-%{mysql_release}.%{mysql_dist} +BuildRequires: numactl-devel +BuildRequires: mysql-community-devel = %{_mysql_version}-%{_mysql_release}.%{_mysql_dist} +Requires: mysql-community-server = %{_mysql_version}-%{_mysql_release}.%{_mysql_dist} +Requires: mysql-community-client = %{_mysql_version}-%{_mysql_release}.%{_mysql_dist} Requires: groonga-libs >= %{groonga_required_version} Requires: groonga-normalizer-mysql @@ -61,21 +62,21 @@ Documentation for Mroonga %prep %setup -q -n mroonga-%{version} -mysql_full_version=%{mysql_version}-%{mysql_release}.%{mysql_dist} +mysql_full_version=%{_mysql_version}-%{_mysql_release}.%{_mysql_dist} srpm=mysql-community-${mysql_full_version}.src.rpm if [ ! -f ../../SRPMS/$srpm ]; then - wget --continue -O ../../SRPMS/$srpm %{mysql_download_base_url}/$srpm + wget --continue -O ../../SRPMS/$srpm %{_mysql_download_base_url}/$srpm rpm -Uvh ../../SRPMS/$srpm fi %build -mysql_source=../mysql-%{mysql_version}/mysql-%{mysql_version} +mysql_source=../mysql-%{_mysql_version}/mysql-%{_mysql_version} if [ ! -d ${mysql_source} ]; then specs_dir= MYSQL_RPMBUILD_TEST=no rpmbuild -bp \ --define 'runselftest 0' \ --define 'optflags -O0' \ - ../../SPECS/%{mysql_spec_file} + ../../SPECS/%{_mysql_spec_file} fi %configure \ --disable-static \ @@ -102,10 +103,10 @@ else fi mysql_command=`which mysql` -password_option="" -$mysql_command -u root -e "quit" -if [ $? -ne 0 ]; then - password_option="-p" +if $mysql_command -u root -e "quit" > /dev/null 2>&1; then + password_option="" +else + password_option="-p" fi current_version=0 version=`echo %{groonga_required_version} | sed -e 's/\.//g'` @@ -153,7 +154,7 @@ fi uninstall_sql=%{_datadir}/mroonga/uninstall.sql mysql_command=`which mysql` -if $mysql_command -u root -e "quit"; then +if $mysql_command -u root -e "quit" > /dev/null 2>&1; then password_option="" else password_option="-p" @@ -183,10 +184,118 @@ fi %doc mysql-mroonga-doc/* %changelog +* Thu Oct 12 2017 Kentaro Hayashi - 7.07-1 +- new upstream release. + +* Tue Aug 29 2017 Kentaro Hayashi - 7.06-1 +- new upstream release. + +* Wed Aug 23 2017 Kentaro Hayashi - 7.05-2 +- build against MySQL 5.6.37 on CentOS 7. Reported by Hiroshi Kagami. Thanks!!! + +* Sat Jul 29 2017 Kentaro Hayashi - 7.05-1 +- new upstream release. + +* Fri Jul 21 2017 Kentaro Hayashi - 7.04-2 +- build against MySQL 5.6.37 on CentOS 6. Reported by Hiroshi Kagami. Thanks!!! + +* Thu Jun 29 2017 Kentaro Hayashi - 7.04-1 +- new upstream release. + +* Mon May 29 2017 Kentaro Hayashi - 7.03-1 +- new upstream release. + +* Sat Apr 29 2017 Kentaro Hayashi - 7.02-1 +- new upstream release. + +* Wed Apr 12 2017 Kentaro Hayashi - 7.01-2 +- build against MySQL 5.6.36 Reported by @tigersun2000. Thanks!!! + +* Wed Mar 29 2017 Kentaro Hayashi - 7.01-1 +- new upstream release. + +* Thu Feb 09 2017 Kentaro Hayashi - 7.00-1 +- new upstream release. + +* Fri Jan 13 2017 Kouhei Sutou - 6.13-1 +- new upstream release. + +* Thu Dec 29 2016 Kentaro Hayashi - 6.12-1 +- new upstream release. + +* Tue Nov 29 2016 Kentaro Hayashi - 6.11-1 +- new upstream release. + +* Sat Oct 29 2016 Kentaro Hayashi - 6.10-1 +- new upstream release. + +* Mon Oct 24 2016 Kouhei Sutou - 6.09-2 +- build against MySQL 5.6.34. Reported by Hiroshi Kagami. Thanks!!! + +* Thu Sep 29 2016 Kentaro Hayashi - 6.09-1 +- new upstream release. + +* Wed Sep 14 2016 Kentaro Hayashi - 6.08-2 +- build against MySQL 5.6.33. + +* Mon Aug 29 2016 Kentaro Hayashi - 6.08-1 +- new upstream release. + +* Fri Jul 29 2016 Kentaro Hayashi - 6.07-1 +- new upstream release. + +* Thu Jun 30 2016 Masafumi Yokoyama - 6.06-1 +- new upstream release. + +* Wed Jun 29 2016 Kentaro Hayashi - 6.05-1 +- new upstream release. + +* Mon Jun 06 2016 Kouhei Sutou - 6.03-2 +- build against MySQL 5.6.30. + +* Sun May 29 2016 Kentaro Hayashi - 6.03-1 +- new upstream release. + +* Fri Apr 29 2016 HAYASHI Kentaro - 6.02-1 +- new upstream release. + +* Tue Mar 29 2016 Masafumi Yokoyama - 6.01-1 +- new upstream release. + +* Mon Feb 29 2016 Kouhei Sutou - 6.00-1 +- new upstream release. + +* Fri Jan 29 2016 Kouhei Sutou - 5.12-1 +- new upstream release. + +* Tue Dec 29 2015 Kouhei Sutou - 5.11-1 +- new upstream release. + +* Wed Dec 09 2015 Kouhei Sutou - 5.10-2 +- build against MySQL 5.6.28. Reported by @stealthinu. Thanks!!! + +* Sun Nov 29 2015 Kouhei Sutou - 5.10-1 +- new upstream release. + +* Thu Oct 29 2015 Kouhei Sutou - 5.09-1 +- new upstream release. + +* Sat Oct 03 2015 Kouhei Sutou - 5.08-2 +- build against MySQL 5.6.27. Reported by @star_orihime. Thanks!!! + +* Tue Sep 29 2015 Kouhei Sutou - 5.08-1 +- new upstream release. + +* Mon Aug 31 2015 Kouhei Sutou - 5.06-1 +- new upstream release. + +* Wed Jul 29 2015 Masafumi Yokoyama - 5.05-1 +- new upstream release. + * Mon Jun 29 2015 Masafumi Yokoyama - 5.04-1 - new upstream release. -* Thu Jun 02 2015 Masafumi Yokoyama - 5.03-2 +* Tue Jun 02 2015 Masafumi Yokoyama - 5.03-2 - build against MySQL 5.6.25. * Fri May 29 2015 HAYASHI Kentaro - 5.03-1 diff --git a/storage/mroonga/packages/rpm/centos/percona-server-56-mroonga.spec.in b/storage/mroonga/packages/rpm/centos/percona-server-56-mroonga.spec.in index cf1947e26..abf3bfdee 100644 --- a/storage/mroonga/packages/rpm/centos/percona-server-56-mroonga.spec.in +++ b/storage/mroonga/packages/rpm/centos/percona-server-56-mroonga.spec.in @@ -1,16 +1,16 @@ -%{!?centos_ver:%define centos_ver 6} +%define _centos_ver %{?centos_ver:%{centos_ver}}%{!?centos_ver:5} -%define mysql_version_default 5.6.24 -%define mysql_release_default rel72.2 +%define mysql_version_default 5.6.37 +%define mysql_release_default rel82.2 %define mysql_dist_default %{?dist} -%define mysql_download_base_url_default http://repo.percona.com/centos/%{centos_ver}/SRPMS +%define mysql_download_base_url_default http://repo.percona.com/centos/%{_centos_ver}/SRPMS %define mysql_spec_file_default percona-server.spec -%{!?mysql_version:%define mysql_version %{mysql_version_default}} -%{!?mysql_release:%define mysql_release %{mysql_release_default}} -%{!?mysql_dist:%define mysql_dist %{mysql_dist_default}} -%{!?mysql_download_base_url:%define mysql_download_base_url %{mysql_download_base_url_default}} -%{!?mysql_spec_file:%define mysql_spec_file %{mysql_spec_file_default}} +%define _mysql_version %{?mysql_version:%{mysql_version}}%{!?mysql_version:%{mysql_version_default}} +%define _mysql_release %{?mysql_release:%{mysql_release}}%{!?mysql_release:%{mysql_release_default}} +%define _mysql_dist %{?mysql_dist:%{mysql_dist}}%{!?mysql_dist:%{mysql_dist_default}} +%define _mysql_download_base_url %{?mysql_download_base_url:%{mysql_download_base_url}}%{!?mysql_download_base_url:%{mysql_download_base_url_default}} +%define _mysql_spec_file %{?mysql_spec_file:%{mysql_spec_file}}%{!?mysql_spec_file:%{mysql_spec_file_default}} %define groonga_required_version @REQUIRED_GROONGA_VERSION@ @@ -31,10 +31,10 @@ BuildRequires: wget BuildRequires: which BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: Percona-Server-devel-56 = %{mysql_version}-%{mysql_release}%{mysql_dist} +BuildRequires: Percona-Server-devel-56 = %{_mysql_version}-%{_mysql_release}%{_mysql_dist} BuildRequires: selinux-policy-devel -Requires: Percona-Server-server-56 = %{mysql_version}-%{mysql_release}%{mysql_dist} -Requires: Percona-Server-client-56 = %{mysql_version}-%{mysql_release}%{mysql_dist} +Requires: Percona-Server-server-56 = %{_mysql_version}-%{_mysql_release}%{_mysql_dist} +Requires: Percona-Server-client-56 = %{_mysql_version}-%{_mysql_release}%{_mysql_dist} Requires: groonga-libs >= %{groonga_required_version} Requires: groonga-normalizer-mysql @@ -55,23 +55,26 @@ Documentation for Mroonga %prep %setup -q -n mroonga-%{version} -mysql_full_version=%{mysql_version}-%{mysql_release}.generic +mysql_full_version=%{_mysql_version}-%{_mysql_release}.generic srpm=Percona-Server-56-${mysql_full_version}.src.rpm if [ ! -f ../../SRPMS/$srpm ]; then - wget --continue -O ../../SRPMS/$srpm %{mysql_download_base_url}/$srpm + wget --continue -O ../../SRPMS/$srpm %{_mysql_download_base_url}/$srpm rpm -Uvh ../../SRPMS/$srpm fi %build -mysql_source=../percona-server-%{mysql_version}-$(echo %{mysql_release} | sed -e 's/rel//') +mysql_source=../percona-server-%{_mysql_version}-$(echo %{_mysql_release} | sed -e 's/rel//') if [ ! -d ${mysql_source} ]; then specs_dir= rpmbuild -bp \ --define 'runselftest 0' \ --define 'optflags -O0' \ - ../../SPECS/%{mysql_spec_file} + ../../SPECS/%{_mysql_spec_file} fi -%configure --disable-static --with-mysql-source=${mysql_source} \ +%configure \ + --disable-static \ + --with-mysql-source=${mysql_source} \ + --enable-fast-mutexes \ %{?mroonga_configure_options} make %{?_smp_mflags} @@ -94,9 +97,11 @@ fi mysql_command=`which mysql` password_option="" -$mysql_command -u root -e "quit" -if [ $? -ne 0 ]; then - password_option="-p" + +if $mysql_command -u root -e "quit" > /dev/null 2>&1; then + password_option="" +else + password_option="-p" fi current_version=0 version=`echo %{groonga_required_version} | sed -e 's/\.//g'` @@ -144,7 +149,7 @@ fi uninstall_sql=%{_datadir}/mroonga/uninstall.sql mysql_command=`which mysql` -if $mysql_command -u root -e "quit"; then +if $mysql_command -u root -e "quit" > /dev/null 2>&1; then password_option="" else password_option="-p" @@ -174,5 +179,95 @@ fi %doc mysql-mroonga-doc/* %changelog +* Thu Oct 12 2017 Kentaro Hayashi - 7.07-1 +- new upstream release. + +* Tue Aug 29 2017 Kentaro Hayashi - 7.06-1 +- new upstream release. + +* Mon Aug 14 2017 Kentaro Hayashi - 7.05-2 +- build against Percona Server 5.6.36rel82.1 Reported by @tigersun2000_twitter. Thanks!!! + +* Sat Jul 29 2017 Kentaro Hayashi - 7.05-1 +- new upstream release. + +* Thu Jun 29 2017 Kentaro Hayashi - 7.04-1 +- new upstream release. + +* Mon May 29 2017 Kentaro Hayashi - 7.03-1 +- new upstream release. + +* Thu May 17 2017 Kentaro Hayashi - 7.02-2 +- build against Percona Server 5.6.36. Reported by @pinpikokun. Thanks!!! + +* Sat Apr 29 2017 Kentaro Hayashi - 7.02-1 +- new upstream release. + +* Wed Mar 29 2017 Kentaro Hayashi - 7.01-1 +- new upstream release. + +* Thu Feb 09 2017 Kentaro Hayashi - 7.00-1 +- new upstream release. + +* Fri Jan 13 2017 Kouhei Sutou - 6.13-1 +- new upstream release. + +* Thu Dec 29 2016 Kentaro Hayashi - 6.12-1 +- new upstream release. + +* Tue Nov 29 2016 Kentaro Hayashi - 6.11-1 +- new upstream release. + +* Sat Oct 29 2016 Kentaro Hayashi - 6.10-1 +- new upstream release. + +* Mon Oct 24 2016 Kouhei Sutou - 6.09-2 +- build against Percona Server 5.6.33. Reported by Hiroshi Kagami. Thanks!!! + +* Thu Sep 29 2016 Kentaro Hayashi - 6.09-1 +- new upstream release. + +* Mon Aug 29 2016 Kentaro Hayashi - 6.08-1 +- new upstream release. + +* Fri Jul 29 2016 Kentaro Hayashi - 6.07-1 +- new upstream release. + +* Thu Jun 30 2016 Masafumi Yokoyama - 6.06-1 +- new upstream release. + +* Wed Jun 29 2016 Kentaro Hayashi - 6.05-1 +- new upstream release. + +* Sun May 29 2016 Kentaro Hayashi - 6.03-1 +- new upstream release. + +* Fri Apr 29 2016 HAYASHI Kentaro - 6.02-1 +- new upstream release. + +* Tue Mar 29 2016 Masafumi Yokoyama - 6.01-1 +- new upstream release. + +* Mon Feb 29 2016 Kouhei Sutou - 6.00-1 +- new upstream release. + +* Fri Jan 29 2016 Kouhei Sutou - 5.12-1 +- new upstream release. + +* Tue Dec 29 2015 Kouhei Sutou - 5.11-1 +- new upstream release. + +* Sun Nov 29 2015 Kouhei Sutou - 5.10-1 +- new upstream release. + +* Thu Oct 29 2015 Kouhei Sutou - 5.09-1 +- new upstream release. + +* Tue Sep 29 2015 Kouhei Sutou - 5.08-1 +- new upstream release. + +* Mon Aug 31 2015 Kouhei Sutou - 5.06-1 +- new upstream release. + * Tue Mar 17 2015 Kouhei Sutou - 5.00-1 - initial release. diff --git a/storage/mroonga/packages/source/Makefile.am b/storage/mroonga/packages/source/Makefile.am index 143f5d038..efd09777a 100644 --- a/storage/mroonga/packages/source/Makefile.am +++ b/storage/mroonga/packages/source/Makefile.am @@ -1,17 +1,17 @@ MROONGA_BASE = $(PACKAGE)-$(VERSION) MROONGA_TAR_GZ = $(MROONGA_BASE).tar.gz -GROONGA_VERSION = 5.0.5 +GROONGA_VERSION = 7.0.7 GROONGA_BASE = groonga-$(GROONGA_VERSION) GROONGA_TAR_GZ = $(GROONGA_BASE).tar.gz -GROONGA_NORMALIZER_MYSQL_VERSION = 1.1.0 +GROONGA_NORMALIZER_MYSQL_VERSION = 1.1.1 GROONGA_NORMALIZER_MYSQL_BASE = \ groonga-normalizer-mysql-$(GROONGA_NORMALIZER_MYSQL_VERSION) GROONGA_NORMALIZER_MYSQL_TAR_GZ = \ $(GROONGA_NORMALIZER_MYSQL_BASE).tar.gz -MARIADB_VERSION = 10.0.20 +MARIADB_VERSION = 10.1.28 MARIADB_BASE = mariadb-$(MARIADB_VERSION) MARIADB_TAR_GZ = $(MARIADB_BASE).tar.gz @@ -29,7 +29,7 @@ CURL = curl --fail --silent --show-error all: -release: archive upload +release: download archive upload ensure-rsync-path: @if test -z "$(RSYNC_PATH)"; then \ @@ -88,6 +88,8 @@ tmp/$(MARIADB_WITH_MROONGA_BASE).stamp: $(MARIADB_WITH_MROONGA_ARCHIVES) mkdir -p $$(dirname $(BUNDLED_GROONGA_PATH)) tar xf tmp/$(GROONGA_TAR_GZ) rm -rf $(GROONGA_BASE)/test + cd $(GROONGA_BASE)/vendor && ruby download_mecab.rb + cd $(GROONGA_BASE)/vendor && ruby download_lz4.rb mv $(GROONGA_BASE) $(BUNDLED_GROONGA_PATH) tar xf tmp/$(GROONGA_NORMALIZER_MYSQL_TAR_GZ) @@ -103,7 +105,7 @@ files/$(MARIADB_WITH_MROONGA_BASE).tar.gz: tmp/$(MARIADB_WITH_MROONGA_BASE).stam mkdir -p files/ (cd tmp && tar czf ../$@ $(MARIADB_WITH_MROONGA_BASE)) -PATCHES = \ +PATCHES = \ patches/mariadb-10.0.3-windows-build.diff tmp/$(MARIADB_WITH_MROONGA_FOR_WINDOWS_BASE).stamp: tmp/$(MARIADB_WITH_MROONGA_BASE).stamp $(PATCHES) diff --git a/storage/mroonga/packages/ubuntu/Makefile.am b/storage/mroonga/packages/ubuntu/Makefile.am index 2297a50bf..7241391bc 100644 --- a/storage/mroonga/packages/ubuntu/Makefile.am +++ b/storage/mroonga/packages/ubuntu/Makefile.am @@ -1,5 +1,13 @@ -CODE_NAMES = precise,trusty,utopic,vivid +CODE_NAMES = trusty,xenial,zesty SOURCE = ../$(PACKAGE)-$(VERSION).tar.gz +SOURCE_55_BASE = $(PACKAGE)-5.5 +SOURCE_55 = $(SOURCE_55_BASE)_$(VERSION).orig.tar.gz +SOURCE_56_BASE = $(PACKAGE)-5.6 +SOURCE_56 = $(SOURCE_56_BASE)_$(VERSION).orig.tar.gz +SOURCE_57_BASE = $(PACKAGE)-5.7 +SOURCE_57 = $(SOURCE_57_BASE)_$(VERSION).orig.tar.gz +SOURCE_MARIADB_10_0_BASE = $(PACKAGE)-mariadb-10.0 +SOURCE_MARIADB_10_0 = $(SOURCE_MARIADB_10_0_BASE)_$(VERSION).orig.tar.gz all: @@ -13,12 +21,37 @@ upload: source ensure-launchpad-configuration ./upload.rb \ --package '$(PACKAGE)' \ --version '$(VERSION)' \ - --source-archive '$(SOURCE)' \ + --source-archive-directory '$(builddir)/' \ --code-names '$(CODE_NAMES)' \ - --debian-directory '$(srcdir)/../debian/' \ + --debian-base-directory '$(srcdir)/../' \ + --ppa '$(LAUNCHPAD_PPA)' \ --pgp-sign-key '$(LAUNCHPAD_UPLOADER_PGP_KEY)' -source: $(SOURCE) +source: $(SOURCE_55) $(SOURCE_56) $(SOURCE_57) $(SOURCE_MARIADB_10_0) $(SOURCE): ln -s $(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz $(SOURCE) + +$(SOURCE_55): $(SOURCE) + tar xf $(SOURCE) + mv $(PACKAGE)-$(VERSION) $(SOURCE_55_BASE)-$(VERSION) + tar cfz $(SOURCE_55) $(SOURCE_55_BASE)-$(VERSION) + rm -r $(SOURCE_55_BASE)-$(VERSION) + +$(SOURCE_56): $(SOURCE) + tar xf $(SOURCE) + mv $(PACKAGE)-$(VERSION) $(SOURCE_56_BASE)-$(VERSION) + tar cfz $(SOURCE_56) $(SOURCE_56_BASE)-$(VERSION) + rm -r $(SOURCE_56_BASE)-$(VERSION) + +$(SOURCE_57): $(SOURCE) + tar xf $(SOURCE) + mv $(PACKAGE)-$(VERSION) $(SOURCE_57_BASE)-$(VERSION) + tar cfz $(SOURCE_57) $(SOURCE_57_BASE)-$(VERSION) + rm -r $(SOURCE_57_BASE)-$(VERSION) + +$(SOURCE_MARIADB_10_0): $(SOURCE) + tar xf $(SOURCE) + mv $(PACKAGE)-$(VERSION) $(SOURCE_MARIADB_10_0_BASE)-$(VERSION) + tar cfz $(SOURCE_MARIADB_10_0) $(SOURCE_MARIADB_10_0_BASE)-$(VERSION) + rm -r $(SOURCE_MARIADB_10_0_BASE)-$(VERSION) diff --git a/storage/mroonga/packages/ubuntu/upload.rb b/storage/mroonga/packages/ubuntu/upload.rb index 8743520b5..1fedb2ecb 100755 --- a/storage/mroonga/packages/ubuntu/upload.rb +++ b/storage/mroonga/packages/ubuntu/upload.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby # -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2016 Kouhei Sutou # Copyright(C) 2014 HAYASHI Kentaro # # This library is free software; you can redistribute it and/or @@ -24,6 +24,7 @@ require "open-uri" class Uploader def initialize @dput_configuration_name = "groonga-ppa" + @use_pbuilder = false end def run @@ -36,7 +37,22 @@ class Uploader @required_groonga_version = required_groonga_version @code_names.each do |code_name| - upload(code_name) + mysql55_version = @mysql55_versions[code_name] + mysql56_version = @mysql56_versions[code_name] + mysql57_version = @mysql57_versions[code_name] + mariadb10_0_version = @mariadb10_0_versions[code_name] + if mysql55_version + upload(code_name, "5.5", mysql55_version) + end + if mysql56_version + upload(code_name, "5.6", mysql56_version) + end + if mysql57_version + upload(code_name, "5.7", mysql57_version) + end + if mariadb10_0_version + upload(code_name, "mariadb-10.0", mariadb10_0_version) + end end end @@ -66,18 +82,37 @@ allow_unsigned_uploads = 0 end def ensure_mysql_version - @mysql_version = {} + @mysql_versions = {} + @mysql55_versions = {} + @mysql56_versions = {} + @mysql57_versions = {} + @mariadb10_0_versions = {} @code_names.each do |code_name| - open("http://packages.ubuntu.com/#{code_name}/allpackages?format=txt.gz") do |file| - file.each_line do |line| - @mysql_version[code_name] = $1 if line =~ /\Amysql-server \((.+?)\).+/ + source_names = [code_name, "#{code_name}-updates"] + source_names.each do |source_name| + allpackages_url = + "http://packages.ubuntu.com/#{source_name}/allpackages?format=txt.gz" + open(allpackages_url) do |file| + file.each_line do |line| + case line + when /\Amysql-server \((.+?)[\s)]/ + @mysql_versions[code_name] = $1 + when /\Amysql-server-5\.5 \((.+?)[\s)]/ + @mysql55_versions[code_name] = $1 + when /\Amysql-server-5\.6 \((.+?)[\s)]/ + @mysql56_versions[code_name] = $1 + when /\Amysql-server-5\.7 \((.+?)[\s)]/ + @mysql57_versions[code_name] = $1 + when /\Amariadb-server-10\.0 \((.+?)[\s)]/ + @mariadb10_0_versions[code_name] = $1 + end + end end end end end def parse_command_line! - parser = OptionParser.new parser.on("--package=NAME", "The package name") do |name| @@ -87,59 +122,97 @@ allow_unsigned_uploads = 0 "The version") do |version| @version = version end - parser.on("--source-archive=ARCHIVE", - "The source archive") do |source_archive| - @source_archive = Pathname.new(source_archive).expand_path + parser.on("--source-archive-directory=DIRECTORY", + "The directory that has source archives") do |directory| + @source_archive_directory = Pathname.new(directory).expand_path end parser.on("--code-names=CODE_NAME1,CODE_NAME2,CODE_NAME3,...", Array, "The target code names") do |code_names| @code_names = code_names end - parser.on("--debian-directory=DIRECTORY", - "The debian/ directory") do |debian_directory| - @debian_directory = Pathname.new(debian_directory).expand_path + parser.on("--debian-base-directory=DIRECTORY", + "The directory that has debianXX/ directory") do |directory| + @debian_base_directory = Pathname.new(directory).expand_path + end + parser.on("--ppa=PPA", + "The personal package archive name (groonga-ppa or groonga-nightly") do |ppa| + @dput_configuration_name = ppa end parser.on("--pgp-sign-key=KEY", "The PGP key to sign .changes and .dsc") do |pgp_sign_key| @pgp_sign_key = pgp_sign_key end - parser.on("--pbuilder", - "Use pbuilder for build check") do |pbuilder| - @use_pbuilder = pbuilder + parser.on("--[no-]pbuilder", + "Use pbuilder for build check") do |use_pbuilder| + @use_pbuilder = use_pbuilder end parser.parse! end - def upload(code_name) + def upload(code_name, mysql_short_version, mysql_version) + default_mysql_version = (@mysql_versions[code_name] == mysql_version) + deb_package_name = "#{@package}-#{mysql_short_version}" in_temporary_directory do - FileUtils.cp(@source_archive.to_s, - "#{@package}_#{@version}.orig.tar.gz") - run_command("tar", "xf", @source_archive.to_s) - directory_name = "#{@package}-#{@version}" + source_archive = + @source_archive_directory + "#{deb_package_name}_#{@version}.orig.tar.gz" + run_command("tar", "xf", source_archive.to_s) + directory_name = "#{deb_package_name}-#{@version}" Dir.chdir(directory_name) do - FileUtils.cp_r(@debian_directory.to_s, "debian") + debian_directory = + @debian_base_directory + "debian-#{mysql_short_version}" + FileUtils.cp_r(debian_directory.to_s, "debian") deb_version = "#{current_deb_version.succ}~#{code_name}1" run_command("dch", "--distribution", code_name, "--newversion", deb_version, "Build for #{code_name}.") - case code_name - when "vivid" - run_command("sed", - "-i", "-e", "s,5\\.5,5.6,g", - "debian/rules") + remove_versionless_mroonga = true + if default_mysql_version or mysql_short_version.start_with?("mariadb-") + remove_versionless_mroonga = false + end + if remove_versionless_mroonga + control_content = File.read("debian/control") + File.open("debian/control", "w") do |control| + in_mysql_server_mroonga = false + control_content.each_line do |line| + case line.chomp + when "" + if in_mysql_server_mroonga + in_mysql_server_mroonga = false + else + control.print(line) + end + when "Package: mysql-server-mroonga" + in_mysql_server_mroonga = true + else + next if in_mysql_server_mroonga + control.print(line) + end + end + end end run_command("sed", - "-i", "-e", "s,MYSQL_VERSION,#{@mysql_version[code_name]},", + "-i", "-e", + "s,MYSQL_VERSION\\|MARIADB_VERSION,#{mysql_version},", "debian/control") - run_command("debuild", "-S", "-sa", "-pgpg2", "-k#{@pgp_sign_key}") + run_command("debuild", + "--no-lintian", + # Workaround for Launchpad. Launchpad doesn't accept + # .buildinfo yet. + # See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853795 + "--buildinfo-option=-O", + "-d", + "-S", + "-sa", + "-pgpg2", + "-k#{@pgp_sign_key}") if @use_pbuilder run_command("pbuilder-dist", code_name, "build", - "../#{@package}_#{deb_version}.dsc") + "../#{deb_package_name}_#{deb_version}.dsc") else run_command("dput", @dput_configuration_name, - "../#{@package}_#{deb_version}_source.changes") + "../#{deb_package_name}_#{deb_version}_source.changes") end end end diff --git a/storage/mroonga/packages/windows/Makefile.am b/storage/mroonga/packages/windows/Makefile.am index 192709fac..240c3873a 100644 --- a/storage/mroonga/packages/windows/Makefile.am +++ b/storage/mroonga/packages/windows/Makefile.am @@ -1,12 +1,12 @@ EXTRA_DIST = \ README.md \ - build-vc2013.bat \ - build-vc2013-zip-32.bat \ - build-vc2013-zip-64.bat \ - build-vc2013-msi-32.bat \ - build-vc2013-msi-64.bat \ build-vc2015.bat \ build-vc2015-zip-32.bat \ build-vc2015-zip-64.bat \ build-vc2015-msi-32.bat \ - build-vc2015-msi-64.bat + build-vc2015-msi-64.bat \ + build-vc2017.bat \ + build-vc2017-zip-32.bat \ + build-vc2017-zip-64.bat \ + build-vc2017-msi-32.bat \ + build-vc2017-msi-64.bat diff --git a/storage/mroonga/packages/windows/README.md b/storage/mroonga/packages/windows/README.md index f220634b1..8737f2623 100644 --- a/storage/mroonga/packages/windows/README.md +++ b/storage/mroonga/packages/windows/README.md @@ -6,16 +6,16 @@ TODO... ## Build with Visual C++ Express -You need to use Visual C++ 2013 or later to build Mroonga with Express -edition. `build-vc2013.bat` is a build batch script to build with -Visual C++ Express 2013. +You need to use Visual Studio 2015 for Windows Desktop or later to build Mroonga with express +edition. `build-vc2015.bat` is a build batch script to build with +Visual Studio 2015 for Windows Desktop. Note that you can't build MSI file with Express edition. You need to use Professional edition or upper editions to build MSI file. -## Build with Visual C++ Professional +## Build with Visual Studio Community You can build both zip file MSI file with Professional edition. But now, this feature is temporary disabled. -If you want to create MSI package, please uncomment in `build-vc2013.bat`. -And then, you can build MSI package with Visual Studio 2013 Professional. +If you want to create MSI package, please uncomment in `build-vc2015.bat`. +And then, you can build MSI package with Visual Studio 2015 Community. diff --git a/storage/mroonga/packages/windows/build-vc2013-msi-32.bat b/storage/mroonga/packages/windows/build-vc2013-msi-32.bat deleted file mode 100644 index 22b299728..000000000 --- a/storage/mroonga/packages/windows/build-vc2013-msi-32.bat +++ /dev/null @@ -1,8 +0,0 @@ -rmdir /S /Q build-vc2013-msi-32 -mkdir build-vc2013-msi-32 -cd build-vc2013-msi-32 -cmake ..\source -G "Visual Studio 12" > config.log -cmake --build . --config RelWithDebInfo > build.log -cmake --build . --config RelWithDebInfo --target msi > msi.log -move *.msi ..\ -cd .. diff --git a/storage/mroonga/packages/windows/build-vc2013-msi-64.bat b/storage/mroonga/packages/windows/build-vc2013-msi-64.bat deleted file mode 100644 index c83a376cd..000000000 --- a/storage/mroonga/packages/windows/build-vc2013-msi-64.bat +++ /dev/null @@ -1,8 +0,0 @@ -rmdir /S /Q build-vc2013-msi-64 -mkdir build-vc2013-msi-64 -cd build-vc2013-msi-64 -cmake ..\source -G "Visual Studio 12 Win64" > config.log -cmake --build . --config RelWithDebInfo > build.log -cmake --build . --config RelWithDebInfo --target msi > msi.log -move *.msi ..\ -cd .. diff --git a/storage/mroonga/packages/windows/build-vc2013-zip-32.bat b/storage/mroonga/packages/windows/build-vc2013-zip-32.bat deleted file mode 100644 index d3e0e4f8b..000000000 --- a/storage/mroonga/packages/windows/build-vc2013-zip-32.bat +++ /dev/null @@ -1,8 +0,0 @@ -rmdir /S /Q build-vc2013-zip-32 -mkdir build-vc2013-zip-32 -cd build-vc2013-zip-32 -cmake ..\source -G "Visual Studio 12" -DMRN_GROONGA_EMBED=OFF -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF > config.log -cmake --build . --config RelWithDebInfo > build.log -cmake --build . --config RelWithDebInfo --target package > zip.log -move *.zip ..\ -cd .. diff --git a/storage/mroonga/packages/windows/build-vc2013-zip-64.bat b/storage/mroonga/packages/windows/build-vc2013-zip-64.bat deleted file mode 100644 index 6ca288b6a..000000000 --- a/storage/mroonga/packages/windows/build-vc2013-zip-64.bat +++ /dev/null @@ -1,8 +0,0 @@ -rmdir /S /Q build-vc2013-zip-64 -mkdir build-vc2013-zip-64 -cd build-vc2013-zip-64 -cmake ..\source -G "Visual Studio 12 Win64" -DMRN_GROONGA_EMBED=OFF -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF > config.log -cmake --build . --config RelWithDebInfo > build.log -cmake --build . --config RelWithDebInfo --target package > zip.log -move *.zip ..\ -cd .. diff --git a/storage/mroonga/packages/windows/build-vc2013.bat b/storage/mroonga/packages/windows/build-vc2013.bat deleted file mode 100644 index 99d7e4042..000000000 --- a/storage/mroonga/packages/windows/build-vc2013.bat +++ /dev/null @@ -1,4 +0,0 @@ -build-vc2013-zip-32.bat -build-vc2013-zip-64.bat -REM build-vc2013-msi-32.bat -REM build-vc2013-msi-64.bat diff --git a/storage/mroonga/packages/windows/build-vc2015-msi-32.bat b/storage/mroonga/packages/windows/build-vc2015-msi-32.bat index 4c92b5c02..69d803e84 100644 --- a/storage/mroonga/packages/windows/build-vc2015-msi-32.bat +++ b/storage/mroonga/packages/windows/build-vc2015-msi-32.bat @@ -1,7 +1,7 @@ rmdir /S /Q build-vc2015-msi-32 mkdir build-vc2015-msi-32 cd build-vc2015-msi-32 -cmake ..\source -G "Visual Studio 14" > config.log +cmake ..\source -G "Visual Studio 14 2015" > config.log cmake --build . --config RelWithDebInfo > build.log cmake --build . --config RelWithDebInfo --target msi > msi.log move *.msi ..\ diff --git a/storage/mroonga/packages/windows/build-vc2015-msi-64.bat b/storage/mroonga/packages/windows/build-vc2015-msi-64.bat index 82bc2a148..a3d6681bf 100644 --- a/storage/mroonga/packages/windows/build-vc2015-msi-64.bat +++ b/storage/mroonga/packages/windows/build-vc2015-msi-64.bat @@ -1,7 +1,7 @@ rmdir /S /Q build-vc2015-msi-64 mkdir build-vc2015-msi-64 cd build-vc2015-msi-64 -cmake ..\source -G "Visual Studio 14 Win64" > config.log +cmake ..\source -G "Visual Studio 14 2015 Win64" > config.log cmake --build . --config RelWithDebInfo > build.log cmake --build . --config RelWithDebInfo --target msi > msi.log move *.msi ..\ diff --git a/storage/mroonga/packages/windows/build-vc2015-zip-32.bat b/storage/mroonga/packages/windows/build-vc2015-zip-32.bat index 5cef259af..8247fd542 100644 --- a/storage/mroonga/packages/windows/build-vc2015-zip-32.bat +++ b/storage/mroonga/packages/windows/build-vc2015-zip-32.bat @@ -1,7 +1,12 @@ rmdir /S /Q build-vc2015-zip-32 mkdir build-vc2015-zip-32 cd build-vc2015-zip-32 -cmake ..\source -G "Visual Studio 14" -DMRN_GROONGA_EMBED=OFF -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF > config.log +cmake ..\source -G "Visual Studio 14 2015" ^ + -DMRN_GROONGA_EMBED=OFF ^ + -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF ^ + -DGRN_WITH_BUNDLED_LZ4=ON ^ + -DGRN_WITH_BUNDLED_MECAB=ON ^ + > config.log cmake --build . --config RelWithDebInfo > build.log cmake --build . --config RelWithDebInfo --target package > zip.log move *.zip ..\ diff --git a/storage/mroonga/packages/windows/build-vc2015-zip-64.bat b/storage/mroonga/packages/windows/build-vc2015-zip-64.bat index caabca179..b56d80eb1 100644 --- a/storage/mroonga/packages/windows/build-vc2015-zip-64.bat +++ b/storage/mroonga/packages/windows/build-vc2015-zip-64.bat @@ -1,7 +1,12 @@ rmdir /S /Q build-vc2015-zip-64 mkdir build-vc2015-zip-64 cd build-vc2015-zip-64 -cmake ..\source -G "Visual Studio 14 Win64" -DMRN_GROONGA_EMBED=OFF -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF > config.log +cmake ..\source -G "Visual Studio 14 2015 Win64" ^ + -DMRN_GROONGA_EMBED=OFF ^ + -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF ^ + -DGRN_WITH_BUNDLED_LZ4=ON ^ + -DGRN_WITH_BUNDLED_MECAB=ON ^ + > config.log cmake --build . --config RelWithDebInfo > build.log cmake --build . --config RelWithDebInfo --target package > zip.log move *.zip ..\ diff --git a/storage/mroonga/packages/windows/build-vc2015.bat b/storage/mroonga/packages/windows/build-vc2015.bat index f9ac17657..729f181db 100644 --- a/storage/mroonga/packages/windows/build-vc2015.bat +++ b/storage/mroonga/packages/windows/build-vc2015.bat @@ -1,4 +1,4 @@ -build-vc2015-zip-32.bat -build-vc2015-zip-64.bat +call build-vc2015-zip-32.bat +call build-vc2015-zip-64.bat REM build-vc2015-msi-32.bat REM build-vc2015--msi-64.bat diff --git a/storage/mroonga/packages/yum/Makefile.am b/storage/mroonga/packages/yum/Makefile.am index 832161986..9d1bd6061 100644 --- a/storage/mroonga/packages/yum/Makefile.am +++ b/storage/mroonga/packages/yum/Makefile.am @@ -1,7 +1,16 @@ REPOSITORIES_PATH = repositories DISTRIBUTIONS = centos ARCHITECTURES = i386 x86_64 -MYSQL_VARIANTS = mysql55 mysql56-community mariadb percona-server-56 +MYSQL_VARIANTS = \ + mysql55 \ + mysql56-community \ + mysql57-community \ + mariadb \ + mariadb-10.1 \ + mariadb-10.2 \ + percona-server-56 \ + percona-server-57 +CENTOS_VERSIONS = 6 7 SPEC_DIR = $(builddir)/../rpm/centos all: @@ -47,7 +56,8 @@ build-in-vm: source specs env.sh "$(PACKAGE)" \ "$(SPEC_DIR)" \ "$(MYSQL_VARIANTS)" \ - "$(ARCHITECTURES)" + "$(ARCHITECTURES)" \ + "$(CENTOS_VERSIONS)" source: tmp/$(PACKAGE)-$(VERSION).tar.gz @@ -61,4 +71,7 @@ $(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz: specs: $(SPEC_DIR)/mysql55-$(PACKAGE).spec specs: $(SPEC_DIR)/mysql56-community-$(PACKAGE).spec specs: $(SPEC_DIR)/mariadb-$(PACKAGE).spec +specs: $(SPEC_DIR)/mariadb-10.1-$(PACKAGE).spec +specs: $(SPEC_DIR)/mariadb-10.2-$(PACKAGE).spec specs: $(SPEC_DIR)/percona-server-56-$(PACKAGE).spec +specs: $(SPEC_DIR)/percona-server-57-$(PACKAGE).spec diff --git a/storage/mroonga/packages/yum/Vagrantfile b/storage/mroonga/packages/yum/Vagrantfile index da41350ee..af14bc9a7 100644 --- a/storage/mroonga/packages/yum/Vagrantfile +++ b/storage/mroonga/packages/yum/Vagrantfile @@ -6,32 +6,23 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vms = [ - { - :id => "centos-5-i386", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-5.11-i386_chef-provisionerless.box", - }, - { - :id => "centos-5-x86_64", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-5.11_chef-provisionerless.box", - }, { :id => "centos-6-i386", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.6-i386_chef-provisionerless.box", + :box => "bento/centos-6.9-i386", }, { :id => "centos-6-x86_64", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.6_chef-provisionerless.box", + :box => "bento/centos-6.9", }, { :id => "centos-7-x86_64", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.1_chef-provisionerless.box", + :box => "bento/centos-7.4", }, ] vms.each do |vm| config.vm.define(vm[:id]) do |node| - node.vm.box = vm[:id] - node.vm.box_url = vm[:box_url] + node.vm.box = vm[:box] node.vm.provision(:shell, :path => "build-rpm.sh") node.vm.provider("virtualbox") do |virtual_box| system_n_cpus = 1 @@ -44,6 +35,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vm_n_cpus = 1 end virtual_box.cpus = vm_n_cpus + virtual_box.memory = (ENV["VM_MEMORY"] || 1024).to_i end end end diff --git a/storage/mroonga/packages/yum/build-in-vm.sh b/storage/mroonga/packages/yum/build-in-vm.sh index cf9ef581f..fc84e4502 100755 --- a/storage/mroonga/packages/yum/build-in-vm.sh +++ b/storage/mroonga/packages/yum/build-in-vm.sh @@ -1,8 +1,8 @@ #!/bin/sh -if [ $# != 4 ]; then +if [ $# != 5 ]; then echo "Usage: $0 PACKAGE SPEC_DIR MYSQL_VARIANTS ARCHITECTURES" - echo " e.g.: $0 mroonga ../rpm/centos 'mysql55 mariadb' 'i386 x86_64'" + echo " e.g.: $0 mroonga ../rpm/centos 'mysql55 mariadb' 'i386 x86_64' '6 7'" exit 1 fi @@ -10,6 +10,7 @@ PACKAGE="$1" SPEC_DIR="$2" MYSQL_VARIANTS="$3" ARCHITECTURES="$4" +CENTOS_VERSIONS="$5" run() { @@ -30,21 +31,42 @@ for mysql_variant in ${MYSQL_VARIANTS}; do architectures="${ARCHITECTURES}" case ${mysql_variant} in mysql55) - centos_versions="5 6" + centos_versions="6" ;; mysql56-community) centos_versions="6 7" ;; + mysql57-community) + centos_versions="6 7" + ;; mariadb) centos_versions="7" ;; + mariadb-10.1) + centos_versions="6 7" + ;; + mariadb-10.2) + centos_versions="6 7" + ;; percona-server-56) centos_versions="6 7" ;; + percona-server-57) + centos_versions="6 7" + ;; esac for architecture in ${architectures}; do for centos_version in ${centos_versions}; do + skip=1 + for given_version in ${CENTOS_VERSIONS}; do + if [ ${given_version} = ${centos_version} ]; then + skip=0 + fi + done + if [ $skip -eq 1 ]; then + continue + fi if [ ${mysql_variant} = mysql55 -a ${centos_version} = 6 -a ${architecture} = i386 ]; then continue fi diff --git a/storage/mroonga/packages/yum/build-rpm.sh b/storage/mroonga/packages/yum/build-rpm.sh index 8661e6593..6ba943ae7 100755 --- a/storage/mroonga/packages/yum/build-rpm.sh +++ b/storage/mroonga/packages/yum/build-rpm.sh @@ -70,36 +70,94 @@ case ${distribution} in run yum install -y mariadb-devel ;; centos) + release_rpm=groonga-release-1.3.0-1.noarch.rpm + if [ ${distribution_version} = 5 ]; then + wget http://packages.groonga.org/${distribution}/${release_rpm} + run yum install -y --nogpgcheck ${release_rpm} + rm -f ${release_rpm} + else + run yum install -y \ + http://packages.groonga.org/${distribution}/${release_rpm} + fi + run yum makecache + case ${package_name} in mysql55-${PACKAGE}) USE_MYSQLSERVICES_COMPAT=yes run yum install -y scl-utils-build if [ ${distribution_version} = 6 ]; then - run yum install -y centos-release-SCL + run yum install -y centos-release-scl fi run yum install -y mysql55-mysql-devel mysql55-build ;; - mysql56-community-${PACKAGE}) - release_rpm=mysql-community-release-el${distribution_version}-5.noarch.rpm + mysql5?-community-${PACKAGE}) + release_rpm=mysql-community-release-el${distribution_version}-7.noarch.rpm run yum -y install http://repo.mysql.com/${release_rpm} - run yum -y install mysql-community-devel + if [ "${package_name}" = "mysql57-community-${PACKAGE}" ]; then + run yum install -y yum-utils + run yum-config-manager --disable mysql56-community + run yum-config-manager --enable mysql57-community + if [ ${distribution_version} = 6 ]; then + run yum install -y cmake28 + fi + fi + run yum install -y mysql-community-devel ;; mariadb-${PACKAGE}) - run yum -y install mariadb-devel - ;; + run yum install -y mariadb-devel + ;; + mariadb-10.1-${PACKAGE}) + if [ "${architecture}" = "x86_64" ]; then + mariadb_architecture="amd64" + else + mariadb_architecture="x86" + fi + cat < /etc/yum.repos.d/MariaDB.repo +[mariadb] +name = MariaDB +baseurl = http://yum.mariadb.org/10.1/${distribution}${distribution_version}-${mariadb_architecture} +gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB +gpgcheck=1 +REPO + run yum install -y MariaDB-devel + if [ ${distribution_version} = 6 ]; then + run yum install -y cmake28 + fi + ;; + mariadb-10.2-${PACKAGE}) + if [ "${architecture}" = "x86_64" ]; then + mariadb_architecture="amd64" + else + mariadb_architecture="x86" + fi + cat < /etc/yum.repos.d/MariaDB.repo +[mariadb] +name = MariaDB +baseurl = http://yum.mariadb.org/10.2/${distribution}${distribution_version}-${mariadb_architecture} +gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB +gpgcheck=1 +REPO + run yum install -y MariaDB-devel + if [ ${distribution_version} = 6 ]; then + run yum install -y cmake28 + fi + ;; percona-server-56-${PACKAGE}) - release_rpm_version=0.1-3 + release_rpm_version=0.1-4 + release_rpm=percona-release-${release_rpm_version}.noarch.rpm + run yum install -y http://www.percona.com/downloads/percona-release/redhat/${release_rpm_version}/${release_rpm} + run yum install -y Percona-Server-devel-56 + ;; + percona-server-57-${PACKAGE}) + release_rpm_version=0.1-4 release_rpm=percona-release-${release_rpm_version}.noarch.rpm - run yum -y install http://www.percona.com/downloads/percona-release/redhat/${release_rpm_version}/${release_rpm} - run yum -y install Percona-Server-devel-56 + run yum install -y http://www.percona.com/downloads/percona-release/redhat/${release_rpm_version}/${release_rpm} + run yum install -y Percona-Server-devel-57 + if [ ${distribution_version} = 6 ]; then + run yum install -y cmake28 + fi ;; esac - - release_rpm=groonga-release-1.1.0-1.noarch.rpm - wget http://packages.groonga.org/${distribution}/${release_rpm} - run rpm -U ${release_rpm} - rm -f ${release_rpm} - run yum makecache ;; esac run yum install -y ${DEPENDED_PACKAGES} @@ -109,6 +167,11 @@ if [ "${package_name}" = "percona-server-56-${PACKAGE}" ]; then rpmbuild_options="$rpmbuild_options --define 'dist .el7'" fi fi +if [ "${package_name}" = "percona-server-57-${PACKAGE}" ]; then + if [ "${distribution_version}" = "7" ]; then + rpmbuild_options="$rpmbuild_options --define 'dist .el7'" + fi +fi if [ "${USE_MYSQLSERVICES_COMPAT}" = "yes" ]; then rpmbuild_options="$rpmbuild_options --define 'mroonga_configure_options --with-libmysqlservices-compat'" fi diff --git a/storage/mroonga/packages/yum/env.sh.in b/storage/mroonga/packages/yum/env.sh.in index 8c6d05baf..3d327a17e 100644 --- a/storage/mroonga/packages/yum/env.sh.in +++ b/storage/mroonga/packages/yum/env.sh.in @@ -9,6 +9,7 @@ make gperf readline-devel openssl-devel +zlib-devel time wget ncurses-devel @@ -23,6 +24,9 @@ perl-Env perl-Test-Simple pam-devel selinux-policy-devel +numactl-devel groonga-devel groonga-normalizer-mysql-devel +cyrus-sasl-devel +openldap-devel " diff --git a/storage/mroonga/packages/yum/update-repository.sh b/storage/mroonga/packages/yum/update-repository.sh index 630b6c874..59eeafa55 100755 --- a/storage/mroonga/packages/yum/update-repository.sh +++ b/storage/mroonga/packages/yum/update-repository.sh @@ -22,8 +22,6 @@ run() for distribution in ${DISTRIBUTIONS}; do for dir in ${DESTINATION}${distribution}/*/*; do - # "--checksum sha" is for CentOS 5. If we drop CentOS 5 support, - # we can remove the option. - test -d $dir && run createrepo --checksum sha $dir + test -d $dir && run createrepo $dir done; done diff --git a/storage/mroonga/plugin_version b/storage/mroonga/plugin_version index 48c32b26a..120096f1f 100644 --- a/storage/mroonga/plugin_version +++ b/storage/mroonga/plugin_version @@ -1 +1 @@ -5.4 \ No newline at end of file +7.7 \ No newline at end of file diff --git a/storage/mroonga/required_groonga_version b/storage/mroonga/required_groonga_version index a1ef0cae1..024b4b9b5 100644 --- a/storage/mroonga/required_groonga_version +++ b/storage/mroonga/required_groonga_version @@ -1 +1 @@ -5.0.2 +7.0.6 diff --git a/storage/mroonga/test/run-sql-test.sh b/storage/mroonga/test/run-sql-test.sh index f1679dc70..d3aaf6aec 100755 --- a/storage/mroonga/test/run-sql-test.sh +++ b/storage/mroonga/test/run-sql-test.sh @@ -1,7 +1,7 @@ #!/bin/sh # # Copyright(C) 2010 Tetsuro IKEDA -# Copyright(C) 2010-2013 Kouhei Sutou +# Copyright(C) 2010-2017 Kouhei Sutou # Copyright(C) 2011 Kazuhiko # # This library is free software; you can redistribute it and/or @@ -16,7 +16,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA export BASE_DIR="$(cd $(dirname $0); pwd)" top_dir="$BASE_DIR/.." @@ -24,31 +24,44 @@ mroonga_test_dir="${top_dir}/mysql-test/mroonga" n_processors=1 case `uname` in - Linux) - n_processors="$(grep '^processor' /proc/cpuinfo | wc -l)" - ;; - Darwin) - n_processors="$(/usr/sbin/sysctl -n hw.ncpu)" - ;; - *) - : - ;; + Linux) + n_processors="$(grep '^processor' /proc/cpuinfo | wc -l)" + ;; + Darwin) + n_processors="$(/usr/sbin/sysctl -n hw.ncpu)" + ;; + *) + : + ;; esac if [ "$NO_MAKE" != "yes" ]; then - MAKE_ARGS= - if [ -n "$n_processors" ]; then - MAKE_ARGS="-j${n_processors}" - fi - make $MAKE_ARGS -C $top_dir > /dev/null || exit 1 + MAKE_ARGS= + if [ -n "$n_processors" ]; then + MAKE_ARGS="-j${n_processors}" + fi + make $MAKE_ARGS -C $top_dir > /dev/null || exit 1 fi . "${top_dir}/config.sh" bundled_groonga_normalizer_mysql_dir="${top_dir}/vendor/groonga/vendor/plugins/groonga-normalizer-mysql" if [ -d "${bundled_groonga_normalizer_mysql_dir}" ]; then - GRN_PLUGINS_DIR="${bundled_groonga_normalizer_mysql_dir}" - export GRN_PLUGINS_DIR + GRN_PLUGINS_DIR="${bundled_groonga_normalizer_mysql_dir}" + export GRN_PLUGINS_DIR +fi + +maria_storage_dir="${MYSQL_SOURCE_DIR}/storage/maria" +if [ -d "${maria_storage_dir}" ]; then + mariadb="yes" +else + mariadb="no" +fi +percona_udf_dir="${MYSQL_SOURCE_DIR}/plugin/percona-udf" +if [ -d "${percona_udf_dir}" ]; then + percona="yes" +else + percona="no" fi source_mysql_test_dir="${MYSQL_SOURCE_DIR}/mysql-test" @@ -58,51 +71,47 @@ source_test_include_dir="${source_mysql_test_dir}/include" build_test_suites_dir="${build_mysql_test_dir}/suite" build_test_include_dir="${build_mysql_test_dir}/include" case "${MYSQL_VERSION}" in - 5.1.*) - plugins_dir="${MYSQL_BUILD_DIR}/lib/mysql/plugin" - if [ ! -d "${build_test_suites_dir}" ]; then - mkdir -p "${build_test_suites_dir}" - fi - ;; - *) - if [ ! -d "${build_test_suites_dir}" ]; then - ln -s "${source_test_suites_dir}" "${build_test_suites_dir}" - fi - maria_storage_dir="${MYSQL_SOURCE_DIR}/storage/maria" - if [ -d "${maria_storage_dir}" ]; then - mariadb="yes" - else - mariadb="no" - fi - if [ "${mariadb}" = "yes" ]; then - if [ "${MRN_BUNDLED}" != "TRUE" ]; then - mariadb_mroonga_plugin_dir="${MYSQL_BUILD_DIR}/plugin/mroonga" - if [ ! -e "${mariadb_mroonga_plugin_dir}" ]; then - ln -s "${top_dir}" "${mariadb_mroonga_plugin_dir}" - fi - fi - plugins_dir= - else - plugins_dir="${MYSQL_SOURCE_DIR}/lib/plugin" + 5.1.*) + plugins_dir="${MYSQL_BUILD_DIR}/lib/mysql/plugin" + if [ ! -d "${build_test_suites_dir}" ]; then + mkdir -p "${build_test_suites_dir}" + fi + ;; + *) + if [ ! -d "${build_test_suites_dir}" ]; then + ln -s "${source_test_suites_dir}" "${build_test_suites_dir}" + fi + if [ "${mariadb}" = "yes" ]; then + if [ "${MRN_BUNDLED}" != "TRUE" ]; then + mariadb_mroonga_plugin_dir="${MYSQL_BUILD_DIR}/plugin/mroonga" + if [ ! -e "${mariadb_mroonga_plugin_dir}" ]; then + ln -s "${top_dir}" "${mariadb_mroonga_plugin_dir}" fi - ;; + fi + plugins_dir= + elif [ "${percona}" = "yes" ]; then + plugins_dir="${MYSQL_SOURCE_DIR}/lib/mysql/plugin" + else + plugins_dir="${MYSQL_SOURCE_DIR}/lib/plugin" + fi + ;; esac same_link_p() { - src=$1 - dest=$2 - if [ -L "$dest" -a "$(readlink "$dest")" = "$src" ]; then - return 0 - else - return 1 - fi + src=$1 + dest=$2 + if [ -L "$dest" -a "$(readlink "$dest")" = "$src" ]; then + return 0 + else + return 1 + fi } mroonga_mysql_test_suite_dir="${build_test_suites_dir}/mroonga" if ! same_link_p "${mroonga_test_dir}" "${mroonga_mysql_test_suite_dir}"; then - rm -rf "${mroonga_mysql_test_suite_dir}" - ln -s "${mroonga_test_dir}" "${mroonga_mysql_test_suite_dir}" + rm -rf "${mroonga_mysql_test_suite_dir}" + ln -s "${mroonga_test_dir}" "${mroonga_mysql_test_suite_dir}" fi innodb_test_suite_dir="${build_test_suites_dir}/innodb" @@ -110,27 +119,27 @@ mroonga_wrapper_innodb_test_suite_name="mroonga_wrapper_innodb" mroonga_wrapper_innodb_test_suite_dir="${build_test_suites_dir}/${mroonga_wrapper_innodb_test_suite_name}" mroonga_wrapper_innodb_include_dir="${mroonga_wrapper_innodb_test_suite_dir}/include/" if [ "$0" -nt "$(dirname "${mroonga_wrapper_innodb_test_suite_dir}")" ]; then - rm -rf "${mroonga_wrapper_innodb_test_suite_dir}" + rm -rf "${mroonga_wrapper_innodb_test_suite_dir}" fi if [ ! -d "${mroonga_wrapper_innodb_test_suite_dir}" ]; then - cp -rp "${innodb_test_suite_dir}" "${mroonga_wrapper_innodb_test_suite_dir}" - mkdir -p "${mroonga_wrapper_innodb_include_dir}" - cp -rp "${source_test_include_dir}"/innodb[-_]*.inc \ - "${mroonga_wrapper_innodb_include_dir}" - ruby -i'' \ - -pe "\$_.gsub!(/\\bengine\\s*=\\s*innodb\\b([^;\\n]*)/i, + cp -rp "${innodb_test_suite_dir}" "${mroonga_wrapper_innodb_test_suite_dir}" + mkdir -p "${mroonga_wrapper_innodb_include_dir}" + cp -rp "${source_test_include_dir}"/innodb[-_]*.inc \ + "${mroonga_wrapper_innodb_include_dir}" + ruby -i'' \ + -pe "\$_.gsub!(/\\bengine\\s*=\\s*innodb\\b([^;\\n]*)/i, \"ENGINE=mroonga\\\1 COMMENT='ENGINE \\\"InnoDB\\\"'\") \$_.gsub!(/\\b(storage_engine\\s*=\\s*)innodb\\b([^;\\n]*)/i, \"\\\1mroonga\") \$_.gsub!(/^(--\\s*source\\s+)(include\\/innodb)/i, \"\\\1suite/mroonga_wrapper_innodb/\\\2\") " \ - ${mroonga_wrapper_innodb_test_suite_dir}/r/*.result \ - ${mroonga_wrapper_innodb_test_suite_dir}/t/*.test \ - ${mroonga_wrapper_innodb_test_suite_dir}/include/*.inc - sed -i'' \ - -e '1 i --source ../mroonga/include/mroonga/have_mroonga.inc' \ - ${mroonga_wrapper_innodb_test_suite_dir}/t/*.test + ${mroonga_wrapper_innodb_test_suite_dir}/r/*.result \ + ${mroonga_wrapper_innodb_test_suite_dir}/t/*.test \ + ${mroonga_wrapper_innodb_test_suite_dir}/include/*.inc + sed -i'' \ + -e '1 i --source ../mroonga/include/mroonga/have_mroonga.inc' \ + ${mroonga_wrapper_innodb_test_suite_dir}/t/*.test fi all_test_suite_names="" @@ -138,84 +147,87 @@ suite_dir="${mroonga_test_dir}/.." cd "${suite_dir}" suite_dir="$(pwd)" for test_suite_name in \ - $(find mroonga -type d -name 'include' '!' -prune -o \ - -type d '!' -name 'mroonga' \ - '!' -name 'include' \ - '!' -name '[tr]'); do - if [ -n "${all_test_suite_names}" ]; then - all_test_suite_names="${all_test_suite_names}," - fi - all_test_suite_names="${all_test_suite_names}${test_suite_name}" + $(find mroonga -type d -name 'include' '!' -prune -o \ + -type d '!' -name 'mroonga' \ + '!' -name 'include' \ + '!' -name '[tr]'); do + if [ -n "${all_test_suite_names}" ]; then + all_test_suite_names="${all_test_suite_names}," + fi + all_test_suite_names="${all_test_suite_names}${test_suite_name}" done cd - if [ -n "${plugins_dir}" ]; then - if [ -d "${top_dir}/.libs" ]; then - make -C ${top_dir} \ - install-pluginLTLIBRARIES \ - plugindir=${plugins_dir} > /dev/null || \ - exit 1 - else - mkdir -p "${plugins_dir}" - cp "${top_dir}/ha_mroonga.so" "${plugins_dir}" || exit 1 - fi + if [ -d "${top_dir}/.libs" ]; then + make -C ${top_dir} \ + install-pluginLTLIBRARIES \ + plugindir=${plugins_dir} > /dev/null || \ + exit 1 + else + mkdir -p "${plugins_dir}" + cp "${top_dir}/ha_mroonga.so" "${plugins_dir}" || exit 1 + fi fi +mysql_test_run_options="" test_suite_names="" test_names="" while [ $# -gt 0 ]; do - case "$1" in - --manual-gdb|--debug) - n_processors=1 - break - ;; - --*) - break - ;; + arg="$1" + shift + case "$arg" in + --manual-gdb|--gdb|--client-gdb|--boot-gdb|--debug|--valgrind) + n_processors=1 + mysql_test_run_options="${mysql_test_run_options} ${arg}" + ;; + --*) + mysql_test_run_options="${mysql_test_run_options} ${arg}" + ;; + *) + case "$arg" in + */t/*.test) + test_suite_name=$(echo "$arg" | sed -e 's,/t/.*\.test,,g') + test_suite_name=$(cd "$test_suite_name" && pwd) + test_name=$(echo "$arg" | sed -e 's,.*/t/\(.*\)\.test,\1,g') + ;; *) - case "$1" in - */t/*.test) - test_suite_name=$(echo "$1" | sed -e 's,/t/.*\.test,,g') - test_suite_name=$(cd "$test_suite_name" && pwd) - test_name=$(echo "$1" | sed -e 's,.*/t/\(.*\)\.test,\1,g') - ;; - *) - if [ -d "$1" ]; then - test_suite_name=$(cd "$1" && pwd) - else - test_suite_name="$1" - fi - test_name="" - ;; - esac - shift - - if [ -n "${test_name}" ]; then - if [ -n "${test_names}" ]; then - test_names="${test_names}|" - fi - test_names="${test_names}.*${test_name}" - fi - - test_suite_name=$(echo "$test_suite_name" | sed -e "s,^${suite_dir}/,,") - if echo "${test_suite_names}" | grep --quiet "${test_suite_name}"; then - continue - fi - if [ -n "${test_suite_names}" ]; then - test_suite_names="${test_suite_names}," - fi - test_suite_names="${test_suite_names}${test_suite_name}" - ;; - esac + if [ -d "$arg" ]; then + test_suite_name=$(cd "$arg" && pwd) + else + test_suite_name="$arg" + fi + test_name="" + ;; + esac + + if [ -n "${test_name}" ]; then + if [ -n "${test_names}" ]; then + test_names="${test_names}|" + fi + test_names="${test_names}${test_name}" + fi + + test_suite_name=$(echo "$test_suite_name" | sed -e "s,^${suite_dir}/,,") + if echo "${test_suite_names}" | grep --quiet "${test_suite_name}"; then + continue + fi + if [ -n "${test_suite_names}" ]; then + test_suite_names="${test_suite_names}," + fi + test_suite_names="${test_suite_names}${test_suite_name}" + ;; + esac done if [ -z "$test_suite_names" ]; then - test_suite_names="${all_test_suite_names}" + test_suite_names="${all_test_suite_names}" fi mysql_test_run_args="" -mysql_test_run_args="${mysql_test_run_args} --mem" -mysql_test_run_args="${mysql_test_run_args} --no-check-testcases" +if [ "${percona}" != "yes" ]; then + mysql_test_run_args="${mysql_test_run_args} --mem" +fi mysql_test_run_args="${mysql_test_run_args} --parallel=${n_processors}" mysql_test_run_args="${mysql_test_run_args} --retry=1" mysql_test_run_args="${mysql_test_run_args} --suite=${test_suite_names}" @@ -223,10 +235,10 @@ mysql_test_run_args="${mysql_test_run_args} --force" mysql_test_run_args="${mysql_test_run_args} --mysqld=--loose-plugin-load-add=ha_mroonga.so" mysql_test_run_args="${mysql_test_run_args} --mysqld=--loose-plugin-mroonga=ON" if [ -n "$test_names" ]; then - mysql_test_run_args="${mysql_test_run_args} --do-test=${test_names}" + mysql_test_run_args="${mysql_test_run_args} --do-test=${test_names}" fi (cd "$build_mysql_test_dir" && \ - ./mysql-test-run.pl \ - ${mysql_test_run_args} \ - "$@") + perl -I . ./mysql-test-run.pl \ + ${mysql_test_run_args} \ + ${mysql_test_run_options}) diff --git a/storage/mroonga/test/unit/test_mrn_path_mapper.cpp b/storage/mroonga/test/unit/test_mrn_path_mapper.cpp index a5d0d81c3..54a9f35b0 100644 --- a/storage/mroonga/test/unit/test_mrn_path_mapper.cpp +++ b/storage/mroonga/test/unit/test_mrn_path_mapper.cpp @@ -14,7 +14,7 @@ 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 02111-1301 USA + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include diff --git a/storage/mroonga/tools/prepare-sphinx-html.rb b/storage/mroonga/tools/prepare-sphinx-html.rb index 76eed24a0..71e12f0e3 100755 --- a/storage/mroonga/tools/prepare-sphinx-html.rb +++ b/storage/mroonga/tools/prepare-sphinx-html.rb @@ -48,13 +48,6 @@ def fix_html_link(html, language) end end -def add_language_annotation_to_source_label(html) - html.gsub(/>(ソースコードを表示)#{label}(英語)<" - end -end - def fix_js_link(js, language) fix_link_path(js) end @@ -156,7 +149,6 @@ language_dirs.each do |language_dir| content = fix_link(content, extension, language) if extension == "html" content = insert_facebook_html(content, language) - content = add_language_annotation_to_source_label(content) end dest_path.open("wb") do |dest| dest.print(content.strip) diff --git a/storage/mroonga/tools/travis/before_script.sh b/storage/mroonga/tools/travis/before_script.sh index 2b4591a60..e3e22c876 100755 --- a/storage/mroonga/tools/travis/before_script.sh +++ b/storage/mroonga/tools/travis/before_script.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright(C) 2012-2015 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # 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,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # set -x set -e @@ -40,6 +40,7 @@ if [ "${MROONGA_BUNDLED}" = "yes" ]; then cmake_args=("${cmake_args[@]}" -DWITHOUT_TOKUDB=TRUE) if [ "${MROONGA_TEST_EMBEDDED}" = "yes" ]; then cmake_args=("${cmake_args[@]}" -DWITH_EMBEDDED_SERVER=TRUE) + cmake_args=("${cmake_args[@]}" -DMRN_BUILD_FOR_EMBEDDED_SERVER=TRUE) fi cmake . "${cmake_args[@]}" else @@ -49,9 +50,48 @@ else PATH=$(echo /opt/mysql/server-*/bin/):$PATH fi configure_args=("--with-mysql-source=$PWD/vendor/mysql") - if [ "${MYSQL_VERSION}" = "mysql-5.6.25" ]; then - configure_args=("${configure_args[@]}" --enable-fast-mutexes) - fi + case "${MYSQL_VERSION}" in + mysql-5.6) + configure_args=("${configure_args[@]}" --enable-fast-mutexes) + ;; + mysql-5.7) + boost_archive=boost_1_59_0.tar.gz + curl -L -O http://downloads.sourceforge.net/project/boost/boost/1.59.0/${boost_archive} + sudo mkdir -p /usr/global/share + sudo mv ${boost_archive} /usr/global/share/ + (cd vendor/mysql && sudo debian/rules override_dh_auto_configure) + ;; + mariadb-5.5) + (cd vendor/mysql && sudo debian/rules configure) + configure_args=("${configure_args[@]}" + "--with-mysql-build=$PWD/vendor/mysql/builddir") + ;; + percona-server-5.6) + (cd vendor/mysql && \ + sudo debian/rules configure SKIP_DEBUG_BINARY=yes && \ + cd builddir/libservices && \ + sudo make > /dev/null && \ + cd ../extra && \ + sudo make > /dev/null) + configure_args=("${configure_args[@]}" + "--enable-fast-mutexes" + "--with-mysql-build=$PWD/vendor/mysql/builddir" + "--with-mysql-config=$PWD/vendor/mysql/builddir/scripts/mysql_config") + ;; + percona-server-5.7) + (cd vendor/mysql && \ + sudo debian/rules override_dh_auto_configure SKIP_DEBUG_BINARY=yes && \ + cd builddir/libservices && \ + sudo make > /dev/null && \ + cd ../extra && \ + sudo make > /dev/null) + configure_args=("${configure_args[@]}" + "--with-mysql-build=$PWD/vendor/mysql/builddir" + "--with-mysql-config=$PWD/vendor/mysql/builddir/scripts/mysql_config") + ;; + *) + : + ;; + esac ./configure "${configure_args[@]}" - cat "$(mysql_config --include | sed -e 's/-I//g')/my_config.h" fi diff --git a/storage/mroonga/tools/travis/install.sh b/storage/mroonga/tools/travis/install.sh index c723eb69f..7596c1ccc 100755 --- a/storage/mroonga/tools/travis/install.sh +++ b/storage/mroonga/tools/travis/install.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright(C) 2012-2015 Kouhei Sutou +# Copyright(C) 2012-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -14,21 +14,50 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# set -x +set -x set -e -mariadb_download_base=http://mirror.jmu.edu/pub/mariadb +# export GROONGA_MASTER=yes +# export GROONGA_NORMALIZER_MYSQL_MASTER=yes -export GROONGA_MASTER=yes -export GROONGA_NORMALIZER_MYSQL_MASTER=yes +#mariadb_download_base=http://mirror.jmu.edu/pub/mariadb +mariadb_download_base=http://ftp.osuosl.org/pub/mariadb + +version=$(echo "$MYSQL_VERSION" | sed -r -e 's/^(mysql|mariadb|percona-server)-//') +series=$(echo "$version" | sed -r -e 's/^([0-9]+\.[0-9]+).*$/\1/g') + +setup_mariadb_apt() +{ + distribution=$(lsb_release --short --id | tr 'A-Z' 'a-z') + code_name=$(lsb_release --short --codename) + component=main + apt_url_base="${mariadb_download_base}/repo/${series}" + cat < +# Copyright(C) 2012-2016 Kouhei Sutou # # 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,7 @@ # # 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 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # set -x set -e @@ -43,11 +43,7 @@ fi build() { - if [ "${MROONGA_BUNDLED}" = "yes" ]; then - make -j${n_processors} > /dev/null - else - make -j${n_processors} > /dev/null - fi + make -j${n_processors} > /dev/null } run_unit_test() @@ -62,8 +58,12 @@ prepare_mysql_test_dir() mysql_test_dir=/usr/mysql-test if [ -d /usr/lib/mysql-testsuite/ ]; then sudo cp -a /usr/lib/mysql-testsuite/ ${mysql_test_dir}/ + elif [ -d /usr/lib/mysql-test/ ]; then + sudo cp -a /usr/lib/mysql-test/ ${mysql_test_dir}/ elif [ -d /usr/share/mysql/mysql-test/ ]; then sudo cp -a /usr/share/mysql/mysql-test/ ${mysql_test_dir}/ + elif [ -d /usr/share/mysql-test/ ]; then + sudo cp -a /usr/share/mysql-test/ ${mysql_test_dir}/ elif [ -d /opt/mysql/ ]; then mysql_test_dir=$(echo /opt/mysql/server-*/mysql-test) else @@ -100,6 +100,9 @@ run_sql_test() if [ "${MROONGA_TEST_EMBEDDED}" = "yes" ]; then test_args=("${test_args[@]}" "--embedded-server") fi + if [ "${MROONGA_TEST_PS_PROTOCOL}" = "yes" ]; then + test_args=("${test_args[@]}" "--ps-protocol") + fi if [ "${MROONGA_BUNDLED}" = "yes" ]; then # Plugins aren't supported. @@ -112,16 +115,17 @@ run_sql_test() ${mroonga_dir}/test/run-sql-test.sh \ "${test_args[@]}" \ - --parallel="${n_processors}" + --parallel="${n_processors}" \ + --retry=3 else prepare_sql_test cd ${mysql_test_dir}/ - ./mysql-test-run.pl \ + perl ./mysql-test-run.pl \ "${test_args[@]}" \ --no-check-testcases \ --parallel="${n_processors}" \ - --retry=1 \ + --retry=3 \ --suite="${test_suite_names}" \ --force fi diff --git a/storage/mroonga/udf/mrn_udf_command.cpp b/storage/mroonga/udf/mrn_udf_command.cpp index d14f3ffd4..b4d0f8b20 100644 --- a/storage/mroonga/udf/mrn_udf_command.cpp +++ b/storage/mroonga/udf/mrn_udf_command.cpp @@ -2,7 +2,7 @@ /* Copyright(C) 2010 Tetsuro IKEDA Copyright(C) 2010-2013 Kentoku SHIBA - Copyright(C) 2011-2013 Kouhei Sutou + Copyright(C) 2011-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -25,39 +25,93 @@ #include #include #include +#include #include +#include + +#include MRN_BEGIN_DECLS extern mrn::DatabaseManager *mrn_db_manager; +extern mrn::ContextPool *mrn_context_pool; struct CommandInfo { - grn_ctx ctx; + grn_ctx *ctx; grn_obj *db; bool use_shared_db; + grn_obj command; String result; }; -MRN_API my_bool mroonga_command_init(UDF_INIT *initid, UDF_ARGS *args, +MRN_API my_bool mroonga_command_init(UDF_INIT *init, UDF_ARGS *args, char *message) { CommandInfo *info = NULL; - initid->ptr = NULL; - if (args->arg_count != 1) { - sprintf(message, - "mroonga_command(): Incorrect number of arguments: %u for 1", - args->arg_count); + init->ptr = NULL; + if (args->arg_count == 0) { + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): Wrong number of arguments: %u for 1..", + args->arg_count); goto error; } - if (args->arg_type[0] != STRING_RESULT) { - strcpy(message, - "mroonga_command(): The 1st argument must be command as string"); + + if ((args->arg_count % 2) == 0) { + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): The number of arguments must be odd: %u", + args->arg_count); goto error; } - initid->maybe_null = 1; - initid->const_item = 1; + + for (unsigned int i = 0; i < args->arg_count; ++i) { + switch (args->arg_type[i]) { + case STRING_RESULT: + // OK + break; + case REAL_RESULT: + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): Argument must be string: <%g>", + *reinterpret_cast(args->args[i])); + goto error; + break; + case INT_RESULT: + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): Argument must be string: <%lld>", + *reinterpret_cast(args->args[i])); + goto error; + break; + case DECIMAL_RESULT: + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): Argument must be string: <%.*s>", + static_cast(args->lengths[i]), + args->args[i]); + goto error; + break; + default: + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): Argument must be string: <%d>(%u)", + args->arg_type[i], + i); + goto error; + break; + } + } + init->maybe_null = 1; + init->const_item = 0; info = (CommandInfo *)mrn_my_malloc(sizeof(CommandInfo), MYF(MY_WME | MY_ZEROFILL)); @@ -66,53 +120,100 @@ MRN_API my_bool mroonga_command_init(UDF_INIT *initid, UDF_ARGS *args, goto error; } - grn_ctx_init(&(info->ctx), 0); + info->ctx = mrn_context_pool->pull(); { const char *current_db_path = MRN_THD_DB_PATH(current_thd); const char *action; if (current_db_path) { action = "open database"; - int error = mrn_db_manager->open(current_db_path, &(info->db)); + char encoded_db_path[FN_REFLEN + 1]; + uint encoded_db_path_length = + tablename_to_filename(current_db_path, + encoded_db_path, + sizeof(encoded_db_path)); + encoded_db_path[encoded_db_path_length] = '\0'; + mrn::Database *db; + int error = mrn_db_manager->open(encoded_db_path, &db); if (error == 0) { - grn_ctx_use(&(info->ctx), info->db); + info->db = db->get(); + grn_ctx_use(info->ctx, info->db); info->use_shared_db = true; } } else { action = "create anonymous database"; - info->db = grn_db_create(&(info->ctx), NULL, NULL); + info->db = grn_db_create(info->ctx, NULL, NULL); info->use_shared_db = false; } if (!info->db) { - sprintf(message, - "mroonga_command(): failed to %s: %s", - action, - info->ctx.errbuf); + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): failed to %s: %s", + action, + info->ctx->errbuf); goto error; } } + GRN_TEXT_INIT(&(info->command), 0); - initid->ptr = (char *)info; + init->ptr = (char *)info; return FALSE; error: if (info) { if (!info->use_shared_db) { - grn_obj_close(&(info->ctx), info->db); + grn_obj_close(info->ctx, info->db); } - grn_ctx_fin(&(info->ctx)); + mrn_context_pool->release(info->ctx); my_free(info); } return TRUE; } -MRN_API char *mroonga_command(UDF_INIT *initid, UDF_ARGS *args, char *result, +static void mroonga_command_escape_value(grn_ctx *ctx, + grn_obj *command, + const char *value, + unsigned long value_length) +{ + GRN_TEXT_PUTC(ctx, command, '"'); + + const char *value_current = value; + const char *value_end = value_current + value_length; + while (value_current < value_end) { + int char_length = grn_charlen(ctx, value_current, value_end); + + if (char_length == 0) { + break; + } else if (char_length == 1) { + switch (*value_current) { + case '\\': + case '"': + GRN_TEXT_PUTC(ctx, command, '\\'); + GRN_TEXT_PUTC(ctx, command, *value_current); + break; + case '\n': + GRN_TEXT_PUTS(ctx, command, "\\n"); + break; + default: + GRN_TEXT_PUTC(ctx, command, *value_current); + break; + } + } else { + GRN_TEXT_PUT(ctx, command, value_current, char_length); + } + + value_current += char_length; + } + + GRN_TEXT_PUTC(ctx, command, '"'); +} + +MRN_API char *mroonga_command(UDF_INIT *init, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error) { - CommandInfo *info = (CommandInfo *)initid->ptr; - grn_ctx *ctx = &(info->ctx); - char *command; - unsigned int command_length; + CommandInfo *info = (CommandInfo *)init->ptr; + grn_ctx *ctx = info->ctx; int flags = 0; if (!args->args[0]) { @@ -120,11 +221,31 @@ MRN_API char *mroonga_command(UDF_INIT *initid, UDF_ARGS *args, char *result, return NULL; } + GRN_BULK_REWIND(&(info->command)); + GRN_TEXT_PUT(ctx, &(info->command), args->args[0], args->lengths[0]); + for (unsigned int i = 1; i < args->arg_count; i += 2) { + if (!args->args[i] || !args->args[i + 1]) { + *is_null = 1; + return NULL; + } + + const char *name = args->args[i]; + unsigned long name_length = args->lengths[i]; + GRN_TEXT_PUTS(ctx, &(info->command), " --"); + GRN_TEXT_PUT(ctx, &(info->command), name, name_length); + + const char *value = args->args[i + 1]; + unsigned long value_length = args->lengths[i + 1]; + GRN_TEXT_PUTS(ctx, &(info->command), " "); + mroonga_command_escape_value(ctx, &(info->command), value, value_length); + } + *is_null = 0; - command = args->args[0]; - command_length = args->lengths[0]; - grn_ctx_send(ctx, command, command_length, 0); + grn_ctx_send(ctx, + GRN_TEXT_VALUE(&(info->command)), + GRN_TEXT_LEN(&(info->command)), + 0); if (ctx->rc) { my_message(ER_ERROR_ON_WRITE, ctx->errbuf, MYF(0)); goto error; @@ -156,14 +277,15 @@ MRN_API char *mroonga_command(UDF_INIT *initid, UDF_ARGS *args, char *result, return NULL; } -MRN_API void mroonga_command_deinit(UDF_INIT *initid) +MRN_API void mroonga_command_deinit(UDF_INIT *init) { - CommandInfo *info = (CommandInfo *)initid->ptr; + CommandInfo *info = (CommandInfo *)init->ptr; if (info) { + GRN_OBJ_FIN(info->ctx, &(info->command)); if (!info->use_shared_db) { - grn_obj_close(&(info->ctx), info->db); + grn_obj_close(info->ctx, info->db); } - grn_ctx_fin(&(info->ctx)); + mrn_context_pool->release(info->ctx); MRN_STRING_FREE(info->result); my_free(info); } diff --git a/storage/mroonga/udf/mrn_udf_escape.cpp b/storage/mroonga/udf/mrn_udf_escape.cpp index 89b08a1c6..b97327fb1 100644 --- a/storage/mroonga/udf/mrn_udf_escape.cpp +++ b/storage/mroonga/udf/mrn_udf_escape.cpp @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* - Copyright(C) 2013-2015 Kouhei Sutou + Copyright(C) 2013-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -23,33 +23,56 @@ #include #include #include +#include MRN_BEGIN_DECLS +extern mrn::ContextPool *mrn_context_pool; + struct EscapeInfo { - grn_ctx ctx; + grn_ctx *ctx; + bool script_mode; grn_obj target_characters; - grn_obj escaped_query; - bool processed; + grn_obj escaped_value; }; -MRN_API my_bool mroonga_escape_init(UDF_INIT *initid, UDF_ARGS *args, +MRN_API my_bool mroonga_escape_init(UDF_INIT *init, UDF_ARGS *args, char *message) { EscapeInfo *info = NULL; + bool script_mode = false; - initid->ptr = NULL; + init->ptr = NULL; if (!(1 <= args->arg_count && args->arg_count <= 2)) { - sprintf(message, - "mroonga_escape(): Incorrect number of arguments: %u for 1..2", - args->arg_count); + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_escape(): Incorrect number of arguments: %u for 1..2", + args->arg_count); goto error; } - if (args->arg_type[0] != STRING_RESULT) { - strcpy(message, - "mroonga_escape(): The 1st argument must be query as string"); - goto error; + + if (args->attribute_lengths[0] == strlen("script") && + strncmp(args->attributes[0], "script", strlen("script")) == 0) { + switch (args->arg_type[0]) { + case ROW_RESULT: + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_escape(): " + "The 1st script argument must be " + "string, integer or floating point: "); + goto error; + break; + default: + break; + } + script_mode = true; + } else { + if (args->arg_type[0] != STRING_RESULT) { + strcpy(message, + "mroonga_escape(): The 1st query argument must be string"); + goto error; + } } if (args->arg_count == 2) { if (args->arg_type[1] != STRING_RESULT) { @@ -60,28 +83,27 @@ MRN_API my_bool mroonga_escape_init(UDF_INIT *initid, UDF_ARGS *args, } } - initid->maybe_null = 1; - initid->const_item = 1; + init->maybe_null = 1; - info = (EscapeInfo *)mrn_my_malloc(sizeof(EscapeInfo), - MYF(MY_WME | MY_ZEROFILL)); + info = static_cast(mrn_my_malloc(sizeof(EscapeInfo), + MYF(MY_WME | MY_ZEROFILL))); if (!info) { strcpy(message, "mroonga_escape(): out of memory"); goto error; } - grn_ctx_init(&(info->ctx), 0); + info->ctx = mrn_context_pool->pull(); + info->script_mode = script_mode; GRN_TEXT_INIT(&(info->target_characters), 0); - GRN_TEXT_INIT(&(info->escaped_query), 0); - info->processed = false; + GRN_TEXT_INIT(&(info->escaped_value), 0); - initid->ptr = (char *)info; + init->ptr = reinterpret_cast(info); return FALSE; error: if (info) { - grn_ctx_fin(&(info->ctx)); + mrn_context_pool->release(info->ctx); my_free(info); } return TRUE; @@ -89,32 +111,103 @@ MRN_API my_bool mroonga_escape_init(UDF_INIT *initid, UDF_ARGS *args, static void escape(EscapeInfo *info, UDF_ARGS *args) { - grn_ctx *ctx = &(info->ctx); - char *query = args->args[0]; - unsigned int query_length = args->lengths[0]; - - if (args->arg_count == 2) { - char *target_characters = args->args[1]; - unsigned int target_characters_length = args->lengths[1]; - GRN_TEXT_PUT(ctx, &(info->target_characters), - target_characters, - target_characters_length); - GRN_TEXT_PUTC(ctx, &(info->target_characters), '\0'); - grn_expr_syntax_escape(ctx, query, query_length, - GRN_TEXT_VALUE(&(info->target_characters)), - GRN_QUERY_ESCAPE, - &(info->escaped_query)); + grn_ctx *ctx = info->ctx; + + GRN_BULK_REWIND(&(info->escaped_value)); + if (info->script_mode) { + switch (args->arg_type[0]) { + case STRING_RESULT: + { + char *value = args->args[0]; + unsigned long value_length = args->lengths[0]; + GRN_TEXT_PUTC(ctx, &(info->escaped_value), '"'); + if (args->arg_count == 2) { + grn_obj special_characters; + GRN_TEXT_INIT(&special_characters, 0); + GRN_TEXT_PUT(ctx, + &special_characters, + args->args[1], + args->lengths[1]); + GRN_TEXT_PUTC(ctx, &special_characters, '\0'); + grn_expr_syntax_escape(ctx, + value, + value_length, + GRN_TEXT_VALUE(&special_characters), + '\\', + &(info->escaped_value)); + GRN_OBJ_FIN(ctx, &special_characters); + } else { + const char *special_characters = "\"\\"; + grn_expr_syntax_escape(ctx, + value, + value_length, + special_characters, + '\\', + &(info->escaped_value)); + } + GRN_TEXT_PUTC(ctx, &(info->escaped_value), '"'); + } + break; + case REAL_RESULT: + { + double value = *reinterpret_cast(args->args[0]); + grn_text_ftoa(ctx, &(info->escaped_value), value); + } + break; + case INT_RESULT: + { + longlong value = *reinterpret_cast(args->args[0]); + grn_text_lltoa(ctx, &(info->escaped_value), value); + } + break; + case DECIMAL_RESULT: + { + grn_obj value_raw; + GRN_TEXT_INIT(&value_raw, GRN_OBJ_DO_SHALLOW_COPY); + GRN_TEXT_SET(ctx, &value_raw, args->args[0], args->lengths[0]); + grn_obj value; + GRN_FLOAT_INIT(&value, 0); + if (grn_obj_cast(ctx, &value_raw, &value, GRN_FALSE) == GRN_SUCCESS) { + grn_text_ftoa(ctx, &(info->escaped_value), GRN_FLOAT_VALUE(&value)); + } else { + GRN_TEXT_PUT(ctx, + &(info->escaped_value), + args->args[0], + args->lengths[0]); + } + GRN_OBJ_FIN(ctx, &value); + GRN_OBJ_FIN(ctx, &value_raw); + } + break; + default: + break; + } } else { - grn_expr_syntax_escape_query(ctx, query, query_length, - &(info->escaped_query)); + char *query = args->args[0]; + unsigned long query_length = args->lengths[0]; + if (args->arg_count == 2) { + char *target_characters = args->args[1]; + unsigned long target_characters_length = args->lengths[1]; + GRN_TEXT_PUT(ctx, &(info->target_characters), + target_characters, + target_characters_length); + GRN_TEXT_PUTC(ctx, &(info->target_characters), '\0'); + grn_expr_syntax_escape(ctx, query, query_length, + GRN_TEXT_VALUE(&(info->target_characters)), + GRN_QUERY_ESCAPE, + &(info->escaped_value)); + } else { + grn_expr_syntax_escape_query(ctx, query, query_length, + &(info->escaped_value)); + } } } -MRN_API char *mroonga_escape(UDF_INIT *initid, UDF_ARGS *args, char *result, +MRN_API char *mroonga_escape(UDF_INIT *init, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error) { - EscapeInfo *info = (EscapeInfo *)initid->ptr; - grn_ctx *ctx = &(info->ctx); + EscapeInfo *info = reinterpret_cast(init->ptr); + grn_ctx *ctx = info->ctx; if (!args->args[0]) { *is_null = 1; @@ -123,31 +216,28 @@ MRN_API char *mroonga_escape(UDF_INIT *initid, UDF_ARGS *args, char *result, *is_null = 0; - if (!info->processed) { - escape(info, args); - info->processed = true; - } + escape(info, args); if (ctx->rc) { my_message(ER_ERROR_ON_WRITE, ctx->errbuf, MYF(0)); goto error; } - *length = GRN_TEXT_LEN(&(info->escaped_query)); - return (char *)(GRN_TEXT_VALUE(&(info->escaped_query))); + *length = GRN_TEXT_LEN(&(info->escaped_value)); + return GRN_TEXT_VALUE(&(info->escaped_value)); error: *error = 1; return NULL; } -MRN_API void mroonga_escape_deinit(UDF_INIT *initid) +MRN_API void mroonga_escape_deinit(UDF_INIT *init) { - EscapeInfo *info = (EscapeInfo *)initid->ptr; + EscapeInfo *info = reinterpret_cast(init->ptr); if (info) { - grn_obj_unlink(&(info->ctx), &(info->target_characters)); - grn_obj_unlink(&(info->ctx), &(info->escaped_query)); - grn_ctx_fin(&(info->ctx)); + grn_obj_unlink(info->ctx, &(info->target_characters)); + grn_obj_unlink(info->ctx, &(info->escaped_value)); + mrn_context_pool->release(info->ctx); my_free(info); } } diff --git a/storage/mroonga/udf/mrn_udf_highlight_html.cpp b/storage/mroonga/udf/mrn_udf_highlight_html.cpp new file mode 100644 index 000000000..dc46ef5f2 --- /dev/null +++ b/storage/mroonga/udf/mrn_udf_highlight_html.cpp @@ -0,0 +1,494 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + Copyright(C) 2017 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-1301 USA +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MRN_BEGIN_DECLS + +extern mrn::DatabaseManager *mrn_db_manager; +extern mrn::ContextPool *mrn_context_pool; + +typedef struct st_mrn_highlight_html_info +{ + grn_ctx *ctx; + grn_obj *db; + bool use_shared_db; + grn_obj *keywords; + String result_str; + struct { + bool used; + grn_obj *table; + grn_obj *default_column; + } query_mode; +} mrn_highlight_html_info; + +static my_bool mrn_highlight_html_prepare(mrn_highlight_html_info *info, + UDF_ARGS *args, + char *message, + grn_obj **keywords) +{ + MRN_DBUG_ENTER_FUNCTION(); + + grn_ctx *ctx = info->ctx; + const char *normalizer_name = "NormalizerAuto"; + grn_obj *expr = NULL; + String *result_str = &(info->result_str); + + *keywords = NULL; + + mrn::encoding::set_raw(ctx, system_charset_info); + if (system_charset_info->state & (MY_CS_BINSORT | MY_CS_CSSORT)) { + normalizer_name = NULL; + } + + *keywords = grn_table_create(ctx, NULL, 0, NULL, + GRN_OBJ_TABLE_PAT_KEY, + grn_ctx_at(ctx, GRN_DB_SHORT_TEXT), + NULL); + if (ctx->rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): " + "failed to create grn_pat for keywords: <%s>", + ctx->errbuf); + } + goto error; + } + if (normalizer_name) { + grn_obj_set_info(ctx, + *keywords, + GRN_INFO_NORMALIZER, + grn_ctx_get(ctx, normalizer_name, -1)); + } + + if (info->query_mode.used) { + if (!info->query_mode.table) { + grn_obj *short_text; + short_text = grn_ctx_at(info->ctx, GRN_DB_SHORT_TEXT); + info->query_mode.table = grn_table_create(info->ctx, + NULL, 0, NULL, + GRN_TABLE_HASH_KEY, + short_text, + NULL); + } + if (!info->query_mode.default_column) { + info->query_mode.default_column = + grn_obj_column(info->ctx, + info->query_mode.table, + GRN_COLUMN_NAME_KEY, + GRN_COLUMN_NAME_KEY_LEN); + } + + grn_obj *record = NULL; + GRN_EXPR_CREATE_FOR_QUERY(info->ctx, info->query_mode.table, expr, record); + if (!expr) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): " + "failed to create expression: <%s>", + ctx->errbuf); + } + goto error; + } + + mrn::QueryParser query_parser(info->ctx, + current_thd, + expr, + info->query_mode.default_column, + 0, + NULL); + grn_rc rc = query_parser.parse(args->args[1], args->lengths[1]); + if (rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): " + "failed to parse query: <%s>", + ctx->errbuf); + } + goto error; + } + + { + grn_obj extracted_keywords; + GRN_PTR_INIT(&extracted_keywords, GRN_OBJ_VECTOR, GRN_ID_NIL); + grn_expr_get_keywords(ctx, expr, &extracted_keywords); + + size_t n_keywords = + GRN_BULK_VSIZE(&extracted_keywords) / sizeof(grn_obj *); + for (size_t i = 0; i < n_keywords; ++i) { + grn_obj *extracted_keyword = GRN_PTR_VALUE_AT(&extracted_keywords, i); + grn_table_add(ctx, + *keywords, + GRN_TEXT_VALUE(extracted_keyword), + GRN_TEXT_LEN(extracted_keyword), + NULL); + if (ctx->rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): " + "failed to add a keyword: <%.*s>: <%s>", + static_cast(GRN_TEXT_LEN(extracted_keyword)), + GRN_TEXT_VALUE(extracted_keyword), + ctx->errbuf); + GRN_OBJ_FIN(ctx, &extracted_keywords); + } + goto error; + } + } + GRN_OBJ_FIN(ctx, &extracted_keywords); + } + } else { + for (unsigned int i = 1; i < args->arg_count; ++i) { + if (!args->args[i]) { + continue; + } + grn_table_add(ctx, + *keywords, + args->args[i], + args->lengths[i], + NULL); + if (ctx->rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): " + "failed to add a keyword: <%.*s>: <%s>", + static_cast(args->lengths[i]), + args->args[i], + ctx->errbuf); + } + goto error; + } + } + } + + result_str->set_charset(system_charset_info); + DBUG_RETURN(FALSE); + +error: + if (expr) { + grn_obj_close(ctx, expr); + } + if (*keywords) { + grn_obj_close(ctx, *keywords); + } + DBUG_RETURN(TRUE); +} + +MRN_API my_bool mroonga_highlight_html_init(UDF_INIT *init, + UDF_ARGS *args, + char *message) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn_highlight_html_info *info = NULL; + + init->ptr = NULL; + + if (args->arg_count < 1) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): wrong number of arguments: %u for 1+", + args->arg_count); + goto error; + } + + + for (unsigned int i = 0; i < args->arg_count; ++i) { + switch (args->arg_type[i]) { + case STRING_RESULT: + /* OK */ + break; + case REAL_RESULT: + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): all arguments must be string: " + "<%u>=<%g>", + i, *((double *)(args->args[i]))); + goto error; + break; + case INT_RESULT: + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): all arguments must be string: " + "<%u>=<%lld>", + i, *((longlong *)(args->args[i]))); + goto error; + break; + default: + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): all arguments must be string: <%u>", + i); + goto error; + break; + } + } + + init->maybe_null = 0; + + info = + reinterpret_cast( + mrn_my_malloc(sizeof(mrn_highlight_html_info), + MYF(MY_WME | MY_ZEROFILL))); + if (!info) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): failed to allocate memory"); + goto error; + } + + info->ctx = mrn_context_pool->pull(); + { + const char *current_db_path = MRN_THD_DB_PATH(current_thd); + const char *action; + if (current_db_path) { + action = "open database"; + mrn::Database *db; + int error = mrn_db_manager->open(current_db_path, &db); + if (error == 0) { + info->db = db->get(); + grn_ctx_use(info->ctx, info->db); + info->use_shared_db = true; + } + } else { + action = "create anonymous database"; + info->db = grn_db_create(info->ctx, NULL, NULL); + info->use_shared_db = false; + } + if (!info->db) { + sprintf(message, + "mroonga_highlight_html(): failed to %s: %s", + action, + info->ctx->errbuf); + goto error; + } + } + + info->query_mode.used = FALSE; + + if (args->arg_count == 2 && + args->attribute_lengths[1] == strlen("query") && + strncmp(args->attributes[1], "query", strlen("query")) == 0) { + info->query_mode.used = TRUE; + info->query_mode.table = NULL; + info->query_mode.default_column = NULL; + } + + { + bool all_keywords_are_constant = TRUE; + for (unsigned int i = 1; i < args->arg_count; ++i) { + if (!args->args[i]) { + all_keywords_are_constant = FALSE; + break; + } + } + + if (all_keywords_are_constant) { + if (mrn_highlight_html_prepare(info, args, message, &(info->keywords))) { + goto error; + } + } else { + info->keywords = NULL; + } + } + + init->ptr = (char *)info; + + DBUG_RETURN(FALSE); + +error: + if (info) { + if (!info->use_shared_db) { + grn_obj_close(info->ctx, info->db); + } + mrn_context_pool->release(info->ctx); + my_free(info); + } + DBUG_RETURN(TRUE); +} + +static bool highlight_html(grn_ctx *ctx, + grn_pat *keywords, + const char *target, + size_t target_length, + String *output) +{ + MRN_DBUG_ENTER_FUNCTION(); + + grn_obj buffer; + + GRN_TEXT_INIT(&buffer, 0); + + { + const char *open_tag = ""; + size_t open_tag_length = strlen(open_tag); + const char *close_tag = ""; + size_t close_tag_length = strlen(close_tag); + + while (target_length > 0) { +#define MAX_N_HITS 16 + grn_pat_scan_hit hits[MAX_N_HITS]; + const char *rest; + size_t previous = 0; + size_t chunk_length; + + int n_hits = grn_pat_scan(ctx, + keywords, + target, + target_length, + hits, MAX_N_HITS, &rest); + for (int i = 0; i < n_hits; i++) { + if ((hits[i].offset - previous) > 0) { + grn_text_escape_xml(ctx, + &buffer, + target + previous, + hits[i].offset - previous); + } + GRN_TEXT_PUT(ctx, &buffer, open_tag, open_tag_length); + grn_text_escape_xml(ctx, + &buffer, + target + hits[i].offset, + hits[i].length); + GRN_TEXT_PUT(ctx, &buffer, close_tag, close_tag_length); + previous = hits[i].offset + hits[i].length; + } + + chunk_length = rest - target; + if ((chunk_length - previous) > 0) { + grn_text_escape_xml(ctx, + &buffer, + target + previous, + target_length - previous); + } + target_length -= chunk_length; + target = rest; +#undef MAX_N_HITS + } + } + + if (output->reserve(GRN_TEXT_LEN(&buffer))) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); + GRN_OBJ_FIN(ctx, &buffer); + DBUG_RETURN(false); + } + + output->q_append(GRN_TEXT_VALUE(&buffer), GRN_TEXT_LEN(&buffer)); + GRN_OBJ_FIN(ctx, &buffer); + DBUG_RETURN(true); +} + +MRN_API char *mroonga_highlight_html(UDF_INIT *init, + UDF_ARGS *args, + char *result, + unsigned long *length, + char *is_null, + char *error) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn_highlight_html_info *info = + reinterpret_cast(init->ptr); + + grn_ctx *ctx = info->ctx; + grn_obj *keywords = info->keywords; + String *result_str = &(info->result_str); + + if (!args->args[0]) { + *is_null = 1; + DBUG_RETURN(NULL); + } + + if (!keywords) { + if (mrn_highlight_html_prepare(info, args, NULL, &keywords)) { + goto error; + } + } + + *is_null = 0; + result_str->length(0); + + if (!highlight_html(ctx, + reinterpret_cast(keywords), + args->args[0], + args->lengths[0], + result_str)) { + goto error; + } + + if (!info->keywords) { + grn_rc rc = grn_obj_close(ctx, keywords); + if (rc != GRN_SUCCESS) { + my_printf_error(ER_MRN_ERROR_FROM_GROONGA_NUM, + ER_MRN_ERROR_FROM_GROONGA_STR, MYF(0), ctx->errbuf); + goto error; + } + } + + *length = result_str->length(); + DBUG_RETURN((char *)result_str->ptr()); + +error: + if (!info->keywords && keywords) { + grn_obj_close(ctx, keywords); + } + + *is_null = 1; + *error = 1; + + DBUG_RETURN(NULL); +} + +MRN_API void mroonga_highlight_html_deinit(UDF_INIT *init) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn_highlight_html_info *info = + reinterpret_cast(init->ptr); + if (!info) { + DBUG_VOID_RETURN; + } + + if (info->keywords) { + grn_obj_close(info->ctx, info->keywords); + } + if (info->query_mode.used) { + if (info->query_mode.default_column) { + grn_obj_close(info->ctx, info->query_mode.default_column); + } + if (info->query_mode.table) { + grn_obj_close(info->ctx, info->query_mode.table); + } + } + MRN_STRING_FREE(info->result_str); + if (!info->use_shared_db) { + grn_obj_close(info->ctx, info->db); + } + mrn_context_pool->release(info->ctx); + my_free(info); + + DBUG_VOID_RETURN; +} + +MRN_END_DECLS diff --git a/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp b/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp index b54f5c532..fb4b5440e 100644 --- a/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp +++ b/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp @@ -2,7 +2,7 @@ /* Copyright(C) 2010 Tetsuro IKEDA Copyright(C) 2010-2013 Kentoku SHIBA - Copyright(C) 2011-2013 Kouhei Sutou + Copyright(C) 2011-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -23,20 +23,21 @@ #include #include #include +#include MRN_BEGIN_DECLS -MRN_API my_bool last_insert_grn_id_init(UDF_INIT *initid, UDF_ARGS *args, char *message) +MRN_API my_bool last_insert_grn_id_init(UDF_INIT *init, UDF_ARGS *args, char *message) { if (args->arg_count != 0) { strcpy(message, "last_insert_grn_id must not have arguments"); return 1; } - initid->maybe_null = 0; + init->maybe_null = 0; return 0; } -MRN_API longlong last_insert_grn_id(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) +MRN_API longlong last_insert_grn_id(UDF_INIT *init, UDF_ARGS *args, char *is_null, char *error) { THD *thd = current_thd; st_mrn_slot_data *slot_data = mrn_get_slot_data(thd, false); @@ -47,7 +48,7 @@ MRN_API longlong last_insert_grn_id(UDF_INIT *initid, UDF_ARGS *args, char *is_n return last_insert_record_id; } -MRN_API void last_insert_grn_id_deinit(UDF_INIT *initid) +MRN_API void last_insert_grn_id_deinit(UDF_INIT *init) { } diff --git a/storage/mroonga/udf/mrn_udf_normalize.cpp b/storage/mroonga/udf/mrn_udf_normalize.cpp new file mode 100644 index 000000000..dd597946e --- /dev/null +++ b/storage/mroonga/udf/mrn_udf_normalize.cpp @@ -0,0 +1,212 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + Copyright(C) 2015 Naoya Murakami + Copyright(C) 2017 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-1301 USA +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MRN_BEGIN_DECLS + +extern mrn::DatabaseManager *mrn_db_manager; +extern mrn::ContextPool *mrn_context_pool; + +#define DEFAULT_NORMALIZER_NAME "NormalizerAuto" + +struct st_mrn_normalize_info +{ + grn_ctx *ctx; + grn_obj *db; + bool use_shared_db; + grn_obj *normalizer; + int flags; + String result_str; +}; + +MRN_API my_bool mroonga_normalize_init(UDF_INIT *init, UDF_ARGS *args, + char *message) +{ + st_mrn_normalize_info *info = NULL; + String *result_str = NULL; + + init->ptr = NULL; + if (!(1 <= args->arg_count && args->arg_count <= 2)) { + sprintf(message, + "mroonga_normalize(): Incorrect number of arguments: %u for 1..2", + args->arg_count); + goto error; + } + if (args->arg_type[0] != STRING_RESULT) { + strcpy(message, + "mroonga_normalize(): The 1st argument must be query as string"); + goto error; + } + if (args->arg_count == 2) { + if (args->arg_type[1] != STRING_RESULT) { + strcpy(message, + "mroonga_normalize(): " + "The 2st argument must be normalizer name as string"); + goto error; + } + } + + init->maybe_null = 1; + + info = (st_mrn_normalize_info *)mrn_my_malloc(sizeof(st_mrn_normalize_info), + MYF(MY_WME | MY_ZEROFILL)); + if (!info) { + strcpy(message, "mroonga_normalize(): out of memory"); + goto error; + } + + info->ctx = mrn_context_pool->pull(); + { + const char *current_db_path = MRN_THD_DB_PATH(current_thd); + const char *action; + if (current_db_path) { + action = "open database"; + mrn::Database *db; + int error = mrn_db_manager->open(current_db_path, &db); + if (error == 0) { + info->db = db->get(); + grn_ctx_use(info->ctx, info->db); + info->use_shared_db = true; + } + } else { + action = "create anonymous database"; + info->db = grn_db_create(info->ctx, NULL, NULL); + info->use_shared_db = false; + } + if (!info->db) { + sprintf(message, + "mroonga_normalize(): failed to %s: %s", + action, + info->ctx->errbuf); + goto error; + } + } + + if (args->arg_count == 1) { + info->normalizer = grn_ctx_get(info->ctx, DEFAULT_NORMALIZER_NAME, -1); + } else { + info->normalizer = grn_ctx_get(info->ctx, args->args[1], args->lengths[1]); + } + if (!info->normalizer) { + sprintf(message, "mroonga_normalize(): nonexistent normalizer %.*s", + (int)args->lengths[1], args->args[1]); + goto error; + } + info->flags = 0; + + result_str = &(info->result_str); + mrn::encoding::set_raw(info->ctx, system_charset_info); + result_str->set_charset(system_charset_info); + + init->ptr = (char *)info; + + return FALSE; + +error: + if (info) { + if (!info->use_shared_db) { + grn_obj_close(info->ctx, info->db); + } + mrn_context_pool->release(info->ctx); + my_free(info); + } + return TRUE; +} + +MRN_API char *mroonga_normalize(UDF_INIT *init, UDF_ARGS *args, char *result, + unsigned long *length, char *is_null, char *error) +{ + st_mrn_normalize_info *info = (st_mrn_normalize_info *)init->ptr; + grn_ctx *ctx = info->ctx; + String *result_str = &(info->result_str); + + if (!args->args[0]) { + *is_null = 1; + return NULL; + } + + result_str->length(0); + { + char *target = args->args[0]; + unsigned int target_length = args->lengths[0]; + grn_obj *grn_string; + const char *normalized; + unsigned int normalized_length_in_bytes; + unsigned int normalized_n_characters; + + grn_string = grn_string_open(ctx, + target, target_length, + info->normalizer, info->flags); + grn_string_get_normalized(ctx, grn_string, + &normalized, + &normalized_length_in_bytes, + &normalized_n_characters); + if (result_str->reserve(normalized_length_in_bytes)) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); + goto error; + } + result_str->q_append(normalized, normalized_length_in_bytes); + result_str->length(normalized_length_in_bytes); + grn_obj_unlink(ctx, grn_string); + } + *is_null = 0; + + if (ctx->rc) { + my_message(ER_ERROR_ON_WRITE, ctx->errbuf, MYF(0)); + goto error; + } + + *length = result_str->length(); + return (char *)result_str->ptr(); + +error: + *is_null = 1; + *error = 1; + return NULL; +} + +MRN_API void mroonga_normalize_deinit(UDF_INIT *init) +{ + st_mrn_normalize_info *info = (st_mrn_normalize_info *)init->ptr; + + if (info) { + MRN_STRING_FREE(info->result_str); + if (info->normalizer) { + grn_obj_unlink(info->ctx, info->normalizer); + } + if (!info->use_shared_db) { + grn_obj_close(info->ctx, info->db); + } + mrn_context_pool->release(info->ctx); + my_free(info); + } +} + +MRN_END_DECLS diff --git a/storage/mroonga/udf/mrn_udf_query_expand.cpp b/storage/mroonga/udf/mrn_udf_query_expand.cpp new file mode 100644 index 000000000..562499242 --- /dev/null +++ b/storage/mroonga/udf/mrn_udf_query_expand.cpp @@ -0,0 +1,282 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + Copyright(C) 2017 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-1301 USA +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MRN_BEGIN_DECLS + +extern mrn::DatabaseManager *mrn_db_manager; +extern mrn::ContextPool *mrn_context_pool; + +namespace mrn { + struct QueryExpandInfo { + grn_ctx *ctx; + grn_obj expanded_query; + grn_obj *term_column; + grn_obj *expanded_term_column; + }; +} + +static void mrn_query_expand_info_free(mrn::QueryExpandInfo *info) +{ + MRN_DBUG_ENTER_FUNCTION(); + + if (!info) { + DBUG_VOID_RETURN; + } + + if (info->ctx) { + GRN_OBJ_FIN(info->ctx, &(info->expanded_query)); + if (grn_obj_is_accessor(info->ctx, info->expanded_term_column)) { + grn_obj_unlink(info->ctx, info->expanded_term_column); + } + if (grn_obj_is_accessor(info->ctx, info->term_column)) { + grn_obj_unlink(info->ctx, info->term_column); + } + mrn_context_pool->release(info->ctx); + } + my_free(info); + + DBUG_VOID_RETURN; +} + +MRN_API my_bool mroonga_query_expand_init(UDF_INIT *init, + UDF_ARGS *args, + char *message) +{ + mrn::QueryExpandInfo *info = NULL; + + MRN_DBUG_ENTER_FUNCTION(); + + init->ptr = NULL; + if (args->arg_count != 4) { + sprintf(message, + "mroonga_query_expand(): wrong number of arguments: %u for 4", + args->arg_count); + goto error; + } + if (args->arg_type[0] != STRING_RESULT) { + strcpy(message, + "mroonga_query_expand(): " + "the 1st argument must be table name as string"); + goto error; + } + if (args->arg_type[1] != STRING_RESULT) { + strcpy(message, + "mroonga_query_expand(): " + "the 2nd argument must be term column name as string"); + goto error; + } + if (args->arg_type[2] != STRING_RESULT) { + strcpy(message, + "mroonga_query_expand(): " + "the 3nd argument must be expanded term column name as string"); + goto error; + } + if (args->arg_type[3] != STRING_RESULT) { + strcpy(message, + "mroonga_query_expand(): " + "the 4th argument must be query as string"); + goto error; + } + + init->maybe_null = 1; + + info = static_cast( + mrn_my_malloc(sizeof(mrn::QueryExpandInfo), + MYF(MY_WME | MY_ZEROFILL))); + if (!info) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): failed to allocate memory"); + goto error; + } + + { + const char *current_db_path = MRN_THD_DB_PATH(current_thd); + if (!current_db_path) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): no current database"); + goto error; + } + + mrn::Database *db; + int error = mrn_db_manager->open(current_db_path, &db); + if (error != 0) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): failed to open database: %s", + mrn_db_manager->error_message()); + goto error; + } + info->ctx = mrn_context_pool->pull(); + grn_ctx_use(info->ctx, db->get()); + } + + GRN_TEXT_INIT(&(info->expanded_query), 0); + + { + const char *table_name = args->args[0]; + unsigned int table_name_length = args->lengths[0]; + grn_obj *table = grn_ctx_get(info->ctx, + table_name, + table_name_length); + if (!table) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): table doesn't exist: <%.*s>", + static_cast(table_name_length), + table_name); + goto error; + } + + const char *term_column_name = args->args[1]; + unsigned int term_column_name_length = args->lengths[1]; + info->term_column = grn_obj_column(info->ctx, + table, + term_column_name, + term_column_name_length); + if (!info->term_column) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): term column doesn't exist: <%.*s.%.*s>", + static_cast(table_name_length), + table_name, + static_cast(term_column_name_length), + term_column_name); + goto error; + } + + const char *expanded_term_column_name = args->args[2]; + unsigned int expanded_term_column_name_length = args->lengths[2]; + info->expanded_term_column = grn_obj_column(info->ctx, + table, + expanded_term_column_name, + expanded_term_column_name_length); + if (!info->expanded_term_column) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): " + "expanded term column doesn't exist: <%.*s.%.*s>", + static_cast(table_name_length), + table_name, + static_cast(expanded_term_column_name_length), + expanded_term_column_name); + goto error; + } + } + + init->ptr = reinterpret_cast(info); + + DBUG_RETURN(FALSE); + +error: + mrn_query_expand_info_free(info); + DBUG_RETURN(TRUE); +} + +static void query_expand(mrn::QueryExpandInfo *info, UDF_ARGS *args) +{ + grn_ctx *ctx = info->ctx; + const char *query = args->args[3]; + unsigned int query_length = args->lengths[3]; + + mrn::QueryParser query_parser(info->ctx, + current_thd, + NULL, + NULL, + 0, + NULL); + const char *raw_query; + size_t raw_query_length; + grn_operator default_operator; + grn_expr_flags flags; + query_parser.parse_pragma(query, + query_length, + &raw_query, + &raw_query_length, + &default_operator, + &flags); + GRN_TEXT_SET(info->ctx, + &(info->expanded_query), + query, + raw_query - query); + grn_expr_syntax_expand_query_by_table(ctx, + raw_query, + raw_query_length, + flags, + info->term_column, + info->expanded_term_column, + &(info->expanded_query)); +} + +MRN_API char *mroonga_query_expand(UDF_INIT *init, + UDF_ARGS *args, + char *result, + unsigned long *length, + char *is_null, + char *error) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn::QueryExpandInfo *info = + reinterpret_cast(init->ptr); + grn_ctx *ctx = info->ctx; + + if (!args->args[3]) { + *is_null = 1; + DBUG_RETURN(NULL); + } + + *is_null = 0; + + query_expand(info, args); + + if (ctx->rc) { + char message[MYSQL_ERRMSG_SIZE]; + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): " + "failed to expand: %s", + ctx->errbuf); + my_message(ER_ERROR_ON_WRITE, message, MYF(0)); + goto error; + } + + *length = GRN_TEXT_LEN(&(info->expanded_query)); + DBUG_RETURN(GRN_TEXT_VALUE(&(info->expanded_query))); + +error: + *error = 1; + DBUG_RETURN(NULL); +} + +MRN_API void mroonga_query_expand_deinit(UDF_INIT *init) +{ + MRN_DBUG_ENTER_FUNCTION(); + mrn::QueryExpandInfo *info = + reinterpret_cast(init->ptr); + mrn_query_expand_info_free(info); + DBUG_VOID_RETURN; +} + +MRN_END_DECLS diff --git a/storage/mroonga/udf/mrn_udf_snippet.cpp b/storage/mroonga/udf/mrn_udf_snippet.cpp index 22ec08840..7a3522554 100644 --- a/storage/mroonga/udf/mrn_udf_snippet.cpp +++ b/storage/mroonga/udf/mrn_udf_snippet.cpp @@ -2,7 +2,7 @@ /* Copyright(C) 2010 Tetsuro IKEDA Copyright(C) 2010-2013 Kentoku SHIBA - Copyright(C) 2011-2014 Kouhei Sutou + Copyright(C) 2011-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -26,13 +26,21 @@ #include #include #include +#include +#include #include +#include MRN_BEGIN_DECLS +extern mrn::DatabaseManager *mrn_db_manager; +extern mrn::ContextPool *mrn_context_pool; + struct st_mrn_snip_info { - grn_ctx ctx; + grn_ctx *ctx; + grn_obj *db; + bool use_shared_db; grn_obj *snippet; String result_str; }; @@ -42,7 +50,7 @@ static my_bool mrn_snippet_prepare(st_mrn_snip_info *snip_info, UDF_ARGS *args, { unsigned int i; CHARSET_INFO *cs; - grn_ctx *ctx = &snip_info->ctx; + grn_ctx *ctx = snip_info->ctx; long long snip_max_len; long long snip_max_num; long long skip_leading_spaces; @@ -121,12 +129,12 @@ static my_bool mrn_snippet_prepare(st_mrn_snip_info *snip_info, UDF_ARGS *args, return TRUE; } -MRN_API my_bool mroonga_snippet_init(UDF_INIT *initid, UDF_ARGS *args, char *message) +MRN_API my_bool mroonga_snippet_init(UDF_INIT *init, UDF_ARGS *args, char *message) { uint i; st_mrn_snip_info *snip_info = NULL; bool can_open_snippet = TRUE; - initid->ptr = NULL; + init->ptr = NULL; if (args->arg_count < 11 || (args->arg_count - 11) % 3) { sprintf(message, "Incorrect number of arguments for mroonga_snippet(): %u", @@ -168,8 +176,7 @@ MRN_API my_bool mroonga_snippet_init(UDF_INIT *initid, UDF_ARGS *args, char *mes goto error; } } - initid->maybe_null = 1; - initid->const_item = 1; + init->maybe_null = 1; if (!(snip_info = (st_mrn_snip_info *) mrn_my_malloc(sizeof(st_mrn_snip_info), MYF(MY_WME | MY_ZEROFILL)))) @@ -177,8 +184,32 @@ MRN_API my_bool mroonga_snippet_init(UDF_INIT *initid, UDF_ARGS *args, char *mes strcpy(message, "mroonga_snippet() out of memory"); goto error; } - grn_ctx_init(&snip_info->ctx, 0); - grn_db_create(&snip_info->ctx, NULL, 0); + snip_info->ctx = mrn_context_pool->pull(); + { + const char *current_db_path = MRN_THD_DB_PATH(current_thd); + const char *action; + if (current_db_path) { + action = "open database"; + mrn::Database *db; + int error = mrn_db_manager->open(current_db_path, &db); + if (error == 0) { + snip_info->db = db->get(); + grn_ctx_use(snip_info->ctx, snip_info->db); + snip_info->use_shared_db = true; + } + } else { + action = "create anonymous database"; + snip_info->db = grn_db_create(snip_info->ctx, NULL, NULL); + snip_info->use_shared_db = false; + } + if (!snip_info->db) { + sprintf(message, + "mroonga_snippet(): failed to %s: %s", + action, + snip_info->ctx->errbuf); + goto error; + } + } for (i = 1; i < args->arg_count; i++) { if (!args->args[i]) { @@ -191,24 +222,26 @@ MRN_API my_bool mroonga_snippet_init(UDF_INIT *initid, UDF_ARGS *args, char *mes goto error; } } - initid->ptr = (char *) snip_info; + init->ptr = (char *) snip_info; return FALSE; error: if (snip_info) { - grn_obj_close(&snip_info->ctx, grn_ctx_db(&snip_info->ctx)); - grn_ctx_fin(&snip_info->ctx); + if (!snip_info->use_shared_db) { + grn_obj_close(snip_info->ctx, snip_info->db); + } + mrn_context_pool->release(snip_info->ctx); my_free(snip_info); } return TRUE; } -MRN_API char *mroonga_snippet(UDF_INIT *initid, UDF_ARGS *args, char *result, - unsigned long *length, char *is_null, char *error) +MRN_API char *mroonga_snippet(UDF_INIT *init, UDF_ARGS *args, char *result, + unsigned long *length, char *is_null, char *error) { - st_mrn_snip_info *snip_info = (st_mrn_snip_info *) initid->ptr; - grn_ctx *ctx = &snip_info->ctx; + st_mrn_snip_info *snip_info = (st_mrn_snip_info *) init->ptr; + grn_ctx *ctx = snip_info->ctx; String *result_str = &snip_info->result_str; char *target; unsigned int target_length; @@ -286,16 +319,18 @@ MRN_API char *mroonga_snippet(UDF_INIT *initid, UDF_ARGS *args, char *result, return NULL; } -MRN_API void mroonga_snippet_deinit(UDF_INIT *initid) +MRN_API void mroonga_snippet_deinit(UDF_INIT *init) { - st_mrn_snip_info *snip_info = (st_mrn_snip_info *) initid->ptr; + st_mrn_snip_info *snip_info = (st_mrn_snip_info *) init->ptr; if (snip_info) { if (snip_info->snippet) { - grn_obj_close(&snip_info->ctx, snip_info->snippet); + grn_obj_close(snip_info->ctx, snip_info->snippet); } MRN_STRING_FREE(snip_info->result_str); - grn_obj_close(&snip_info->ctx, grn_ctx_db(&snip_info->ctx)); - grn_ctx_fin(&snip_info->ctx); + if (!snip_info->use_shared_db) { + grn_obj_close(snip_info->ctx, snip_info->db); + } + mrn_context_pool->release(snip_info->ctx); my_free(snip_info); } } diff --git a/storage/mroonga/udf/mrn_udf_snippet_html.cpp b/storage/mroonga/udf/mrn_udf_snippet_html.cpp new file mode 100644 index 000000000..99c9edfbb --- /dev/null +++ b/storage/mroonga/udf/mrn_udf_snippet_html.cpp @@ -0,0 +1,444 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + Copyright(C) 2015-2017 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-1301 USA +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MRN_BEGIN_DECLS + +extern mrn::DatabaseManager *mrn_db_manager; +extern mrn::ContextPool *mrn_context_pool; + +typedef struct st_mrn_snippet_html_info +{ + grn_ctx *ctx; + grn_obj *db; + bool use_shared_db; + grn_obj *snippet; + String result_str; + struct { + bool used; + grn_obj *table; + grn_obj *default_column; + } query_mode; +} mrn_snippet_html_info; + +static my_bool mrn_snippet_html_prepare(mrn_snippet_html_info *info, + UDF_ARGS *args, + char *message, + grn_obj **snippet) +{ + MRN_DBUG_ENTER_FUNCTION(); + + grn_ctx *ctx = info->ctx; + int flags = GRN_SNIP_SKIP_LEADING_SPACES; + unsigned int width = 200; + unsigned int max_n_results = 3; + const char *open_tag = ""; + const char *close_tag = ""; + grn_snip_mapping *mapping = GRN_SNIP_MAPPING_HTML_ESCAPE; + grn_obj *expr = NULL; + String *result_str = &(info->result_str); + + *snippet = NULL; + + mrn::encoding::set_raw(ctx, system_charset_info); + if (!(system_charset_info->state & (MY_CS_BINSORT | MY_CS_CSSORT))) { + flags |= GRN_SNIP_NORMALIZE; + } + + *snippet = grn_snip_open(ctx, flags, + width, max_n_results, + open_tag, strlen(open_tag), + close_tag, strlen(close_tag), + mapping); + if (ctx->rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): failed to open grn_snip: <%s>", + ctx->errbuf); + } + goto error; + } + + if (info->query_mode.used) { + if (!info->query_mode.table) { + grn_obj *short_text; + short_text = grn_ctx_at(info->ctx, GRN_DB_SHORT_TEXT); + info->query_mode.table = grn_table_create(info->ctx, + NULL, 0, NULL, + GRN_TABLE_HASH_KEY, + short_text, + NULL); + } + if (!info->query_mode.default_column) { + info->query_mode.default_column = + grn_obj_column(info->ctx, + info->query_mode.table, + GRN_COLUMN_NAME_KEY, + GRN_COLUMN_NAME_KEY_LEN); + } + + grn_obj *record = NULL; + GRN_EXPR_CREATE_FOR_QUERY(info->ctx, info->query_mode.table, expr, record); + if (!expr) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): " + "failed to create expression: <%s>", + ctx->errbuf); + } + goto error; + } + + mrn::QueryParser query_parser(info->ctx, + current_thd, + expr, + info->query_mode.default_column, + 0, + NULL); + grn_rc rc = query_parser.parse(args->args[1], args->lengths[1]); + if (rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): " + "failed to parse query: <%s>", + ctx->errbuf); + } + goto error; + } + + rc = grn_expr_snip_add_conditions(info->ctx, + expr, + *snippet, + 0, + NULL, NULL, + NULL, NULL); + if (rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): " + "failed to add conditions: <%s>", + ctx->errbuf); + } + goto error; + } + } else { + unsigned int i; + for (i = 1; i < args->arg_count; ++i) { + if (!args->args[i]) { + continue; + } + grn_rc rc = grn_snip_add_cond(ctx, *snippet, + args->args[i], args->lengths[i], + NULL, 0, + NULL, 0); + if (rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): " + "failed to add a condition to grn_snip: <%s>", + ctx->errbuf); + } + goto error; + } + } + } + + result_str->set_charset(system_charset_info); + DBUG_RETURN(FALSE); + +error: + if (expr) { + grn_obj_close(ctx, expr); + } + if (*snippet) { + grn_obj_close(ctx, *snippet); + } + DBUG_RETURN(TRUE); +} + +MRN_API my_bool mroonga_snippet_html_init(UDF_INIT *init, + UDF_ARGS *args, + char *message) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn_snippet_html_info *info = NULL; + + init->ptr = NULL; + + if (args->arg_count < 1) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): wrong number of arguments: %u for 1+", + args->arg_count); + goto error; + } + + + for (unsigned int i = 0; i < args->arg_count; ++i) { + switch (args->arg_type[i]) { + case STRING_RESULT: + /* OK */ + break; + case REAL_RESULT: + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): all arguments must be string: " + "<%u>=<%g>", + i, *((double *)(args->args[i]))); + goto error; + break; + case INT_RESULT: + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): all arguments must be string: " + "<%u>=<%lld>", + i, *((longlong *)(args->args[i]))); + goto error; + break; + default: + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): all arguments must be string: <%u>", + i); + goto error; + break; + } + } + + init->maybe_null = 1; + + info = (mrn_snippet_html_info *)mrn_my_malloc(sizeof(mrn_snippet_html_info), + MYF(MY_WME | MY_ZEROFILL)); + if (!info) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): failed to allocate memory"); + goto error; + } + + info->ctx = mrn_context_pool->pull(); + { + const char *current_db_path = MRN_THD_DB_PATH(current_thd); + const char *action; + if (current_db_path) { + action = "open database"; + mrn::Database *db; + int error = mrn_db_manager->open(current_db_path, &db); + if (error == 0) { + info->db = db->get(); + grn_ctx_use(info->ctx, info->db); + info->use_shared_db = true; + } + } else { + action = "create anonymous database"; + info->db = grn_db_create(info->ctx, NULL, NULL); + info->use_shared_db = false; + } + if (!info->db) { + sprintf(message, + "mroonga_snippet_html(): failed to %s: %s", + action, + info->ctx->errbuf); + goto error; + } + } + + info->query_mode.used = FALSE; + + if (args->arg_count == 2 && + args->attribute_lengths[1] == strlen("query") && + strncmp(args->attributes[1], "query", strlen("query")) == 0) { + info->query_mode.used = TRUE; + info->query_mode.table = NULL; + info->query_mode.default_column = NULL; + } + + { + bool all_keywords_are_constant = TRUE; + for (unsigned int i = 1; i < args->arg_count; ++i) { + if (!args->args[i]) { + all_keywords_are_constant = FALSE; + break; + } + } + + if (all_keywords_are_constant) { + if (mrn_snippet_html_prepare(info, args, message, &(info->snippet))) { + goto error; + } + } else { + info->snippet = NULL; + } + } + + init->ptr = (char *)info; + + DBUG_RETURN(FALSE); + +error: + if (info) { + if (!info->use_shared_db) { + grn_obj_close(info->ctx, info->db); + } + mrn_context_pool->release(info->ctx); + my_free(info); + } + DBUG_RETURN(TRUE); +} + +MRN_API char *mroonga_snippet_html(UDF_INIT *init, + UDF_ARGS *args, + char *result, + unsigned long *length, + char *is_null, + char *error) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn_snippet_html_info *info = + reinterpret_cast(init->ptr); + + grn_ctx *ctx = info->ctx; + grn_obj *snippet = info->snippet; + String *result_str = &(info->result_str); + + if (!args->args[0]) { + *is_null = 1; + DBUG_RETURN(NULL); + } + + if (!snippet) { + if (mrn_snippet_html_prepare(info, args, NULL, &snippet)) { + goto error; + } + } + + { + char *target = args->args[0]; + unsigned int target_length = args->lengths[0]; + + unsigned int n_results, max_tagged_length; + { + grn_rc rc = grn_snip_exec(ctx, snippet, target, target_length, + &n_results, &max_tagged_length); + if (rc != GRN_SUCCESS) { + my_printf_error(ER_MRN_ERROR_FROM_GROONGA_NUM, + ER_MRN_ERROR_FROM_GROONGA_STR, MYF(0), ctx->errbuf); + goto error; + } + } + + *is_null = 0; + result_str->length(0); + + { + const char *start_tag = "
"; + const char *end_tag = "
"; + size_t start_tag_length = strlen(start_tag); + size_t end_tag_length = strlen(end_tag); + unsigned int max_length_per_snippet = + start_tag_length + end_tag_length + max_tagged_length; + if (result_str->reserve(max_length_per_snippet * n_results)) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); + goto error; + } + + for (unsigned int i = 0; i < n_results; ++i) { + result_str->q_append(start_tag, start_tag_length); + + unsigned int result_length; + grn_rc rc = + grn_snip_get_result(ctx, snippet, i, + (char *)result_str->ptr() + result_str->length(), + &result_length); + if (rc) { + my_printf_error(ER_MRN_ERROR_FROM_GROONGA_NUM, + ER_MRN_ERROR_FROM_GROONGA_STR, MYF(0), ctx->errbuf); + goto error; + } + result_str->length(result_str->length() + result_length); + + result_str->q_append(end_tag, end_tag_length); + } + } + + if (!info->snippet) { + grn_rc rc = grn_obj_close(ctx, snippet); + if (rc != GRN_SUCCESS) { + my_printf_error(ER_MRN_ERROR_FROM_GROONGA_NUM, + ER_MRN_ERROR_FROM_GROONGA_STR, MYF(0), ctx->errbuf); + goto error; + } + } + } + + *length = result_str->length(); + DBUG_RETURN((char *)result_str->ptr()); + +error: + if (!info->snippet && snippet) { + grn_obj_close(ctx, snippet); + } + + *is_null = 1; + *error = 1; + + DBUG_RETURN(NULL); +} + +MRN_API void mroonga_snippet_html_deinit(UDF_INIT *init) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn_snippet_html_info *info = + reinterpret_cast(init->ptr); + if (!info) { + DBUG_VOID_RETURN; + } + + if (info->snippet) { + grn_obj_close(info->ctx, info->snippet); + } + if (info->query_mode.used) { + if (info->query_mode.default_column) { + grn_obj_close(info->ctx, info->query_mode.default_column); + } + if (info->query_mode.table) { + grn_obj_close(info->ctx, info->query_mode.table); + } + } + MRN_STRING_FREE(info->result_str); + if (!info->use_shared_db) { + grn_obj_close(info->ctx, info->db); + } + mrn_context_pool->release(info->ctx); + my_free(info); + + DBUG_VOID_RETURN; +} + +MRN_END_DECLS diff --git a/storage/mroonga/udf/sources.am b/storage/mroonga/udf/sources.am index 380ab4b60..ac2f098e3 100644 --- a/storage/mroonga/udf/sources.am +++ b/storage/mroonga/udf/sources.am @@ -1,5 +1,9 @@ libmrn_udf_la_SOURCES = \ mrn_udf_last_insert_grn_id.cpp \ mrn_udf_snippet.cpp \ + mrn_udf_snippet_html.cpp \ mrn_udf_command.cpp \ - mrn_udf_escape.cpp + mrn_udf_escape.cpp \ + mrn_udf_normalize.cpp \ + mrn_udf_highlight_html.cpp \ + mrn_udf_query_expand.cpp diff --git a/storage/mroonga/vendor/groonga/CMakeLists.txt b/storage/mroonga/vendor/groonga/CMakeLists.txt index 2d8a59fa6..e27070f9e 100644 --- a/storage/mroonga/vendor/groonga/CMakeLists.txt +++ b/storage/mroonga/vendor/groonga/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright(C) 2012-2015 Brazil +# Copyright(C) 2012-2016 Brazil # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,6 +18,7 @@ cmake_minimum_required(VERSION 2.6.2) # cmake_minimum_required(VERSION 2.6.4) # CentOS 5 set(GRN_PROJECT_NAME "groonga") +set(GRN_PROJECT_LABEL "Groonga") project("${GRN_PROJECT_NAME}") if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") @@ -39,7 +40,7 @@ if(MSVC) endif() if(CMAKE_C_COMPILER_ID STREQUAL "Clang") - set(CMAKE_COMPILER_IS_CLANGC ON) + set(CMAKE_COMPILER_IS_CLANGCC ON) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(CMAKE_COMPILER_IS_CLANGCXX ON) @@ -59,6 +60,8 @@ else() endif() endif() string(REGEX REPLACE "(^.*=|\n)" "" GRN_VERSION "${GRN_VERSION}") +string(REGEX REPLACE "\\." "," GRN_VERSION_RC "${GRN_VERSION}") +string(REGEX REPLACE "-.*$" "" GRN_VERSION_RC "${GRN_VERSION_RC}") include(CheckIncludeFile) include(CheckFunctionExists) @@ -97,25 +100,25 @@ set(GRN_DEFAULT_ENCODING CACHE STRING "Groonga's default encoding") set(GRN_DEFAULT_MATCH_ESCALATION_THRESHOLD 0 - CACHE STRING "groonga default match escalation threshold") + CACHE STRING "Groonga's default match escalation threshold") set(GRN_DEFAULT_DOCUMENT_ROOT_BASE "html/admin" - CACHE PATH "groonga default document root base path") + CACHE PATH "Groonga's default document root base path") set(GRN_DEFAULT_RELATIVE_DOCUMENT_ROOT "share/${GRN_PROJECT_NAME}/${GRN_DEFAULT_DOCUMENT_ROOT_BASE}" - CACHE PATH "groonga default relative document root") + CACHE PATH "Groonga's default relative document root") set(GRN_DEFAULT_DOCUMENT_ROOT "${CMAKE_INSTALL_PREFIX}/${GRN_DATA_DIR}/${GRN_DEFAULT_DOCUMENT_ROOT_BASE}" - CACHE PATH "groonga default document root") + CACHE PATH "Groonga's default document root") set(GRN_DEFAULT_DB_KEY "auto" CACHE STRING "Groonga's default DB key management algorithm") set(GRN_STACK_SIZE 1024 CACHE STRING - "DANGER!!! groonga stack size. Normarlly, you should not change this variable.") + "DANGER!!! Groonga's stack size. Normarlly, you should not change this variable.") set(GRN_LOCK_TIMEOUT - 10000000 + 900000 CACHE STRING "timeout to acquire a lock.") set(GRN_LOCK_WAIT_TIME_NANOSECOND @@ -129,42 +132,43 @@ set(GRN_PLUGINS_DIR set(GRN_PLUGIN_SUFFIX "${CMAKE_SHARED_MODULE_SUFFIX}") set(GRN_DLL_FILENAME "${CMAKE_SHARED_LIBRARY_PREFIX}groonga${CMAKE_SHARED_LIBRARY_SUFFIX}") -set(GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE "synonyms.tsv") +set(GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE + "${GRN_CONFIG_DIR}/synonyms.tsv") set(GRN_QUERY_EXPANDER_TSV_SYNONYMS_FILE - "${CMAKE_INSTALL_PREFIX}/${GRN_DATA_DIR}/${GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE}") + "${CMAKE_INSTALL_PREFIX}/${GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE}") set(GRN_RELATIVE_RUBY_SCRIPTS_DIR "${LIB_DIR}/${GRN_PROJECT_NAME}/scripts/ruby") set(GRN_RUBY_SCRIPTS_DIR "${CMAKE_INSTALL_PREFIX}/${GRN_RELATIVE_RUBY_SCRIPTS_DIR}") -if(CMAKE_COMPILER_IS_GNUCC) +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) set(GRN_C_COMPILE_FLAGS "${GRN_C_COMPILE_FLAGS} -std=gnu99") endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGCXX) MY_CHECK_AND_SET_COMPILER_FLAG("-Wall") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wextra") MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-but-set-variable") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-parameter") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-sign-compare") MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-pointer-sign") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-missing-field-initializers") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wformat=2") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wformat") MY_CHECK_AND_SET_COMPILER_FLAG("-Wstrict-aliasing=2") MY_CHECK_AND_SET_COMPILER_FLAG("-fno-strict-aliasing") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wdisabled-optimization") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-disabled-optimization") MY_CHECK_AND_SET_COMPILER_FLAG("-Wfloat-equal") MY_CHECK_AND_SET_COMPILER_FLAG("-Wpointer-arith") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wdeclaration-after-statement") MY_CHECK_AND_SET_COMPILER_FLAG("-Wbad-function-cast") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wcast-align") - #MY_CHECK_AND_SET_COMPILER_FLAG("-Wredundant-decls") + if(NOT CMAKE_COMPILER_IS_CLANGCXX) + MY_CHECK_AND_SET_COMPILER_FLAG("-Wcast-align") + endif() + # MY_CHECK_AND_SET_COMPILER_FLAG("-Wredundant-decls") MY_CHECK_AND_SET_COMPILER_FLAG("-Wwrite-strings") MY_CHECK_AND_SET_COMPILER_FLAG("-fexceptions") MY_CHECK_AND_SET_COMPILER_FLAG("-fimplicit-templates") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-clobbered") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-parameter") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-sign-compare") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-missing-field-initializers") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough") endif() if(NOT DEFINED CMAKE_C_COMPILE_OPTIONS_PIC) @@ -303,7 +307,7 @@ else() endif() if(NOT USE_KQUEUE) - ac_check_headers(sys/poll.h) + ac_check_headers(poll.h) if(${HAVE_SYS_POLL_H}) ac_check_funcs(poll) if(${HAVE_POLL}) @@ -338,54 +342,92 @@ if(NOT ${GRN_WITH_ZLIB} STREQUAL "no") endif() endif() +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/bundled_lz4_version" + GRN_BUNDLED_LZ4_VERSION) +string(STRIP + "${GRN_BUNDLED_LZ4_VERSION}" + GRN_BUNDLED_LZ4_VERSION) +option(GRN_WITH_BUNDLED_LZ4 "use bundled LZ4" OFF) + set(GRN_WITH_LZ4 "auto" CACHE STRING "Support data compression by LZ4.") if(NOT ${GRN_WITH_LZ4} STREQUAL "no") - if(NOT DEFINED LIBLZ4_FOUND) - pkg_check_modules(LIBLZ4 liblz4) - endif() - if(LIBLZ4_FOUND) - set(GRN_WITH_LZ4 TRUE) + if(GRN_WITH_BUNDLED_LZ4) + set(LIBLZ4_INCLUDE_DIRS + "${CMAKE_CURRENT_SOURCE_DIR}/vendor/lz4-${GRN_BUNDLED_LZ4_VERSION}/lib") + set(LZ4_LIBS liblz4) else() - if(${GRN_WITH_LZ4} STREQUAL "yes") - message(FATAL_ERROR "No LZ4 found") + if(NOT DEFINED LIBLZ4_FOUND) + pkg_check_modules(LIBLZ4 liblz4) + endif() + if(LIBLZ4_FOUND) + find_library(LZ4_LIBS + NAMES ${LIBLZ4_LIBRARIES} + PATHS ${LIBLZ4_LIBRARY_DIRS} + NO_DEFAULT_PATH) + set(GRN_WITH_LZ4 TRUE) + else() + if(${GRN_WITH_LZ4} STREQUAL "yes") + message(FATAL_ERROR "No LZ4 found") + endif() + set(GRN_WITH_LZ4 FALSE) endif() - set(GRN_WITH_LZ4 FALSE) endif() endif() + +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/bundled_mecab_version" + GRN_BUNDLED_MECAB_VERSION) +string(STRIP + "${GRN_BUNDLED_MECAB_VERSION}" + GRN_BUNDLED_MECAB_VERSION) +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/bundled_mecab_naist_jdic_version" + GRN_BUNDLED_MECAB_NAIST_JDIC_VERSION) +string(STRIP + "${GRN_BUNDLED_MECAB_NAIST_JDIC_VERSION}" + GRN_BUNDLED_MECAB_NAIST_JDIC_VERSION) +option(GRN_WITH_BUNDLED_MECAB "use bundled MeCab" OFF) + set(GRN_WITH_MECAB "auto" CACHE STRING "use MeCab for morphological analysis") if(NOT ${GRN_WITH_MECAB} STREQUAL "no") - set(GRN_MECAB_CONFIG "mecab-config" CACHE FILEPATH "mecab-config path") - if(NOT CMAKE_CROSSCOMPILING) - find_program(GRN_MECAB_CONFIG_ABSOLUTE_PATH "${GRN_MECAB_CONFIG}") - endif() - if(EXISTS "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}") - execute_process(COMMAND "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}" --inc-dir - OUTPUT_VARIABLE MECAB_INCLUDE_DIRS - OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}" --libs-only-L - OUTPUT_VARIABLE MECAB_LIBRARY_DIRS - OUTPUT_STRIP_TRAILING_WHITESPACE) - set(MECAB_LIBRARIES "mecab") - ac_check_lib(${MECAB_LIBRARIES} mecab_new) - if(HAVE_LIBMECAB) - set(GRN_WITH_MECAB TRUE) + if(GRN_WITH_BUNDLED_MECAB) + set(MECAB_INCLUDE_DIRS + "${CMAKE_CURRENT_SOURCE_DIR}/vendor/mecab-${GRN_BUNDLED_MECAB_VERSION}/src") + set(MECAB_LIBRARY_DIRS + "${CMAKE_CURRENT_BUILD_DIR}/vendor/mecab") + set(MECAB_LIBRARIES libmecab) + else() + set(GRN_MECAB_CONFIG "mecab-config" CACHE FILEPATH "mecab-config path") + if(NOT CMAKE_CROSSCOMPILING) + find_program(GRN_MECAB_CONFIG_ABSOLUTE_PATH "${GRN_MECAB_CONFIG}") + endif() + if(EXISTS "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}") + execute_process(COMMAND "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}" --inc-dir + OUTPUT_VARIABLE MECAB_INCLUDE_DIRS + OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}" --libs-only-L + OUTPUT_VARIABLE MECAB_LIBRARY_DIRS + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(MECAB_LIBRARIES "mecab") + ac_check_lib(${MECAB_LIBRARIES} mecab_new) + if(HAVE_LIBMECAB) + set(GRN_WITH_MECAB TRUE) + else() + if(${GRN_WITH_MECAB} STREQUAL "yes") + message(FATAL_ERROR + "No MeCab library found: " + "include directories: <${MECAB_INCLUDE_DIRS}>, " + "library directories: <${MECAB_LIBRARY_DIRS}>") + endif() + set(GRN_WITH_MECAB FALSE) + endif() else() if(${GRN_WITH_MECAB} STREQUAL "yes") - message(FATAL_ERROR - "No MeCab library found: " - "include directories: <${MECAB_INCLUDE_DIRS}>, " - "library directories: <${MECAB_LIBRARY_DIRS}>") + message(FATAL_ERROR "No mecab-config found: <${GRN_MECAB_CONFIG}>") endif() set(GRN_WITH_MECAB FALSE) endif() - else() - if(${GRN_WITH_MECAB} STREQUAL "yes") - message(FATAL_ERROR "No mecab-config found: <${GRN_MECAB_CONFIG}>") - endif() - set(GRN_WITH_MECAB FALSE) endif() else() set(GRN_WITH_MECAB FALSE) @@ -486,41 +528,65 @@ else() set(GRN_WITH_LIBEVENT FALSE) endif() +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/bundled_message_pack_version" + GRN_BUNDLED_MESSAGE_PACK_VERSION) +string(STRIP + "${GRN_BUNDLED_MESSAGE_PACK_VERSION}" + GRN_BUNDLED_MESSAGE_PACK_VERSION) +option(GRN_WITH_BUNDLED_MESSAGE_PACK "use bundled MessagePack" OFF) + set(GRN_WITH_MESSAGE_PACK "auto" CACHE STRING "use MessagePack for suggestion") if(NOT ${GRN_WITH_MESSAGE_PACK} STREQUAL "no") - if(NOT DEFINED MESSAGE_PACK_FOUND) - pkg_check_modules(MESSAGE_PACK msgpack) - endif() - if(MESSAGE_PACK_FOUND) - set(GRN_WITH_MESSAGE_PACK TRUE) + if(GRN_WITH_BUNDLED_MESSAGE_PACK) + set(MESSAGE_PACK_INCLUDE_DIRS + "${CMAKE_CURRENT_SOURCE_DIR}/vendor/msgpack-${GRN_BUNDLED_MESSAGE_PACK_VERSION}/include") + set(MESSAGE_PACK_LIBS msgpackc) else() - if("${GRN_WITH_MESSAGE_PACK}" STREQUAL "yes" OR - "${GRN_WITH_MESSAGE_PACK}" STREQUAL "auto") - set(MESSAGE_PACK_INCLUDE_DIRS "") - set(MESSAGE_PACK_LIBRARY_DIRS "") - else() - set(MESSAGE_PACK_INCLUDE_DIRS "${GRN_WITH_MESSAGE_PACK}/include") - set(MESSAGE_PACK_LIBRARY_DIRS "${GRN_WITH_MESSAGE_PACK}/lib") + if(NOT DEFINED MESSAGE_PACK_FOUND) + pkg_check_modules(MESSAGE_PACK msgpack) endif() - set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES}) - ac_check_lib(msgpack msgpack_version "${MESSAGE_PACK_LIBRARY_DIRS}") - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE}) - if(HAVE_LIBMSGPACK) - set(MESSAGE_PACK_LIBRARIES "msgpack") + if(MESSAGE_PACK_FOUND) + find_library(MESSAGE_PACK_LIBS + NAMES ${MESSAGE_PACK_LIBRARIES} + PATHS ${MESSAGE_PACK_LIBRARY_DIRS} + NO_DEFAULT_PATH) set(GRN_WITH_MESSAGE_PACK TRUE) else() - if(${GRN_WITH_MESSAGE_PACK} STREQUAL "yes") - message(FATAL_ERROR "No MessagePack found") + if("${GRN_WITH_MESSAGE_PACK}" STREQUAL "yes" OR + "${GRN_WITH_MESSAGE_PACK}" STREQUAL "auto") + set(MESSAGE_PACK_INCLUDE_DIRS "") + set(MESSAGE_PACK_LIBRARY_DIRS "") + else() + set(MESSAGE_PACK_INCLUDE_DIRS "${GRN_WITH_MESSAGE_PACK}/include") + set(MESSAGE_PACK_LIBRARY_DIRS "${GRN_WITH_MESSAGE_PACK}/lib") + endif() + set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES}) + ac_check_lib(msgpack msgpack_version "${MESSAGE_PACK_LIBRARY_DIRS}") + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE}) + if(HAVE_LIBMSGPACK) + find_library(MESSAGE_PACK_LIBS + NAMES "msgpack" + PATHS ${MESSAGE_PACK_LIBRARY_DIRS} + NO_DEFAULT_PATH) + set(GRN_WITH_MESSAGE_PACK TRUE) + else() + if(${GRN_WITH_MESSAGE_PACK} STREQUAL "yes") + message(FATAL_ERROR "No MessagePack found") + endif() + set(GRN_WITH_MESSAGE_PACK FALSE) endif() - set(GRN_WITH_MESSAGE_PACK FALSE) endif() endif() else() set(GRN_WITH_MESSAGE_PACK FALSE) endif() -find_program(RUBY NAMES "ruby2.1" "ruby21" "ruby") +find_program(RUBY NAMES + "ruby2.3" "ruby23" + "ruby2.2" "ruby22" + "ruby2.1" "ruby21" + "ruby") option(GRN_WITH_MRUBY "use mruby" OFF) if(GRN_WITH_MRUBY) @@ -531,6 +597,7 @@ else() set(MRUBY_INCLUDE_DIRS "") set(MRUBY_LIBS "") endif() +set(MRUBY_DEFINITIONS "MRB_INT64" "HAVE_ONIGMO_H") # TODO: Support using system Onigmo instead of bundled Onigmo. # set(GRN_WITH_ONIGMO ON) @@ -580,4 +647,9 @@ if(NOT GRN_EMBED) DESTINATION "${LIB_DIR}/pkgconfig/") endif() +install(FILES + "COPYING" + "README.md" + DESTINATION "${GRN_DATA_DIR}") + add_subdirectory(vendor/plugins) diff --git a/storage/mroonga/vendor/groonga/Makefile.am b/storage/mroonga/vendor/groonga/Makefile.am index 6f760a52b..1fc7028ff 100644 --- a/storage/mroonga/vendor/groonga/Makefile.am +++ b/storage/mroonga/vendor/groonga/Makefile.am @@ -2,7 +2,7 @@ LOCALES = ja -ACLOCAL_AMFLAGS = ${ACLOCAL_ARGS} -I . +ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = 1.9.6 SUBDIRS = \ build \ @@ -20,16 +20,23 @@ SUBDIRS = \ doc #dist_data_DATA = EXTRA_DIST = \ + CMakeLists.txt \ README.md \ - bindings \ - version-gen.sh \ base_version \ + bindings \ + bundled_lz4_version \ + bundled_mecab_naist_jdic_version \ + bundled_mecab_version \ + config.h.cmake \ gpg_uid \ - CMakeLists.txt \ - config.h.cmake + nginx_version \ + version-gen.sh pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = groonga.pc +if GRN_WITH_ARROW +pkgconfig_DATA += groonga-arrow.pc +endif .PHONY: FORCE @@ -42,6 +49,7 @@ include $(srcdir)/version.sh dist-hook: echo "$(GRN_VERSION)" > $(distdir)/version + cd $(distdir) && autoreconf --install --force && find . -name autom4te.cache | xargs rm -fr benchmark: cd test/benchmark && $(MAKE) benchmark @@ -74,8 +82,7 @@ update-latest-release: misc doc/source/install.rst \ doc/source/install/*.rst \ doc/locale/*/LC_MESSAGES/install.po \ - $(GROONGA_ORG_PATH)/index.html \ - $(GROONGA_ORG_PATH)/ja/index.html + $(GROONGA_ORG_PATH)/_config.yml update-po: @for lang in $(LOCALES); do \ diff --git a/storage/mroonga/vendor/groonga/README.md b/storage/mroonga/vendor/groonga/README.md index 09e5764a0..af0b5a7db 100644 --- a/storage/mroonga/vendor/groonga/README.md +++ b/storage/mroonga/vendor/groonga/README.md @@ -6,6 +6,19 @@ Groonga is an open-source fulltext search engine and column store. See doc/source/ directory or http://groonga.org/docs/. +Here are shortcut links: + + * How to install: http://groonga.org/docs/install.html + * Tutorial: http://groonga.org/docs/tutorial.html + * How to build as a developer: http://groonga.org/docs/contribution/development/build.html + +## Community + + * [@groonga on Twitter](https://twitter.com/groonga/) + * [Groonga page on Facebook](https://www.facebook.com/groonga) + * [Mailing list on SourceForge.net](http://lists.sourceforge.net/mailman/listinfo/groonga-talk) + * [Chat room on Gitter](https://gitter.im/groonga/public) + ## Bundled software ### mruby diff --git a/storage/mroonga/vendor/groonga/appveyor.yml b/storage/mroonga/vendor/groonga/appveyor.yml index d755e6b49..fca8c229a 100644 --- a/storage/mroonga/vendor/groonga/appveyor.yml +++ b/storage/mroonga/vendor/groonga/appveyor.yml @@ -1,19 +1,72 @@ version: "{build}" clone_depth: 10 -build_script: - - git submodule update --init - - cmake . -G "Visual Studio 12 2013 Win64" - - cmake --build . --config Debug + +environment: + matrix: + - VS_VERSION: 12 + ARCH: x86 + - VS_VERSION: 12 + ARCH: amd64 + - VS_VERSION: 14 + ARCH: x86 + - VS_VERSION: 14 + ARCH: amd64 notifications: - provider: Email to: - - kou@clear-code.com - - groonga-commit@lists.sourceforge.jp + - groonga-commit@lists.osdn.me on_build_status_changed: true -test: off -# before_test: -# - gem install grntest -# test_script: -# - grntest --groonga src\groonga.exe --base-directory test\command test\command\suite +init: + - set PATH=C:\Ruby22\bin;%PATH% + - set PATH=C:\msys64\usr\bin;%PATH% + - call + "C:\Program Files (x86)\Microsoft Visual Studio %VS_VERSION%.0\VC\vcvarsall.bat" + %ARCH% +# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + +install: + - tzutil /s "Tokyo Standard Time" + # - choco install -y imdisk-toolkit + # - mkdir tmp + # - imdisk -a -t file -m tmp -o awe -s 1G -p "/fs:ntfs /q /y" + +build_script: + - git submodule update --init + - cd vendor + - ruby download_mecab.rb + - ruby download_message_pack.rb + - ruby download_lz4.rb + - cd .. + - set CMAKE_GENERATOR_NAME=Visual Studio %VS_VERSION% + - if "%VS_VERSION%" == "12" + set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% 2013 + - if "%VS_VERSION%" == "14" + set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% 2015 + - if "%ARCH%" == "amd64" + set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% Win64 + - cmake . -G "%CMAKE_GENERATOR_NAME%" + -DCMAKE_INSTALL_PREFIX=c:\groonga + -DGRN_WITH_MRUBY=yes + -DGRN_WITH_BUNDLED_MECAB=yes + -DGRN_WITH_BUNDLED_MESSAGE_PACK=yes + -DGRN_WITH_BUNDLED_LZ4=yes + - cmake --build . --config Debug + - cmake --build . --config Debug --target Install + +before_test: + - git clone --depth 1 + https://github.com/groonga/grntest.git + test\command\grntest + - cd test\command\grntest + - bundle install --binstubs=..\bin + - cd ..\..\.. +test_script: + - ruby test\command\bin\grntest + --groonga c:\groonga\bin\groonga.exe + --base-directory test\command + --reporter mark + --n-workers 1 + --timeout 60 + test\command\suite diff --git a/storage/mroonga/vendor/groonga/autogen.sh b/storage/mroonga/vendor/groonga/autogen.sh index 66184bf13..98dcc83a7 100755 --- a/storage/mroonga/vendor/groonga/autogen.sh +++ b/storage/mroonga/vendor/groonga/autogen.sh @@ -6,15 +6,20 @@ case `uname -s` in Darwin) homebrew_aclocal=/usr/local/share/aclocal if [ -d $homebrew_aclocal ]; then - ACLOCAL_ARGS="$ACLOCAL_ARGS -I $homebrew_aclocal" + ACLOCAL_PATH="$ACLOCAL_PATH $homebrew_aclocal" fi - gettext_aclocal="$(echo /usr/local/Cellar/gettext/*/share/aclocal)" - if [ -d $gettext_aclocal ]; then - ACLOCAL_ARGS="$ACLOCAL_ARGS -I $gettext_aclocal" + gettext_prefix=/usr/local/Cellar/gettext + if [ -d $gettext_prefix ]; then + gettext_aclocal=$(ls $gettext_prefix/*/share/aclocal | \ + gsort --version-sort | \ + tail -n 1) + if [ -d $gettext_aclocal ]; then + ACLOCAL_PATH="$ACLOCAL_PATH $gettext_aclocal" + fi fi ;; FreeBSD) - ACLOCAL_ARGS="$ACLOCAL_ARGS -I /usr/local/share/aclocal/" + ACLOCAL_PATH="$ACLOCAL_PATH /usr/local/share/aclocal/" ;; esac @@ -23,4 +28,6 @@ if [ ! -e vendor/mruby-source/.git ]; then fi git submodule update --init -${AUTORECONF:-autoreconf} --force --install +mkdir -p m4 + +${AUTORECONF:-autoreconf} --force --install "$@" diff --git a/storage/mroonga/vendor/groonga/base_version b/storage/mroonga/vendor/groonga/base_version index 25b08bbc7..bf993904a 100644 --- a/storage/mroonga/vendor/groonga/base_version +++ b/storage/mroonga/vendor/groonga/base_version @@ -1 +1 @@ -5.0.5 \ No newline at end of file +7.0.7 \ No newline at end of file diff --git a/storage/mroonga/vendor/groonga/benchmark/Makefile.am b/storage/mroonga/vendor/groonga/benchmark/Makefile.am index 310fb4585..a2a8b29ab 100644 --- a/storage/mroonga/vendor/groonga/benchmark/Makefile.am +++ b/storage/mroonga/vendor/groonga/benchmark/Makefile.am @@ -5,17 +5,23 @@ SUBDIRS = \ NONEXISTENT_CXX_SOURCE = nonexistent.cpp if WITH_BENCHMARK -noinst_PROGRAMS = \ - bench-table-factory \ - bench-geo-distance \ - bench-geo-select \ - bench-ctx-create \ - bench-query-optimizer \ - bench-range-select +noinst_PROGRAMS = \ + bench-table-factory \ + bench-geo-distance \ + bench-geo-select \ + bench-ctx-create \ + bench-query-optimizer \ + bench-range-select \ + bench-result-set \ + bench-between-sequential \ + bench-nfkc \ + bench-cache endif EXTRA_DIST = \ - bench-query-optimizer-ddl.grn + bench-geo-select.sh \ + bench-query-optimizer-ddl.grn \ + geo-select-generate-grn.rb AM_CPPFLAGS = \ -I$(srcdir) \ @@ -50,33 +56,56 @@ nodist_EXTRA_bench_query_optimizer_SOURCES = $(NONEXISTENT_CXX_SOURCE) bench_range_select_SOURCES = bench-range-select.c nodist_EXTRA_bench_range_select_SOURCES = $(NONEXISTENT_CXX_SOURCE) +bench_result_set_SOURCES = bench-result-set.c +nodist_EXTRA_bench_result_set_SOURCES = $(NONEXISTENT_CXX_SOURCE) + +bench_between_sequential_SOURCES = bench-between-sequential.c +nodist_EXTRA_bench_between_sequential_SOURCES = $(NONEXISTENT_CXX_SOURCE) + +bench_nfkc_SOURCES = bench-nfkc.c +nodist_EXTRA_bench_nfkc_SOURCES = $(NONEXISTENT_CXX_SOURCE) + +bench_cache_SOURCES = bench-cache.c +nodist_EXTRA_bench_cache_SOURCES = $(NONEXISTENT_CXX_SOURCE) + benchmarks = \ run-bench-table-factory \ run-bench-geo-distance \ run-bench-geo-select \ run-bench-ctx-create \ run-bench-query-optimizer \ - run-bench-range-select + run-bench-range-select \ + run-bench-result-set \ + run-bench-between-sequential \ + run-bench-nfkc \ + run-bench-cache run-bench-table-factory: bench-table-factory @echo $@: - ./bench-table-factory + env \ + GRN_RUBY_SCRIPTS_DIR="$(top_srcdir)/lib/mrb/scripts" \ + ./bench-table-factory run-bench-geo-distance: bench-geo-distance @echo $@: - ./bench-geo-distance + env \ + GRN_RUBY_SCRIPTS_DIR="$(top_srcdir)/lib/mrb/scripts" \ + ./bench-geo-distance run-bench-geo-select: bench-geo-select @echo $@: - env \ - RUBY="$(RUBY)" \ - GROONGA="$(GROONGA)" \ - srcdir="$(srcdir)" \ + env \ + RUBY="$(RUBY)" \ + GROONGA="$(GROONGA)" \ + GRN_RUBY_SCRIPTS_DIR="$(top_srcdir)/lib/mrb/scripts" \ + srcdir="$(srcdir)" \ $(srcdir)/bench-geo-select.sh run-bench-ctx-create: bench-ctx-create @echo $@: - ./bench-ctx-create + env \ + GRN_RUBY_SCRIPTS_DIR="$(top_srcdir)/lib/mrb/scripts" \ + ./bench-ctx-create run-bench-query-optimizer: bench-query-optimizer @echo $@: @@ -99,4 +128,26 @@ run-bench-range-select: bench-range-select GRN_RUBY_SCRIPTS_DIR=$(top_srcdir)/lib/mrb/scripts \ ./bench-range-select +run-bench-result-set: bench-result-set + @echo $@: + env \ + GRN_RUBY_SCRIPTS_DIR="$(top_srcdir)/lib/mrb/scripts" \ + ./bench-result-set + +run-bench-between-sequential: bench-between-sequential + @echo $@: + @[ ! -e tmp ] && ln -s /dev/shm tmp || : + @mkdir -p tmp/between-sequential + env \ + GRN_RUBY_SCRIPTS_DIR="$(top_srcdir)/lib/mrb/scripts" \ + ./bench-between-sequential + +run-bench-nfkc: bench-nfkc + @echo $@: + ./bench-nfkc + +run-bench-cache: bench-cache + @echo $@: + ./bench-cache + benchmark: $(benchmarks) diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-between-sequential.c b/storage/mroonga/vendor/groonga/benchmark/bench-between-sequential.c new file mode 100644 index 000000000..53bc3af53 --- /dev/null +++ b/storage/mroonga/vendor/groonga/benchmark/bench-between-sequential.c @@ -0,0 +1,276 @@ +/* -*- c-basic-offset: 2; coding: utf-8 -*- */ +/* + Copyright (C) 2016 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 version 2.1 as published by the Free Software Foundation. + + 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-1301 USA +*/ + +/* + Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz + + CFLAGS: -O2 -g + + Groonga: e2971d9a555a90724b76964cc8c8805373500b4a + % make --quiet -C benchmark run-bench-between-sequential + run-bench-between-sequential: + Process 10 times in each pattern + (total) (average) (median) + ( 500, 600] ( 1000): between: (0.0528s) (0.0053s) (0.0043s) + ( 500, 600] ( 1000): range: (0.0120s) (0.0012s) (0.2500ms) + ( 5000, 5100] ( 10000): between: (0.4052s) (0.0405s) (0.0395s) + ( 5000, 5100] ( 10000): range: (0.0197s) (0.0020s) (0.0010s) + ( 50000, 50100] ( 100000): between: (3.9343s) (0.3934s) (0.3900s) + ( 50000, 50100] ( 100000): range: (0.0969s) (0.0097s) (0.0088s) + (500000, 500100] (1000000): between: (38.2969s) (3.8297s) (3.7983s) + (500000, 500100] (1000000): range: (0.9158s) (0.0916s) (0.0900s) + + Groonga: 35e4e431bb7660b3170e98c329f7219bd6723f05 + % make --quiet -C benchmark run-bench-between-sequential + run-bench-between-sequential: + Process 10 times in each pattern + (total) (average) (median) + ( 500, 600] ( 1000): between: (0.0130s) (0.0013s) (0.2590ms) + ( 500, 600] ( 1000): range: (0.0124s) (0.0012s) (0.2530ms) + ( 5000, 5100] ( 10000): between: (0.0163s) (0.0016s) (0.6440ms) + ( 5000, 5100] ( 10000): range: (0.0205s) (0.0021s) (0.0011s) + ( 50000, 50100] ( 100000): between: (0.0611s) (0.0061s) (0.0051s) + ( 50000, 50100] ( 100000): range: (0.1004s) (0.0100s) (0.0091s) + (500000, 500100] (1000000): between: (0.4518s) (0.0452s) (0.0442s) + (500000, 500100] (1000000): range: (0.8866s) (0.0887s) (0.0878s) +*/ + +#include +#include + +#include +#include + +#include "lib/benchmark.h" + +#define GET(context, name) (grn_ctx_get(context, name, strlen(name))) + +typedef struct _BenchmarkData +{ + grn_ctx context; + grn_obj *database; + guint n_records; + const gchar *command; +} BenchmarkData; + +static void +run_command(grn_ctx *context, const gchar *command) +{ + gchar *response; + unsigned int response_length; + int flags; + + grn_ctx_send(context, command, strlen(command), 0); + grn_ctx_recv(context, &response, &response_length, &flags); +} + +static void +bench(gpointer user_data) +{ + BenchmarkData *data = user_data; + grn_ctx *context = &(data->context); + + run_command(context, data->command); +} + +static gchar * +get_tmp_dir(void) +{ + gchar *current_dir; + gchar *tmp_dir; + + current_dir = g_get_current_dir(); + tmp_dir = g_build_filename(current_dir, "tmp", NULL); + g_free(current_dir); + + return tmp_dir; +} + +static void +setup_database(BenchmarkData *data) +{ + grn_ctx *context = &(data->context); + gchar *tmp_dir; + gchar *database_last_component_name; + gchar *database_path; + guint i; + + tmp_dir = get_tmp_dir(); + database_last_component_name = g_strdup_printf("db-%d", data->n_records); + database_path = g_build_filename(tmp_dir, + "between-sequential", + database_last_component_name, + NULL); + g_free(database_last_component_name); + + if (g_file_test(database_path, G_FILE_TEST_EXISTS)) { + data->database = grn_db_open(context, database_path); + run_command(context, "dump"); + } else { + data->database = grn_db_create(context, database_path, NULL); + + run_command(context, "table_create Entries TABLE_NO_KEY"); + run_command(context, "column_create Entries rank COLUMN_SCALAR Int32"); + + run_command(context, "load --table Entries"); + run_command(context, "["); + for (i = 0; i < data->n_records; i++) { +#define BUFFER_SIZE 4096 + gchar buffer[BUFFER_SIZE]; + const gchar *separator; + if (i == (data->n_records - 1)) { + separator = ""; + } else { + separator = ","; + } + snprintf(buffer, BUFFER_SIZE, "{\"rank\": %u}%s", i, separator); + run_command(context, buffer); +#undef BUFFER_SIZE + } + run_command(context, "]"); + } + + g_free(database_path); +} + +static void +bench_startup(BenchmarkData *data) +{ + grn_ctx_init(&(data->context), 0); + setup_database(data); +} + +static void +bench_shutdown(BenchmarkData *data) +{ + grn_ctx *context = &(data->context); + + grn_obj_close(context, data->database); + grn_ctx_fin(context); +} + +int +main(int argc, gchar **argv) +{ + grn_rc rc; + BenchReporter *reporter; + gint n = 10; + + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } + + g_print("Process %d times in each pattern\n", n); + + bench_init(&argc, &argv); + reporter = bench_reporter_new(); + + { + BenchmarkData data_small_between; + BenchmarkData data_small_range; + BenchmarkData data_medium_between; + BenchmarkData data_medium_range; + BenchmarkData data_large_between; + BenchmarkData data_large_range; + BenchmarkData data_very_large_between; + BenchmarkData data_very_large_range; + +#define REGISTER(data, n_records_, min, max, is_between) \ + do { \ + gchar *label; \ + label = \ + g_strdup_printf("(%6d, %6d] (%7d): %7s", \ + min, max, n_records_, \ + is_between ? "between" : "range"); \ + data.n_records = n_records_; \ + if (is_between) { \ + data.command = \ + "select Entries --cache no " \ + "--filter " \ + "'between(rank, " #min ", \"exclude\"," \ + " " #max ", \"include\")'"; \ + } else { \ + data.command = \ + "select Entries --cache no " \ + "--filter 'rank > " #min " && rank <= " #max "'"; \ + } \ + bench_startup(&data); \ + bench_reporter_register(reporter, label, \ + n, \ + NULL, \ + bench, \ + NULL, \ + &data); \ + g_free(label); \ + } while(FALSE) + + REGISTER(data_small_between, + 1000, + 500, 600, + TRUE); + REGISTER(data_small_range, + 1000, + 500, 600, + FALSE); + REGISTER(data_medium_between, + 10000, + 5000, 5100, + TRUE); + REGISTER(data_medium_range, + 10000, + 5000, 5100, + FALSE); + REGISTER(data_large_between, + 100000, + 50000, 50100, + TRUE); + REGISTER(data_large_range, + 100000, + 50000, 50100, + FALSE); + REGISTER(data_very_large_between, + 1000000, + 500000, 500100, + TRUE); + REGISTER(data_very_large_range, + 1000000, + 500000, 500100, + FALSE); + +#undef REGISTER + + bench_reporter_run(reporter); + + bench_shutdown(&data_small_between); + bench_shutdown(&data_small_range); + bench_shutdown(&data_medium_between); + bench_shutdown(&data_medium_range); + bench_shutdown(&data_large_between); + bench_shutdown(&data_large_range); + bench_shutdown(&data_very_large_between); + bench_shutdown(&data_very_large_range); + } + g_object_unref(reporter); + + grn_fin(); + + return EXIT_SUCCESS; +} diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-cache.c b/storage/mroonga/vendor/groonga/benchmark/bench-cache.c new file mode 100644 index 000000000..ee54209c7 --- /dev/null +++ b/storage/mroonga/vendor/groonga/benchmark/bench-cache.c @@ -0,0 +1,155 @@ +/* -*- c-basic-offset: 2; coding: utf-8 -*- */ +/* + Copyright (C) 2017 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 version 2.1 as published by the Free Software Foundation. + + 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-1301 USA +*/ + +/* + Groonga: eb65125330b3a8f920693ef3ad53011c7412f2c9 + CFLAGS: -O2 -g3 + CPU: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz + + % make --silent -C benchmark run-bench-cache + run-bench-cache: + (total) (average) (median) + 1000: (0.0458s) (0.4576ms) (0.4170ms) + 10000: (0.3464s) (0.0035s) (0.0034s) + % GRN_CACHE_TYPE=persistent make --silent -C benchmark run-bench-cache + run-bench-cache: + (total) (average) (median) + 1000: (0.0480s) (0.4801ms) (0.4700ms) + 10000: (0.4033s) (0.0040s) (0.0040s) + */ + +#include +#include +#include + +#include + +#include "lib/benchmark.h" + +typedef struct _BenchmarkData +{ + grn_ctx *context; + grn_cache *cache; + grn_obj value; +} BenchmarkData; + +static void +bench_n(BenchmarkData *data, gint64 n) +{ + gint64 i; + grn_ctx *ctx; + grn_cache *cache; + grn_obj *value; + grn_obj fetch_buffer; + + ctx = data->context; + cache = data->cache; + value = &(data->value); + GRN_TEXT_INIT(&fetch_buffer, 0); + for (i = 0; i < n; i++) { + char key[GRN_TABLE_MAX_KEY_SIZE]; + grn_snprintf(key, + GRN_TABLE_MAX_KEY_SIZE, + GRN_TABLE_MAX_KEY_SIZE, + "key:%" GRN_FMT_INT64D, + i); + GRN_BULK_REWIND(&fetch_buffer); + grn_cache_fetch(ctx, cache, key, strlen(key), &fetch_buffer); + grn_cache_update(ctx, cache, key, strlen(key), value); + } + GRN_OBJ_FIN(ctx, &fetch_buffer); +} + +static void +bench_1000(gpointer user_data) +{ + BenchmarkData *data = user_data; + bench_n(data, 1000); +} + +static void +bench_10000(gpointer user_data) +{ + BenchmarkData *data = user_data; + bench_n(data, 10000); +} + +static void +bench_setup(gpointer user_data) +{ + BenchmarkData *data = user_data; + + data->cache = grn_cache_open(data->context); + GRN_TEXT_INIT(&(data->value), 0); + while (GRN_TEXT_LEN(&(data->value)) < 1024) { + GRN_TEXT_PUTS(data->context, &(data->value), "XXXXXXXXXXX"); + } +} + +static void +bench_teardown(gpointer user_data) +{ + BenchmarkData *data = user_data; + + grn_obj_close(data->context, &(data->value)); + grn_cache_close(data->context, data->cache); +} + +int +main(int argc, gchar **argv) +{ + grn_rc rc; + BenchmarkData data; + BenchReporter *reporter; + gchar *base_dir; + grn_ctx ctx; + gint n = 100; + + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } + bench_init(&argc, &argv); + + grn_ctx_init(&ctx, 0); + + data.context = &ctx; + + base_dir = g_build_filename(g_get_tmp_dir(), "groonga-bench", NULL); + bench_utils_remove_path_recursive_force(base_dir); + g_mkdir_with_parents(base_dir, 0755); + + reporter = bench_reporter_new(); + bench_reporter_register(reporter, "1000", n, + bench_setup, bench_1000, bench_teardown, &data); + bench_reporter_register(reporter, "10000", n, + bench_setup, bench_10000, bench_teardown, &data); + bench_reporter_run(reporter); + g_object_unref(reporter); + + grn_ctx_fin(&ctx); + + bench_utils_remove_path_recursive_force(base_dir); + + bench_quit(); + grn_fin(); + + return EXIT_SUCCESS; +} diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-ctx-create.c b/storage/mroonga/vendor/groonga/benchmark/bench-ctx-create.c index 3e4351907..cd6a99a40 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-ctx-create.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-ctx-create.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2013-2014 Kouhei Sutou + Copyright (C) 2013-2016 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -153,12 +153,18 @@ teardown_database(grn_ctx *context, grn_obj *database) int main(int argc, gchar **argv) { + grn_rc rc; grn_ctx context; BenchmarkData data; BenchReporter *reporter; gint n = 1; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } bench_init(&argc, &argv); grn_ctx_init(&context, 0); @@ -188,5 +194,5 @@ main(int argc, gchar **argv) grn_fin(); - return 0; + return EXIT_SUCCESS; } diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c b/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c index 72d1d79b7..f77cfb1d3 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2009 Kouhei Sutou + Copyright (C) 2009-2016 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -48,6 +48,7 @@ */ #include +#include #include #include @@ -421,11 +422,17 @@ bench_teardown(gpointer user_data) int main(int argc, gchar **argv) { + grn_rc rc; BenchmarkData data; BenchReporter *reporter; gint n = 1000; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } bench_init(&argc, &argv); data.report_result = g_getenv("GROONGA_BENCH_REPORT_RESULT") != NULL; @@ -495,5 +502,5 @@ main(int argc, gchar **argv) bench_quit(); grn_fin(); - return 0; + return EXIT_SUCCESS; } diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-geo-select.c b/storage/mroonga/vendor/groonga/benchmark/bench-geo-select.c index 7b57eaaff..31be2c7ad 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-geo-select.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-geo-select.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2011 Kouhei Sutou + Copyright (C) 2011-2016 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -56,6 +56,7 @@ 2nd: select_in_rectangle (all): (4.61558) */ +#include #include #include @@ -212,11 +213,17 @@ teardown_database(BenchmarkData *data) int main(int argc, gchar **argv) { + grn_rc rc; BenchmarkData data; BenchReporter *reporter; gint n = 100; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } bench_init(&argc, &argv); data.report_result = g_getenv("GROONGA_BENCH_REPORT_RESULT") != NULL; @@ -265,5 +272,5 @@ main(int argc, gchar **argv) bench_quit(); grn_fin(); - return 0; + return EXIT_SUCCESS; } diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-nfkc.c b/storage/mroonga/vendor/groonga/benchmark/bench-nfkc.c new file mode 100644 index 000000000..96b1c9bc6 --- /dev/null +++ b/storage/mroonga/vendor/groonga/benchmark/bench-nfkc.c @@ -0,0 +1,275 @@ +/* -*- c-basic-offset: 2; coding: utf-8 -*- */ +/* + Copyright (C) 2015-2016 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 version 2.1 as published by the Free Software Foundation. + + 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-1301 USA +*/ + +/* + Groonga: ed300a833d44eaefa978b5ecf46a96ef91ae0891 + + CFLAGS: -O2 -g + % make --quiet -C benchmark run-bench-nfkc + run-bench-nfkc: + (total) (average) (median) + map1 - switch : (0.0060ms) (0.00060000ms) (0.00000000ms) + map1 - table : (0.00000000ms) (0.00000000ms) (0.00000000ms) + map2 - switch - no change: (0.0010ms) (0.00010000ms) (0.00000000ms) + map2 - table - no change: (0.00000000ms) (0.00000000ms) (0.00000000ms) + map2 - switch - change: (0.0010ms) (0.00010000ms) (0.00000000ms) + map2 - table - change: (0.0010ms) (0.00010000ms) (0.00000000ms) +*/ + +#include +#include + +#include + +#include + +#include "lib/benchmark.h" + +#include "../lib/nfkc50.c" + +#define MAX_UNICODE 0x110000 +#define BUFFER_SIZE 0x100 + +static inline int +ucs2utf8(unsigned int i, unsigned char *buf) +{ + unsigned char *p = buf; + if (i < 0x80) { + *p++ = i; + } else { + if (i < 0x800) { + *p++ = (i >> 6) | 0xc0; + } else { + if (i < 0x00010000) { + *p++ = (i >> 12) | 0xe0; + } else { + if (i < 0x00200000) { + *p++ = (i >> 18) | 0xf0; + } else { + if (i < 0x04000000) { + *p++ = (i >> 24) | 0xf8; + } else if (i < 0x80000000) { + *p++ = (i >> 30) | 0xfc; + *p++ = ((i >> 24) & 0x3f) | 0x80; + } + *p++ = ((i >> 18) & 0x3f) | 0x80; + } + *p++ = ((i >> 12) & 0x3f) | 0x80; + } + *p++ = ((i >> 6) & 0x3f) | 0x80; + } + *p++ = (0x3f & i) | 0x80; + } + *p = '\0'; + return (p - buf); +} + +static void +bench_char_type(gpointer user_data) +{ + uint64_t code_point; + char utf8[7]; + + for (code_point = 1; code_point < MAX_UNICODE; code_point++) { + ucs2utf8(code_point, (unsigned char *)utf8); + grn_nfkc50_char_type(utf8); + } +} + +static void +bench_decompose(gpointer user_data) +{ + uint64_t code_point; + char utf8[7]; + + for (code_point = 1; code_point < MAX_UNICODE; code_point++) { + ucs2utf8(code_point, (unsigned char *)utf8); + grn_nfkc50_decompose(utf8); + } +} + +static void +bench_compose_no_change(gpointer user_data) +{ + uint64_t prefix_code_point; + uint64_t suffix_code_point = 0x61; /* a */ + char prefix_utf8[7]; + char suffix_utf8[7]; + + ucs2utf8(suffix_code_point, (unsigned char *)suffix_utf8); + for (prefix_code_point = 1; + prefix_code_point < MAX_UNICODE; + prefix_code_point++) { + ucs2utf8(prefix_code_point, (unsigned char *)prefix_utf8); + grn_nfkc50_compose(prefix_utf8, suffix_utf8); + } +} + +static void +bench_compose_change(gpointer user_data) +{ + uint64_t prefix_code_point; + uint64_t suffix_code_point = 0x11ba; + char prefix_utf8[7]; + char suffix_utf8[7]; + + ucs2utf8(suffix_code_point, (unsigned char *)suffix_utf8); + for (prefix_code_point = 1; + prefix_code_point < MAX_UNICODE; + prefix_code_point++) { + ucs2utf8(prefix_code_point, (unsigned char *)prefix_utf8); + grn_nfkc50_compose(prefix_utf8, suffix_utf8); + } +} + +/* +static void +check_char_type(gpointer user_data) +{ + uint64_t code_point; + char utf8[7]; + + for (code_point = 1; code_point < MAX_UNICODE; code_point++) { + grn_char_type a; + grn_char_type b; + + ucs2utf8(code_point, (unsigned char *)utf8); + a = grn_nfkc_char_type(utf8); + b = grn_nfkc50_char_type(utf8); + if (a == b) { + continue; + } + printf("%lx: %s: %d != %d\n", code_point, utf8, a, b); + } +} + +static void +check_decompose(gpointer user_data) +{ + uint64_t code_point; + char utf8[7]; + + for (code_point = 1; code_point < MAX_UNICODE; code_point++) { + const char *a; + const char *b; + + ucs2utf8(code_point, (unsigned char *)utf8); + a = grn_nfkc_decompose(utf8); + b = grn_nfkc50_decompose(utf8); + if (a == b) { + continue; + } + if (!a || !b) { + printf("%lx: %s: %s != %s\n", code_point, utf8, a, b); + continue; + } + if (strcmp(a, b) != 0) { + printf("%lx: %s: %s != %s\n", code_point, utf8, a, b); + } + } +} + +static void +check_compose(gpointer user_data) +{ + uint64_t prefix_code_point; + uint64_t suffix_code_point; + char prefix_utf8[7]; + char suffix_utf8[7]; + + for (prefix_code_point = 1; + prefix_code_point < MAX_UNICODE; + prefix_code_point++) { + ucs2utf8(prefix_code_point, (unsigned char *)prefix_utf8); + for (suffix_code_point = 1; + suffix_code_point < MAX_UNICODE; + suffix_code_point++) { + const char *a; + const char *b; + + ucs2utf8(suffix_code_point, (unsigned char *)suffix_utf8); + a = grn_nfkc_compose(prefix_utf8, suffix_utf8); + b = grn_nfkc50_compose(prefix_utf8, suffix_utf8); + if (a == b) { + continue; + } + if (!a || !b) { + printf("%lx-%lx: %s-%s: %s != %s\n", + prefix_code_point, suffix_code_point, + prefix_utf8, suffix_utf8, + a, b); + continue; + } + if (strcmp(a, b) != 0) { + printf("%lx-%lx: %s-%s: %s != %s\n", + prefix_code_point, suffix_code_point, + prefix_utf8, suffix_utf8, + a, b); + } + } + if ((prefix_code_point % 10000) == 0) { + printf("%" G_GUINT64_FORMAT "\n", prefix_code_point); + } + } +} +*/ + +int +main(int argc, gchar **argv) +{ + grn_rc rc; + BenchReporter *reporter; + gint n = 10; + + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } + bench_init(&argc, &argv); + + reporter = bench_reporter_new(); + + if (g_getenv("N")) { + n = atoi(g_getenv("N")); + } + +#define REGISTER(label, bench_function) \ + bench_reporter_register(reporter, label, n, \ + NULL, \ + bench_function, \ + NULL, \ + NULL) + REGISTER("char_type ", bench_char_type); + REGISTER("decompose ", bench_decompose); + REGISTER("compose - no change", bench_compose_no_change); + REGISTER("compose - change", bench_compose_change); + + /* + REGISTER("check - char_type", check_char_type); + REGISTER("check - decompose", check_decompose); + REGISTER("check - compose ", check_compose); + */ +#undef REGISTER + + bench_reporter_run(reporter); + g_object_unref(reporter); + + return EXIT_SUCCESS; +} diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c b/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c index d7ed91d0c..4ce55c55b 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2014 Kouhei Sutou + Copyright (C) 2014-2016 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -135,12 +135,18 @@ teardown_database(grn_ctx *context, grn_obj *database) int main(int argc, gchar **argv) { + grn_rc rc; grn_ctx context; grn_obj *database; BenchReporter *reporter; gint n = 100; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } bench_init(&argc, &argv); grn_ctx_init(&context, 0); @@ -204,5 +210,5 @@ main(int argc, gchar **argv) grn_fin(); - return 0; + return EXIT_SUCCESS; } diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-range-select.c b/storage/mroonga/vendor/groonga/benchmark/bench-range-select.c index d45d453cb..a0664d582 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-range-select.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-range-select.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2014 Kouhei Sutou + Copyright (C) 2014-2016 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -179,10 +179,16 @@ bench_shutdown(BenchmarkData *data) int main(int argc, gchar **argv) { + grn_rc rc; BenchReporter *reporter; gint n = 10; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } g_print("Process %d times in each pattern\n", n); @@ -270,5 +276,5 @@ main(int argc, gchar **argv) grn_fin(); - return 0; + return EXIT_SUCCESS; } diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-result-set.c b/storage/mroonga/vendor/groonga/benchmark/bench-result-set.c new file mode 100644 index 000000000..cd4866e50 --- /dev/null +++ b/storage/mroonga/vendor/groonga/benchmark/bench-result-set.c @@ -0,0 +1,151 @@ +/* -*- c-basic-offset: 2; coding: utf-8 -*- */ +/* + Copyright (C) 2015-2016 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 version 2.1 as published by the Free Software Foundation. + + 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-1301 USA +*/ + +#include +#include + +#include + +#include "lib/benchmark.h" + +typedef struct _BenchmarkData +{ + gchar *base_dir; + grn_ctx *context; + grn_obj *source_table; + grn_obj *result_set; +} BenchmarkData; + +static void +bench_n(BenchmarkData *data, gint64 n) +{ + gint64 i; + grn_ctx *ctx; + grn_hash *result_set; + + ctx = data->context; + result_set = (grn_hash *)data->result_set; + for (i = 0; i < n; i++) { + grn_id id = i; + grn_hash_add(ctx, result_set, &id, sizeof(grn_id), NULL, NULL); + } +} + +static void +bench_1000(gpointer user_data) +{ + BenchmarkData *data = user_data; + bench_n(data, 1000); +} + +static void +bench_10000(gpointer user_data) +{ + BenchmarkData *data = user_data; + bench_n(data, 10000); +} + +static void +bench_100000(gpointer user_data) +{ + BenchmarkData *data = user_data; + bench_n(data, 100000); +} + +static void +bench_setup(gpointer user_data) +{ + BenchmarkData *data = user_data; + + data->result_set = grn_table_create(data->context, + NULL, 0, NULL, + GRN_TABLE_HASH_KEY | GRN_OBJ_WITH_SUBREC, + data->source_table, + NULL); + +} + +static void +bench_teardown(gpointer user_data) +{ + BenchmarkData *data = user_data; + + grn_obj_close(data->context, data->result_set); +} + +int +main(int argc, gchar **argv) +{ + grn_rc rc; + BenchmarkData data; + BenchReporter *reporter; + gchar *base_dir; + grn_ctx ctx; + gint n = 100; + + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } + bench_init(&argc, &argv); + + data.context = &ctx; + + base_dir = g_build_filename(g_get_tmp_dir(), "groonga-bench", NULL); + bench_utils_remove_path_recursive_force(base_dir); + g_mkdir_with_parents(base_dir, 0755); + + { + gchar *database_path; + const gchar *source_table_name = "Sources"; + + grn_ctx_init(&ctx, 0); + database_path = g_build_filename(base_dir, "db", NULL); + grn_db_create(&ctx, database_path, NULL); + g_free(database_path); + + data.source_table = grn_table_create(&ctx, + source_table_name, + strlen(source_table_name), + NULL, + GRN_TABLE_PAT_KEY | GRN_OBJ_PERSISTENT, + grn_ctx_at(&ctx, GRN_DB_SHORT_TEXT), + NULL); + } + + reporter = bench_reporter_new(); + bench_reporter_register(reporter, "1000", n, + bench_setup, bench_1000, bench_teardown, &data); + bench_reporter_register(reporter, "10000", n, + bench_setup, bench_10000, bench_teardown, &data); + bench_reporter_register(reporter, "100000", n, + bench_setup, bench_100000, bench_teardown, &data); + bench_reporter_run(reporter); + g_object_unref(reporter); + + grn_ctx_fin(&ctx); + + bench_utils_remove_path_recursive_force(data.base_dir); + + bench_quit(); + grn_fin(); + + return EXIT_SUCCESS; +} diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c b/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c index 7e06874df..9e378f553 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2008 Kouhei Sutou + Copyright (C) 2008-2016 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -17,6 +17,7 @@ */ #include +#include #include @@ -226,11 +227,17 @@ bench_teardown(gpointer user_data) int main(int argc, gchar **argv) { + grn_rc rc; BenchmarkData data; BenchReporter *reporter; gint n = 100; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } bench_init(&argc, &argv); data.context = g_new(grn_ctx, 1); @@ -266,5 +273,5 @@ main(int argc, gchar **argv) bench_quit(); grn_fin(); - return 0; + return EXIT_SUCCESS; } diff --git a/storage/mroonga/vendor/groonga/benchmark/lib/Makefile.am b/storage/mroonga/vendor/groonga/benchmark/lib/Makefile.am index 55d113f92..2031b9aad 100644 --- a/storage/mroonga/vendor/groonga/benchmark/lib/Makefile.am +++ b/storage/mroonga/vendor/groonga/benchmark/lib/Makefile.am @@ -9,6 +9,9 @@ AM_CPPFLAGS = \ AM_CFLAGS = \ $(GLIB_CFLAGS) +CFLAGS += \ + $(NO_BAD_FUNCTION_CAST_CFLAGS) + LIBS = \ $(GLIB_LIBS) diff --git a/storage/mroonga/vendor/groonga/build/ac_macros/check_functions.m4 b/storage/mroonga/vendor/groonga/build/ac_macros/check_functions.m4 index 02eb52f30..a0b424b31 100644 --- a/storage/mroonga/vendor/groonga/build/ac_macros/check_functions.m4 +++ b/storage/mroonga/vendor/groonga/build/ac_macros/check_functions.m4 @@ -2,8 +2,6 @@ AC_CHECK_FUNCS(_gmtime64_s) AC_CHECK_FUNCS(_localtime64_s) -AC_CHECK_FUNCS(_stricmp) -AC_CHECK_FUNCS(_strnicmp) AC_CHECK_FUNCS(_strtoui64) AC_CHECK_FUNCS(gmtime_r) AC_CHECK_FUNCS(localtime_r) diff --git a/storage/mroonga/vendor/groonga/build/ac_macros/check_headers.m4 b/storage/mroonga/vendor/groonga/build/ac_macros/check_headers.m4 index 9a30ca8fc..fca846512 100644 --- a/storage/mroonga/vendor/groonga/build/ac_macros/check_headers.m4 +++ b/storage/mroonga/vendor/groonga/build/ac_macros/check_headers.m4 @@ -7,10 +7,6 @@ AC_CHECK_HEADERS(execinfo.h) AC_CHECK_HEADERS(inttypes.h) AC_CHECK_HEADERS(netdb.h) AC_CHECK_HEADERS(signal.h) -AC_CHECK_HEADERS(stdarg.h) -AC_CHECK_HEADERS(stdint.h) -AC_CHECK_HEADERS(string.h) -AC_CHECK_HEADERS(strings.h) AC_CHECK_HEADERS(sys/mman.h) AC_CHECK_HEADERS(sys/param.h) AC_CHECK_HEADERS(sys/resource.h) diff --git a/storage/mroonga/vendor/groonga/build/makefiles/gettext.am b/storage/mroonga/vendor/groonga/build/makefiles/gettext.am index 9cea8ce63..c6e57c7b4 100644 --- a/storage/mroonga/vendor/groonga/build/makefiles/gettext.am +++ b/storage/mroonga/vendor/groonga/build/makefiles/gettext.am @@ -59,8 +59,6 @@ build: endif html: build -man: build -pdf: build gettext: rm *.pot || true diff --git a/storage/mroonga/vendor/groonga/build/makefiles/sphinx-build.am b/storage/mroonga/vendor/groonga/build/makefiles/sphinx-build.am index e237377ba..047823b6e 100644 --- a/storage/mroonga/vendor/groonga/build/makefiles/sphinx-build.am +++ b/storage/mroonga/vendor/groonga/build/makefiles/sphinx-build.am @@ -2,18 +2,13 @@ DOCTREES_BASE = doctrees SPHINXOPTS = -PAPER = # Internal variables. SOURCE_DIR = $(abs_top_srcdir)/doc/source -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = $(PAPEROPT_$(PAPER)) -E $(SPHINXOPTS) $(SOURCE_DIR) +ALLSPHINXOPTS = -E $(SPHINXOPTS) $(SOURCE_DIR) -SPHINX_DIR = $(abs_top_builddir)/doc/sphinx -SPHINX_BUILD_COMMAND = \ - DOCUMENT_VERSION="$(DOCUMENT_VERSION)" \ +SPHINX_BUILD_COMMAND = \ + DOCUMENT_VERSION="$(DOCUMENT_VERSION)" \ DOCUMENT_VERSION_FULL="$(DOCUMENT_VERSION_FULL)" \ - LOCALE="$(LOCALE)" \ - PYTHONPATH="$(SPHINX_DIR):$$PYTHONPATH" \ + LOCALE="$(LOCALE)" \ $(SPHINX_BUILD) diff --git a/storage/mroonga/vendor/groonga/build/makefiles/sphinx.am b/storage/mroonga/vendor/groonga/build/makefiles/sphinx.am index c68f62e26..161abe067 100644 --- a/storage/mroonga/vendor/groonga/build/makefiles/sphinx.am +++ b/storage/mroonga/vendor/groonga/build/makefiles/sphinx.am @@ -3,7 +3,6 @@ include $(top_srcdir)/build/makefiles/sphinx-build.am $(html_files): html-build-stamp $(html_files_relative_from_locale_dir): html-build-stamp -$(man_files): man-build-stamp am__nobase_dist_doc_locale_DATA_DIST = if DOCUMENT_AVAILABLE @@ -22,41 +21,16 @@ document_source_files = \ required_build_stamps = \ html-build-stamp \ - man-build-stamp \ mo-build-stamp if DOCUMENT_BUILDABLE EXTRA_DIST += $(required_build_stamps) endif -man_files = \ - man/$(PACKAGE_NAME).1 - generated_files = \ $(DOCTREES_BASE) \ - man \ - man-build-stamp \ html \ - html-build-stamp \ - pdf \ - pdf-build-stamp \ - dirhtml \ - dirhtml-build-stamp \ - pickle \ - pikcle-build-stamp \ - json \ - json-build-stamp \ - htmlhelp \ - htmlhelp-build-stamp \ - qthelp \ - qthelp-build-stamp \ - latex \ - latex-build-stamp \ - changes \ - changes-build-stamp \ - linkcheck \ - linkcheck-build-stamp \ - doctest + html-build-stamp $(mo_files_relative_from_locale_dir): mo-build-stamp @@ -75,83 +49,24 @@ maintainer-clean-local: endif .PHONY: help -.PHONY: man clean-man .PHONY: html clean-html -.PHONY: pdf -.PHONY: dirhtml -.PHONY: pickle -.PHONY: json -.PHONY: htmlhelp -.PHONY: qthelp -.PHONY: latex -.PHONY: changes -.PHONY: linkcheck -.PHONY: doctest if DOCUMENT_BUILDABLE help: @echo "Please use \`make ' where is one of" - @echo " man to make man files" @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " rdoc to make RDoc files" - @echo " textile to make Textile files" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -man: man-build-stamp + html: html-recursive html-build-stamp -dirhtml: dirhtml-build-stamp -pickle: pickle-build-stamp -json: json-build-stamp -htmlhelp: htmlhelp-build-stamp -qthelp: qthelp-build-stamp -latex: latex-build-stamp -rdoc: rdoc-build-stamp -textile: textile-build-stamp -changes: changes-build-stamp -linkcheck: linkcheck-build-stamp -doctest: doctest-build-stamp clean_targets = \ - clean-man \ - clean-html \ - clean-dirhtml \ - clean-pickle \ - clean-json \ - clean-htmlhelp \ - clean-qthelp \ - clean-latex \ - clean-rdoc \ - clean-textile \ - clean-changes \ - clean-linkcheck \ - clean-doctest + clean-html $(clean_targets): target=`echo $@ | sed -e 's/^clean-//'`; \ rm -rf $${target}-build-stamp $${target} build_stamps = \ - man-build-stamp \ - html-build-stamp \ - dirhtml-build-stamp \ - pickle-build-stamp \ - json-build-stamp \ - htmlhelp-build-stamp \ - qthelp-build-stamp \ - latex-build-stamp \ - rdoc-build-stamp \ - textile-build-stamp \ - changes-build-stamp \ - linkcheck-build-stamp \ - doctest-build-stamp + html-build-stamp $(build_stamps): $(document_source_files) target=`echo $@ | sed -e 's/-build-stamp$$//'`; \ @@ -162,18 +77,4 @@ $(build_stamps): $(document_source_files) $(ALLSPHINXOPTS) \ $${target} @touch $@ - -qthelp: qthelp-message -qthelp-message: qthelp-build-stamp - @echo "Build finished; now you can run 'qcollectiongenerator' with the" \ - ".qhcp project file in qthelp/*, like this:" - @echo "# qcollectiongenerator qthelp/groonga.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile qthelp/groonga.qhc" - -latex: latex-message -latex-message: latex-build-stamp - @echo "Build finished; the LaTeX files are in latex/*." - @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ - "run these through (pdf)latex." endif diff --git a/storage/mroonga/vendor/groonga/bundled_lz4_version b/storage/mroonga/vendor/groonga/bundled_lz4_version new file mode 100644 index 000000000..6a126f402 --- /dev/null +++ b/storage/mroonga/vendor/groonga/bundled_lz4_version @@ -0,0 +1 @@ +1.7.5 diff --git a/storage/mroonga/vendor/groonga/bundled_mecab_naist_jdic_version b/storage/mroonga/vendor/groonga/bundled_mecab_naist_jdic_version new file mode 100644 index 000000000..495c21efd --- /dev/null +++ b/storage/mroonga/vendor/groonga/bundled_mecab_naist_jdic_version @@ -0,0 +1 @@ +0.6.3b-20111013 diff --git a/storage/mroonga/vendor/groonga/bundled_mecab_version b/storage/mroonga/vendor/groonga/bundled_mecab_version new file mode 100644 index 000000000..00445f812 --- /dev/null +++ b/storage/mroonga/vendor/groonga/bundled_mecab_version @@ -0,0 +1 @@ +0.996 diff --git a/storage/mroonga/vendor/groonga/bundled_message_pack_version b/storage/mroonga/vendor/groonga/bundled_message_pack_version new file mode 100644 index 000000000..3e3c2f1e5 --- /dev/null +++ b/storage/mroonga/vendor/groonga/bundled_message_pack_version @@ -0,0 +1 @@ +2.1.1 diff --git a/storage/mroonga/vendor/groonga/config.h.cmake b/storage/mroonga/vendor/groonga/config.h.cmake index 8e3bdaf21..bfd0cbdc0 100644 --- a/storage/mroonga/vendor/groonga/config.h.cmake +++ b/storage/mroonga/vendor/groonga/config.h.cmake @@ -3,12 +3,13 @@ /* general constants */ #define CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS}" -#define HOST_CPU "${CMAKE_HOST_SYSTEM_PROCESSOR}" -#define HOST_OS "${CMAKE_HOST_SYSTEM_NAME}" +#define HOST_CPU "${CMAKE_SYSTEM_PROCESSOR}" +#define HOST_OS "${CMAKE_SYSTEM_NAME}" #define VERSION "${VERSION}" #define PACKAGE "${PROJECT_NAME}" #define PACKAGE_NAME "${PROJECT_NAME}" +#define PACKAGE_LABEL "${GRN_PROJECT_LABEL}" #define PACKAGE_STRING "${PROJECT_NAME} ${VERSION}" #define PACKAGE_TARNAME "${PROJECT_NAME}" #define PACKAGE_URL "${PACKAGE_URL}" @@ -84,6 +85,7 @@ #cmakedefine GRN_WITH_CUTTER #cmakedefine GRN_WITH_KYTEA #cmakedefine GRN_WITH_LZ4 +#cmakedefine GRN_WITH_ZSTD #cmakedefine GRN_WITH_MECAB #cmakedefine GRN_WITH_MESSAGE_PACK #cmakedefine GRN_WITH_MRUBY @@ -103,10 +105,6 @@ #cmakedefine HAVE_NETDB_H #cmakedefine HAVE_PTHREAD_H #cmakedefine HAVE_SIGNAL_H -#cmakedefine HAVE_STDARG_H -#cmakedefine HAVE_STDINT_H -#cmakedefine HAVE_STRINGS_H -#cmakedefine HAVE_STRING_H #cmakedefine HAVE_SYS_MMAN_H #cmakedefine HAVE_SYS_PARAM_H #cmakedefine HAVE_SYS_RESOURCE_H @@ -133,8 +131,6 @@ /* functions */ #cmakedefine HAVE__GMTIME64_S #cmakedefine HAVE__LOCALTIME64_S -#cmakedefine HAVE__STRICMP -#cmakedefine HAVE__STRNICMP #cmakedefine HAVE__STRTOUI64 #cmakedefine HAVE_BACKTRACE #cmakedefine HAVE_CLOCK diff --git a/storage/mroonga/vendor/groonga/configure.ac b/storage/mroonga/vendor/groonga/configure.ac index dad29c78f..414876c6a 100644 --- a/storage/mroonga/vendor/groonga/configure.ac +++ b/storage/mroonga/vendor/groonga/configure.ac @@ -1,13 +1,18 @@ AC_PREREQ(2.59) m4_define([groonga_version], m4_include(base_version)) AC_INIT([groonga], groonga_version, [groonga@razil.jp]) +AC_CONFIG_MACRO_DIR([m4]) AM_CONFIG_HEADER(config.h) +GRN_VERSION_RC=`echo groonga_version | sed -e 's/\./,/g'` +AC_SUBST(GRN_VERSION_RC) + AM_INIT_AUTOMAKE([foreign tar-pax subdir-objects]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -PACKAGE_TITLE=Groonga -AC_SUBST(PACKAGE_TITLE) +PACKAGE_LABEL=Groonga +AC_SUBST(PACKAGE_LABEL) +AC_DEFINE_UNQUOTED(PACKAGE_LABEL, ["$PACKAGE_LABEL"], [Label of package]) # for Autoconf 2.60 or earlier. if test -z "${datarootdir}"; then @@ -74,6 +79,8 @@ AC_MSG_RESULT([$solaris]) AC_C_BIGENDIAN AC_PROG_CXX +m4_ifdef([AX_CXX_COMPILE_STDCXX_11], + [AX_CXX_COMPILE_STDCXX_11([ext], [optional])]) AC_PROG_CC m4_ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99]) @@ -142,19 +149,17 @@ TEST_CFLAGS="" TEST_CXXFLAGS="" NO_STRICT_ALIASING_CFLAGS="" NO_FLOAT_EQUAL_CFLAGS="" +NO_BAD_FUNCTION_CAST_CFLAGS="" if test "$GCC" = "yes"; then CHECK_BUILD_FLAG([-Wall]) - CHECK_BUILD_FLAG([-Wextra]) if test "x$check_cflag" = "xno"; then CHECK_BUILD_FLAG([-W]) fi CHECK_BUILD_FLAG([-Wno-unused-but-set-variable]) # FIXME: enable it. - CHECK_BUILD_FLAG([-Wno-unused-parameter]) - CHECK_BUILD_FLAG([-Wno-sign-compare]) CHECK_CFLAG([-Wno-pointer-sign]) - CHECK_BUILD_FLAG([-Wno-missing-field-initializers]) + CHECK_CFLAG([-Wno-declaration-after-statement]) - CHECK_BUILD_FLAG([-Wformat=2]) + CHECK_BUILD_FLAG([-Wformat]) CHECK_BUILD_FLAG([-Wstrict-aliasing=2]) if test "x$check_cflag" = "xyes"; then NO_STRICT_ALIASING_CFLAGS="-fno-strict-aliasing" @@ -166,6 +171,9 @@ if test "$GCC" = "yes"; then fi CHECK_BUILD_FLAG([-Wpointer-arith]) CHECK_CFLAG([-Wbad-function-cast]) + if test "x$check_cflag" = "xyes"; then + NO_BAD_FUNCTION_CAST_CFLAGS="-Wno-bad-function-cast" + fi if test "$CLANG" = "no"; then CHECK_BUILD_FLAG([-Wcast-align]) fi @@ -180,27 +188,16 @@ if test "$GCC" = "yes"; then CHECK_CXXFLAG([-fexceptions]) CHECK_CXXFLAG([-fimplicit-templates]) - - CFLAGS_for_source="$CFLAGS" - CXXFLAGS_for_source="$CXXFLAGS" - CHECK_BUILD_FLAG([-Wno-clobbered]) - if test "x$check_cflag" = "xyes"; then - TEST_CFLAGS="-Wno-clobbered" - fi - if test "x$check_cxxflag" = "xyes"; then - TEST_CXXFLAGS="-Wno-clobbered" - fi - CFLAGS="$CFLAGS_for_source" - CXXFLAGS="$CXXFLAGS_for_source" fi AC_SUBST(TEST_CFLAGS) AC_SUBST(TEST_CXXFLAGS) AC_SUBST(NO_STRICT_ALIASING_CFLAGS) AC_SUBST(NO_FLOAT_EQUAL_CFLAGS) +AC_SUBST(NO_BAD_FUNCTION_CAST_CFLAGS) -AC_LIBTOOL_WIN32_DLL -AM_PROG_LIBTOOL -m4_ifdef([LT_OUTPUT], [LT_OUTPUT]) +LT_INIT([dlopen win32-dll]) +LT_LANG([Windows Resource]) +LT_OUTPUT LT_CURRENT=0 LT_REVISION=0 @@ -233,19 +230,23 @@ AC_CONFIG_FILES([ lib/mrb/scripts/Makefile lib/mrb/scripts/command_line/Makefile lib/mrb/scripts/context/Makefile + lib/mrb/scripts/expression_tree/Makefile lib/mrb/scripts/initialize/Makefile lib/mrb/scripts/logger/Makefile + lib/mrb/scripts/query_logger/Makefile + lib/proc/Makefile + lib/ts/Makefile include/Makefile include/groonga/Makefile plugins/Makefile plugins/tokenizers/Makefile plugins/suggest/Makefile - plugins/table/Makefile plugins/query_expanders/Makefile plugins/ruby/Makefile plugins/token_filters/Makefile plugins/sharding/Makefile plugins/functions/Makefile + plugins/expression_rewriters/Makefile examples/Makefile examples/dictionary/Makefile examples/dictionary/edict/Makefile @@ -264,19 +265,18 @@ AC_CONFIG_FILES([ packages/windows/language-files/Makefile packages/windows/setup-x64.nsi data/Makefile - data/images/Makefile - data/images/logo/Makefile data/html/Makefile data/munin/Makefile data/init.d/Makefile - data/init.d/redhat/Makefile - data/init.d/redhat/sysconfig/Makefile + data/init.d/centos/Makefile + data/init.d/centos/sysconfig/Makefile data/logrotate.d/Makefile - data/logrotate.d/redhat/Makefile + data/logrotate.d/centos/Makefile data/systemd/Makefile - data/systemd/fedora/Makefile - data/systemd/fedora/sysconfig/Makefile + data/systemd/centos/Makefile + data/systemd/centos/sysconfig/Makefile data/scripts/Makefile + data/tmpfiles.d/Makefile tools/Makefile doc/Makefile doc/locale/Makefile @@ -304,7 +304,10 @@ AC_CONFIG_FILES([ benchmark/fixtures/geo-select/Makefile benchmark/lib/Makefile vendor/Makefile + vendor/lz4/Makefile vendor/onigmo/Makefile + vendor/mecab/Makefile + vendor/message_pack/Makefile vendor/mruby/Makefile ]) @@ -355,14 +358,14 @@ AC_LINK_IFELSE( [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( - [#define _ISOC99_SOURCE + [#define _ISOC99_SOURCE #include ], - [if (fpclassify(0.0)) {return 0;}] + [if (fpclassify(0.0)) {return 0;}] )], [ AC_DEFINE(_ISOC99_SOURCE, [1], [Define to 1 for fpclassify]) - AC_DEFINE(HAVE_FPCLASSIFY, [1], [use fpclassify with _ISOC99_SOURCE]) - AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FPCLASSIFY, [1], [use fpclassify with _ISOC99_SOURCE]) + AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) @@ -454,7 +457,7 @@ AC_ARG_WITH(stack_size, AC_DEFINE_UNQUOTED(GRN_STACK_SIZE, [$GRN_STACK_SIZE], [stack size]) # lock timeout -GRN_LOCK_TIMEOUT=10000000 +GRN_LOCK_TIMEOUT=900000 AC_ARG_WITH(lock_timeout, [AS_HELP_STRING([--with-lock-timeout=N], [This option specifies how many times Groonga tries to acquire a lock. @@ -609,7 +612,7 @@ if test "x$have_epoll" != "xyes"; then ]) ]) if test "x$have_kqueue" != "xyes"; then - AC_CHECK_HEADER(sys/poll.h, [ + AC_CHECK_HEADER(poll.h, [ AC_CHECK_FUNC(poll, [ have_poll="yes" AC_DEFINE(USE_POLL, [1], [use poll]) @@ -617,7 +620,7 @@ if test "x$have_epoll" != "xyes"; then ]) if test "x$have_poll" != "xyes"; then if test "$os_win32" = "yes"; then - AC_CHECK_HEADER(winsock2.h, [have_select="yes"]) + AC_CHECK_HEADER(winsock2.h, [have_select="yes"]) else AC_CHECK_FUNC(select, [ have_select="yes" @@ -750,18 +753,23 @@ if test "x$RUBY" = "xno"; then else if test "x$RUBY" = "xyes"; then AC_PATH_PROGS(RUBY, - [ruby2.1 ruby21 ruby2.0 ruby20 ruby1.9 ruby19 ruby1.9.1 ruby], + [ dnl + ruby2.3 ruby23 dnl + ruby2.2 ruby22 dnl + ruby2.1 ruby21 dnl + ruby dnl + ], ruby-not-found) if test "$RUBY" != "ruby-not-found"; then ruby_version="`$RUBY --version`" - if echo "$ruby_version" | grep -q -- 'ruby \(1\.9\|2\.\)'; then + if echo "$ruby_version" | grep -q -- 'ruby \(2\.\)'; then ac_cv_ruby_available="yes" else - AC_MSG_WARN([$RUBY isn't Ruby 1.9 or later ($ruby_version)]) + AC_MSG_WARN([$RUBY isn't Ruby 2.0 or later ($ruby_version)]) fi fi else - ruby_not_found_warning_message="$RUBY is not found. Disable HTTP test." + ruby_not_found_warning_message="$RUBY is not found." case "$RUBY" in /*) AC_CHECK_FILE([$RUBY], @@ -791,39 +799,13 @@ AM_CONDITIONAL([WITH_UNIT_TEST], AM_CONDITIONAL([WITH_COMMAND_TEST], [test "$ac_cv_ruby_available" = "yes"]) -# check Inkscape for generating PNG images -inkscape_available="no" -AC_ARG_WITH([inkscape], - AS_HELP_STRING([--with-inkscape=PATH], - [Inkscape path (default: auto)]), - [INKSCAPE="$withval"], - [INKSCAPE="yes"]) - -if test "x$INKSCAPE" = "xno"; then - INKSCAPE= -else - if test "x$INKSCAPE" = "xyes"; then - AC_PATH_PROGS(INKSCAPE, [inkscape], none) - if test "$INKSCAPE" != "none"; then - inkscape_available="yes" - fi - else - AC_CHECK_FILE([$INKSCAPE], - [inkscape_available="yes"], - [AC_MSG_WARN([$INKSCAPE is not found. - Disable PNG image generation.])]) - fi -fi -AC_SUBST(INKSCAPE) -AM_CONDITIONAL([WITH_INKSCAPE], [test "$inkscape_available" = "yes"]) - # check Lemon for generating .c and .h files from .y file lemon_available="no" AC_ARG_WITH([lemon], AS_HELP_STRING([--with-lemon=PATH], [Lemon path (default: auto)]), [LEMON="$withval"], - [: ${LEMON:=auto}]) + [: ${LEMON:=auto}]) if test "$LEMON" = "no"; then LEMON= @@ -842,8 +824,8 @@ else fi else AC_CHECK_FILE([$LEMON], - [lemon_available="yes"], - [AC_MSG_WARN([$LEMON is not found. Disable .y compilation.])]) + [lemon_available="yes"], + [AC_MSG_WARN([$LEMON is not found. Disable .y compilation.])]) fi fi AC_SUBST(LEMON) @@ -925,6 +907,30 @@ if test "x$with_lz4" != "xno"; then fi fi +# Zstandard +AC_ARG_WITH(zstd, + [AS_HELP_STRING([--with-zstd], + [Support data compression by Zstandard. [default=auto]])], + [with_zstd="$withval"], + [with_zstd="auto"]) +if test "x$with_zstd" != "xno"; then + m4_ifdef([PKG_CHECK_MODULES], [ + PKG_CHECK_MODULES([LIBZSTD], + [libzstd], + [GRN_WITH_ZSTD=yes], + [GRN_WITH_ZSTD=no]) + ], + [GRN_WITH_ZSTD=no]) + if test "$GRN_WITH_ZSTD" = "yes"; then + AC_DEFINE(GRN_WITH_ZSTD, [1], + [Support data compression by Zstandard.]) + else + if test "x$with_zstd" != "xauto"; then + AC_MSG_ERROR("No libzstd found") + fi + fi +fi + # jemalloc AC_ARG_WITH(jemalloc, [AS_HELP_STRING([--with-jemalloc], @@ -941,8 +947,38 @@ if test "x$with_jemalloc" != "xno"; then [AC_MSG_ERROR("No libjemalloc found")]) fi +# Apache Arrow +AC_ARG_ENABLE(arrow, + [AS_HELP_STRING([--disable-arrow], + [enable Apache Arrow support. [default=auto-detect]])], + [enable_arrow="$enableval"], + [enable_arrow="auto"]) +if test "x$enable_arrow" != "xno"; then + m4_ifdef([PKG_CHECK_MODULES], [ + PKG_CHECK_MODULES([ARROW], + [arrow >= 0.5.0], + [arrow_available=yes], + [arrow_available=no]) + ], + [arrow_available=no]) + if test "x$arrow_available" = "xyes"; then + AC_DEFINE(GRN_WITH_ARROW, [1], [Enable Apache Arrow support.]) + else + if test "x$enable_arrow" = "xyes"; then + AC_MSG_ERROR("No Apache Arrow found") + fi + fi +fi +AM_CONDITIONAL([GRN_WITH_ARROW], [test "$arrow_available" = "yes"]) + # MeCab # NOTE: MUST be checked last + +BUNDLED_MECAB_VERSION=m4_include([bundled_mecab_version]) +AC_SUBST(BUNDLED_MECAB_VERSION) +BUNDLED_MECAB_NAIST_JDIC_VERSION=m4_include([bundled_mecab_naist_jdic_version]) +AC_SUBST(BUNDLED_MECAB_NAIST_JDIC_VERSION) + AC_ARG_WITH(mecab, [AS_HELP_STRING([--with-mecab], [use MeCab for morphological analysis. [default=yes]])], @@ -1170,6 +1206,9 @@ AC_SUBST(LIBEVENT_CFLAGS) AC_SUBST(LIBEVENT_LIBS) # MessagePack +BUNDLED_MESSAGE_PACK_VERSION=m4_include([bundled_message_pack_version]) +AC_SUBST(BUNDLED_MESSAGE_PACK_VERSION) + AC_ARG_ENABLE(message-pack, [AS_HELP_STRING([--disable-message-pack], [Disable MessagePack support. [default=auto-detect]])], @@ -1203,7 +1242,7 @@ if test "x$enable_message_pack" != "xno"; then if test "x$message_pack_available" = "xyes"; then MESSAGE_PACK_CFLAGS="-I$with_message_pack/include" - MESSAGE_PACK_LIBS="-L$with_message_pack/lib -lmsgpack" + MESSAGE_PACK_LIBS="-L$with_message_pack/lib -lmsgpackc" fi fi @@ -1224,6 +1263,17 @@ AM_CONDITIONAL([ENABLE_SUGGEST_LEARNER], "$libevent_available" = "yes" -a \ "$message_pack_available" = "yes"]) +# Check built-in atomic +case "$host" in + i*86*|x86_64*) + ;; + *) + AC_MSG_CHECKING([for platform which requires libatomic]) + AC_CHECK_LIB(atomic, __atomic_store_8, [ATOMIC_LIBS="-latomic"]) + AC_SUBST(ATOMIC_LIBS) + ;; +esac + # Document AC_MSG_CHECKING([whether enable document]) AC_ARG_ENABLE(document, @@ -1246,10 +1296,10 @@ if test x"$enable_document" != x"no"; then AC_PATH_PROG(SPHINX_BUILD, sphinx-build, []) if test -n "$SPHINX_BUILD"; then sphinx_build_version=`"$SPHINX_BUILD" --version` - if ! echo "$sphinx_build_version" | grep -q ' 1\.[[23]]'; then - AC_MSG_ERROR([ + if ! echo "$sphinx_build_version" | grep -q ' 1\.[[3-6]]'; then + AC_MSG_ERROR([ sphinx-build is old: $sphinx_build_version -Sphinx 1.2 or later is required.]) +Sphinx 1.3 or later is required.]) fi document_available=yes document_buildable=yes @@ -1281,8 +1331,8 @@ fi AC_ARG_WITH([cutter-source-path], AS_HELP_STRING([--with-cutter-source-path=PATH], [Specify Cutter source path for - groonga's release manager.]), - [CUTTER_SOURCE_PATH="$withval"]) + groonga's release manager.]), + [CUTTER_SOURCE_PATH="$withval"]) case "$CUTTER_SOURCE_PATH" in ""|/*) : # do nothing @@ -1330,15 +1380,29 @@ AC_MSG_CHECKING([whether package platform]) AC_ARG_WITH(package-platform, [AS_HELP_STRING([--with-package-platform=PLATFORM], [install package platform related files. [default=no] - (supported package platforms: redhat, fedora)])], + (supported package platforms: centos, centos5, centos6, centos7, fedora)])], [package_platform="$withval"], [package_platform="no"]) +if test "$package_platform" = "centos"; then + distribution=$(cut -d " " -f 1 /etc/redhat-release | tr "A-Z" "a-z") + if grep -q Linux /etc/redhat-release; then + distribution_version=$(cut -d " " -f 4 /etc/redhat-release) + else + distribution_version=$(cut -d " " -f 3 /etc/redhat-release) + fi + distribution_version=$(echo ${distribution_version} | sed -e 's/\..*$//g') + package_platform="${package_platform}${distribution_version}" +fi AC_MSG_RESULT($package_platform) -AM_CONDITIONAL([REDHAT_PLATFORM], - [test "${package_platform}" = "redhat"]) -AM_CONDITIONAL([FEDORA_PLATFORM], - [test "${package_platform}" = "fedora"]) +AM_CONDITIONAL([CENTOS_PLATFORM], + [test "${package_platform}" != "no"]) +AM_CONDITIONAL([CENTOS_INIT_PLATFORM], + [test "${package_platform}" = "centos5" || + test "${package_platform}" = "centos6"]) +AM_CONDITIONAL([CENTOS_SYSTEMD_PLATFORM], + [test "${package_platform}" = "centos7" || + test "${package_platform}" = "fedora"]) # plugins check relative_pluginsdir_base="\$(PACKAGE)/plugins" @@ -1354,18 +1418,15 @@ AC_SUBST(pluginsdir) expanded_pluginsdir="\${libdir}/${expanded_relative_pluginsdir_base}" AC_SUBST(expanded_pluginsdir) -tokenizers_pluginsdir="\${pluginsdir}/tokenizers" -AC_SUBST(tokenizers_pluginsdir) +tokenizer_pluginsdir="\${pluginsdir}/tokenizers" +AC_SUBST(tokenizer_pluginsdir) -query_expanders_pluginsdir="\${pluginsdir}/query_expanders" -AC_SUBST(query_expanders_pluginsdir) +query_expander_pluginsdir="\${pluginsdir}/query_expanders" +AC_SUBST(query_expander_pluginsdir) suggest_pluginsdir="\${pluginsdir}/suggest" AC_SUBST(suggest_pluginsdir) -table_pluginsdir="\${pluginsdir}/table" -AC_SUBST(table_pluginsdir) - ruby_pluginsdir="\${pluginsdir}/ruby" AC_SUBST(ruby_pluginsdir) @@ -1378,6 +1439,9 @@ AC_SUBST(sharding_pluginsdir) function_pluginsdir="\${pluginsdir}/functions" AC_SUBST(function_pluginsdir) +expression_rewriter_pluginsdir="\${pluginsdir}/expression_rewriters" +AC_SUBST(expression_rewriter_pluginsdir) + AC_MSG_CHECKING(for the suffix of plugin shared libraries) shrext_cmds=$(./libtool --config | grep '^shrext_cmds=') eval $shrext_cmds @@ -1389,12 +1453,13 @@ fi AC_DEFINE_UNQUOTED(GRN_PLUGIN_SUFFIX, ["$suffix"], "plugin suffix") # for query expanders -GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE="synonyms.tsv" +GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE_BASE="synonyms.tsv" +GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE="etc/${PACKAGE}/${GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE_BASE}" AC_DEFINE_UNQUOTED(GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE, ["$GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE"], "The relative synonyms file for TSV query expander") GRN_QUERY_EXPANDER_TSV_SYNONYMS_PATH="` - eval echo ${sysconfdir}/${PACKAGE}/${GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE} + eval echo ${sysconfdir}/${PACKAGE}/${GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE_BASE} `" AC_DEFINE_UNQUOTED(GRN_QUERY_EXPANDER_TSV_SYNONYMS_FILE, ["$GRN_QUERY_EXPANDER_TSV_SYNONYMS_PATH"], @@ -1451,8 +1516,7 @@ AC_ARG_WITH(groonga-org-path, AC_SUBST(GROONGA_ORG_PATH) # groonga-httpd -m4_define([nginx_version], m4_include(nginx_version)) -NGINX_VERSION=nginx_version +NGINX_VERSION=m4_include([nginx_version]) AC_SUBST(NGINX_VERSION) # groonga-httpd binary path @@ -1472,6 +1536,12 @@ else fi AM_CONDITIONAL(WITH_GROONGA_HTTPD, test "$enable_groonga_httpd" = "yes") +GROONGA_HTTPD_PID_PATH="` + test \"$prefix\" = NONE && prefix=/usr/local + eval echo ${localstatedir}/run/groonga/groonga-httpd.pid +`" +AC_SUBST(GROONGA_HTTPD_PID_PATH) + # mruby AC_ARG_ENABLE(mruby, [AS_HELP_STRING([--enable-mruby], @@ -1492,12 +1562,17 @@ if test "$enable_mruby" = "yes"; then fi AC_DEFINE(GRN_WITH_MRUBY, [1], [Define to 1 if mruby is enabled.]) MRUBY_CFLAGS="-I\$(top_srcdir)/vendor/mruby-source/include" + GRN_WITH_MRUBY="yes" else MRUBY_CFLAGS="" fi +AC_SUBST(GRN_WITH_MRUBY) AC_SUBST(MRUBY_CFLAGS) AM_CONDITIONAL(WITH_MRUBY, test "$enable_mruby" = "yes") +MRUBY_CPPFLAGS="-DMRB_INT64" +AC_SUBST(MRUBY_CPPFLAGS) + # This option is used in vendor/onigmo/configure AC_ARG_ENABLE(shared-onigmo, [AS_HELP_STRING([--enable-shared-onigmo], @@ -1506,16 +1581,37 @@ AC_ARG_ENABLE(shared-onigmo, [enable_shared_onigmo="no"]) AM_CONDITIONAL(WITH_SHARED_ONIGMO, test "$enable_shared_onigmo" = "yes") -# TODO: Support using system Onigmo instead of bundled Onigmo. -AC_DEFINE(GRN_WITH_ONIGMO, [1], [Use Onigmo.]) -GRN_WITH_ONIGMO="yes" +AC_ARG_WITH(onigmo, + [AS_HELP_STRING([--without-onigmo], + [Don't Use Onigmo. [default=bundled]])], + [with_onigmo="$withval"], + [with_onigmo="bundled"]) +if test "x$with_onigmo" != "xno"; then + GRN_WITH_ONIGMO="yes" + if test "x$with_onigmo" != "xbundled"; then + m4_ifdef([PKG_CHECK_MODULES], [ + PKG_CHECK_MODULES([ONIGMO], [onigmo], + [have_onigmo=yes], + [have_onigmo=no]) + ], + [have_onigmo=no]) + fi + if test "x$with_onigmo" = "xsystem" -a "$have_onigmo" = "no"; then + AC_MSG_ERROR("No Onigmo found") + fi + if test "x$with_onigmo" = "xbundled" -o "$have_onigmo" = "no"; then + AC_CONFIG_SUBDIRS([vendor/onigmo]) + ONIGMO_CFLAGS="-I\$(top_srcdir)/vendor/onigmo-source" + ONIGMO_LIBS="\$(top_builddir)/vendor/onigmo-source/libonigmo.la" + fi + AC_DEFINE(GRN_WITH_ONIGMO, [1], [Use Onigmo.]) +else + GRN_WITH_ONIGMO="no" +fi AC_SUBST(GRN_WITH_ONIGMO) -AC_CONFIG_SUBDIRS([vendor/onigmo]) - -ONIGMO_CFLAGS="-I\$(top_srcdir)/vendor/onigmo-source" -ONIGMO_LIBS="\$(top_builddir)/vendor/onigmo-source/libonig.la" AC_SUBST(ONIGMO_CFLAGS) AC_SUBST(ONIGMO_LIBS) +AM_CONDITIONAL(WITH_BUNDLED_ONIGMO, test "$with_onigmo" != "no" -a "x$have_onigmo" != "xyes") # PCRE GRN_WITH_PCRE=no @@ -1541,6 +1637,30 @@ AC_SUBST(GRN_WITH_PCRE) AC_SUBST(PCRE_CFLAGS) AC_SUBST(PCRE_LIBS_ONLY_L) +# SSL +GRN_WITH_SSL=no +AC_ARG_WITH(ssl, + [AS_HELP_STRING([--without-ssl], + [Don't use SSL module for groonga-httpd. [default=auto-detect]])], + [with_ssl="$withval"], + [with_ssl="auto"]) +if test "x$with_ssl" != "xno"; then + m4_ifdef([PKG_CHECK_MODULES], [ + PKG_CHECK_MODULES([SSL], [libssl], + [_PKG_CONFIG(SSL_LIBS_ONLY_L, [libs-only-L], [libssl]) + SSL_LIBS_ONLY_L="$pkg_cv_SSL_LIBS_ONLY_L" + GRN_WITH_SSL=yes], + [GRN_WITH_SSL=no]) + ], + [GRN_WITH_SSL=no]) + if test "x$with_ssl" = "xyes" -a "$GRN_WITH_SSL" != "yes"; then + AC_MSG_ERROR("No SSL found") + fi +fi +AC_SUBST(GRN_WITH_SSL) +AC_SUBST(SSL_CFLAGS) +AC_SUBST(SSL_LIBS_ONLY_L) + # For package AC_ARG_WITH(rsync-path, [AS_HELP_STRING([--with-rsync-path=PATH], @@ -1549,6 +1669,13 @@ AC_ARG_WITH(rsync-path, [RSYNC_PATH="packages@packages.groonga.org:public"]) AC_SUBST(RSYNC_PATH) +AC_ARG_WITH(launchpad-ppa, + [AS_HELP_STRING([--with-launchpad-ppa=PPA], + [specify Launchpad Personal Package Archive. [default=groonga-ppa]])], + [LAUNCHPAD_PPA="$withval"], + [LAUNCHPAD_PPA="groonga-ppa"]) +AC_SUBST(LAUNCHPAD_PPA) + AC_ARG_WITH(launchpad-uploader-pgp-key, [AS_HELP_STRING([--with-launchpad-uploader-pgp-key=KEY], [specify PGP key UID to upload Groonga packages to Launchpad.])], @@ -1582,15 +1709,19 @@ GROONGA_HTTPD_DEFAULT_DATABASE_PATH="` AC_SUBST(GROONGA_HTTPD_DEFAULT_DATABASE_PATH) AC_OUTPUT([ + lib/metadata.rc packages/rpm/centos/groonga.spec packages/apt/debian/groonga-keyring.postrm packages/apt/env.sh packages/yum/env.sh groonga.pc + groonga-arrow.pc config.sh groonga-httpd-conf.sh data/groonga-httpd.conf + data/logrotate.d/centos/groonga-httpd data/scripts/groonga-httpd-restart + data/systemd/centos/groonga-httpd.service ]) echo "$PACKAGE_NAME $PACKAGE_VERSION configuration:" @@ -1657,11 +1788,16 @@ echo "groonga-httpd:" echo " enable: $enable_groonga_httpd" if test "$enable_groonga_httpd" = "yes"; then echo " default database path: $GROONGA_HTTPD_DEFAULT_DATABASE_PATH" - echo " PCRE: $WITH_PCRE" - if test "$WITH_PCRE" = "yes"; then + echo " PCRE: $GRN_WITH_PCRE" + if test "$GRN_WITH_PCRE" = "yes"; then echo " CFLAGS: $PCRE_CFLAGS" echo " LIBS only -L: $PCRE_LIBS_ONLY_L" fi + echo " SSL: $GRN_WITH_SSL" + if test "$GRN_WITH_SSL" = "yes"; then + echo " CFLAGS: $SSL_CFLAGS" + echo " LIBS only -L: $SSL_LIBS_ONLY_L" + fi fi echo diff --git a/storage/mroonga/vendor/groonga/examples/dictionary/edict/edict-import.sh b/storage/mroonga/vendor/groonga/examples/dictionary/edict/edict-import.sh index b98397be0..e48700af0 100755 --- a/storage/mroonga/vendor/groonga/examples/dictionary/edict/edict-import.sh +++ b/storage/mroonga/vendor/groonga/examples/dictionary/edict/edict-import.sh @@ -16,6 +16,12 @@ else edict_gz=$2 fi -if zcat $edict_gz | ${base_dir}/edict2grn.rb | groonga $1 > /dev/null; then +if type gzcat > /dev/null 2>&1; then + zcat="gzcat" +else + zcat="zcat" +fi + +if $zcat $edict_gz | ${base_dir}/edict2grn.rb | groonga $1 > /dev/null; then echo "edict data loaded." fi diff --git a/storage/mroonga/vendor/groonga/examples/dictionary/html/index.html b/storage/mroonga/vendor/groonga/examples/dictionary/html/index.html index aaad128a2..47e817540 100644 --- a/storage/mroonga/vendor/groonga/examples/dictionary/html/index.html +++ b/storage/mroonga/vendor/groonga/examples/dictionary/html/index.html @@ -16,7 +16,7 @@ - +