revision-id: d6ee7ab1a1cec0143e66f3ac75d8cee7c60f69b0 (mariadb-galera-10.0.36-4-gd6ee7ab1a1c) parent(s): b0fe082b365d989fcf905e5c40c3fe60fd756858 a737135ae39dafe8b1136386ce23dfa8bed877f9 author: Jan Lindström committer: Jan Lindström timestamp: 2018-10-31 08:46:37 +0200 message: Merge remote-tracking branch 'origin/10.0' into bb-10.0-galera .gitignore | 1 + CREDITS | 4 +- debian/dist/Ubuntu/rules | 1 + include/my_bit.h | 8 +- include/mysql/plugin.h | 12 + mysql-test/extra/rpl_tests/rpl_foreign_key.test | 62 - mysql-test/include/have_32bit.inc | 9 + mysql-test/include/have_64bit.inc | 9 + mysql-test/include/maybe_debug.combinations | 5 + mysql-test/include/maybe_debug.inc | 3 + mysql-test/r/contributors.result | 4 +- mysql-test/r/create_or_replace.result | 35 + mysql-test/r/ctype_uca.result | 21 + mysql-test/r/func_concat.result | 20 + mysql-test/r/gis.result | 16 + mysql-test/r/group_min_max.result | 28 + mysql-test/r/order_by_zerolength-4285.result | 20 + mysql-test/r/partition_explicit_prune.result | 19 + mysql-test/r/selectivity.result | 44 +- mysql-test/r/selectivity_innodb.result | 44 +- mysql-test/r/stat_tables.result | 13 + mysql-test/r/stat_tables_innodb.result | 13 + mysql-test/r/subselect_extra_no_semijoin.result | 19 + mysql-test/r/type_year.result | 13 + mysql-test/suite.pm | 3 + .../suite/innodb/r/alter_inplace_perfschema.result | 15 + mysql-test/suite/innodb/r/foreign-keys.result | 73 + mysql-test/suite/innodb/r/foreign_key.result | 51 + .../suite/innodb/r/innodb-alter-debug.result | 14 + .../suite/innodb/r/table_flags,4k,debug.rdiff | 128 + ...flags,4k.rdiff => table_flags,4k,release.rdiff} | 0 .../suite/innodb/r/table_flags,8k,debug.rdiff | 128 + ...flags,8k.rdiff => table_flags,8k,release.rdiff} | 0 mysql-test/suite/innodb/r/table_flags,debug.rdiff | 128 + .../suite/innodb/t/alter_inplace_perfschema.opt | 2 + .../suite/innodb/t/alter_inplace_perfschema.test | 40 + mysql-test/suite/innodb/t/foreign-keys.test | 87 + mysql-test/suite/innodb/t/foreign_key.test | 75 + mysql-test/suite/innodb/t/innodb-alter-debug.test | 25 +- mysql-test/suite/innodb/t/table_flags.test | 4 + .../suite/innodb_fts/r/fts_kill_query.result | 6 + mysql-test/suite/innodb_fts/t/fts_kill_query.test | 30 + mysql-test/suite/maria/create.result | 33 + mysql-test/suite/maria/create.test | 42 + .../suite/rpl/r/rpl_foreign_key_innodb.result | 5 +- mysql-test/suite/rpl/t/rpl_15919-master.opt | 1 - mysql-test/suite/rpl/t/rpl_15919.test | 4 +- mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test | 63 +- .../r/innodb_ft_result_cache_limit_32.result | 7 + .../r/innodb_ft_result_cache_limit_64.result | 5 + .../suite/sys_vars/r/thread_pool_size_high.result | 1 + .../t/innodb_ft_result_cache_limit_32.test | 9 + .../t/innodb_ft_result_cache_limit_64.test | 9 + .../suite/sys_vars/t/thread_pool_size_high.test | 1 + mysql-test/t/alter_table.test | 48 +- mysql-test/t/create_or_replace.test | 45 + mysql-test/t/ctype_uca.test | 18 + mysql-test/t/func_concat.test | 22 + mysql-test/t/gis.test | 15 + mysql-test/t/grant.test | 43 +- mysql-test/t/group_min_max.test | 17 + mysql-test/t/lowercase_fs_off.test | 10 + mysql-test/t/order_by_zerolength-4285.test | 13 + mysql-test/t/partition_explicit_prune.test | 19 + mysql-test/t/selectivity.test | 36 + mysql-test/t/sp-security.test | 12 +- mysql-test/t/stat_tables.test | 12 + mysql-test/t/subselect_extra_no_semijoin.test | 31 +- mysql-test/t/type_datetime.test | 10 +- mysql-test/t/type_float.test | 29 + mysql-test/t/type_year.test | 16 + mysql-test/unstable-tests | 82 +- mysys/ptr_cmp.c | 7 + scripts/mysql_install_db.sh | 2 +- sql/contributors.h | 4 +- sql/field.cc | 17 +- sql/ha_partition.cc | 9 +- sql/ha_partition.h | 1 - sql/item_cmpfunc.cc | 15 +- sql/item_subselect.cc | 2 +- sql/lex.h | 6 +- sql/lock.cc | 17 - sql/lock.h | 1 - sql/mysqld.cc | 11 + sql/opt_range.cc | 27 +- sql/sp_head.cc | 33 +- sql/sql_acl.cc | 1 - sql/sql_alter.h | 2 +- sql/sql_base.cc | 150 +- sql/sql_base.h | 2 + sql/sql_class.cc | 3 +- sql/sql_class.h | 2 - sql/sql_insert.cc | 2 +- sql/sql_lex.h | 4 +- sql/sql_select.cc | 2 +- sql/sql_show.cc | 9 +- sql/sql_statistics.cc | 3 + sql/sql_statistics.h | 29 +- sql/sql_table.cc | 64 +- sql/sql_yacc.yy | 38 +- sql/table.cc | 20 + sql/table.h | 49 +- sql/table_cache.cc | 3 +- storage/connect/CMakeLists.txt | 9 + storage/connect/connect.cc | 2 +- storage/connect/domdoc.cpp | 4 +- storage/connect/filamtxt.cpp | 6 +- storage/connect/filamvct.cpp | 28 +- storage/connect/global.h | 4 +- storage/connect/ha_connect.cc | 148 +- storage/connect/ha_connect.h | 6 +- storage/connect/javaconn.cpp | 43 +- storage/connect/javaconn.h | 1 + storage/connect/jdbconn.cpp | 38 +- storage/connect/jmgoconn.cpp | 6 +- storage/connect/json.h | 3 + storage/connect/jsonudf.cpp | 6 +- storage/connect/mycat.cc | 15 +- storage/connect/mysql-test/connect/disabled.def | 23 +- storage/connect/mysql-test/connect/r/jdbc.result | 3 +- .../mysql-test/connect/r/json_java_2.result | 1 - .../mysql-test/connect/r/json_java_3.result | 1 - .../mysql-test/connect/r/mongo_java_2.result | 1 - .../mysql-test/connect/r/mongo_java_3.result | 1 - .../connect/mysql-test/connect/r/mysql_exec.result | 6 + .../mysql-test/connect/r/odbc_postgresql.result | 18 +- storage/connect/mysql-test/connect/r/xml2.result | 31 - .../connect/mysql-test/connect/t/json_java_2.test | 2 + .../connect/mysql-test/connect/t/json_java_3.test | 2 + .../connect/mysql-test/connect/t/mongo_java_2.test | 2 + .../connect/mysql-test/connect/t/mongo_java_3.test | 2 + storage/connect/mysql-test/connect/t/xml2.test | 36 +- storage/connect/odbconn.cpp | 10 +- storage/connect/tabext.cpp | 8 +- storage/connect/tabjdbc.cpp | 9 +- storage/connect/tabjmg.cpp | 11 +- storage/connect/tabjson.h | 1 + storage/connect/tabmysql.cpp | 11 +- storage/connect/tabodbc.cpp | 13 +- storage/connect/tabpivot.cpp | 166 +- storage/connect/tabutil.cpp | 2 +- storage/connect/tabvct.cpp | 6 +- storage/connect/user_connect.cc | 1 + storage/heap/hp_create.c | 2 +- storage/innobase/buf/buf0buf.cc | 2 +- storage/innobase/buf/buf0lru.cc | 2 +- storage/innobase/dict/dict0crea.cc | 16 + storage/innobase/dict/dict0dict.cc | 7 +- storage/innobase/fts/fts0ast.cc | 9 +- storage/innobase/fts/fts0fts.cc | 24 +- storage/innobase/fts/fts0pars.cc | 16 +- storage/innobase/fts/fts0pars.y | 16 +- storage/innobase/fts/fts0que.cc | 23 +- storage/innobase/handler/ha_innodb.cc | 108 +- storage/innobase/handler/handler0alter.cc | 55 +- storage/innobase/include/dict0mem.h | 3 + storage/innobase/include/fts0ast.h | 5 +- storage/innobase/include/fts0fts.h | 2 +- storage/innobase/include/fts0types.h | 4 +- storage/innobase/include/os0file.h | 6 +- storage/innobase/include/row0ftsort.h | 9 + storage/innobase/include/univ.i | 2 +- storage/innobase/row/row0ftsort.cc | 1 - storage/innobase/row/row0import.cc | 5 +- storage/innobase/row/row0merge.cc | 14 +- storage/innobase/row/row0mysql.cc | 171 +- storage/innobase/row/row0sel.cc | 4 +- storage/innobase/trx/trx0purge.cc | 2 +- storage/innobase/trx/trx0trx.cc | 2 +- storage/mroonga/ha_mroonga.cpp | 6 +- .../mysql-test/storage_engine/disabled.def | 2 + storage/perfschema/unittest/pfs-t.cc | 5 +- storage/tokudb/CMakeLists.txt | 8 +- storage/tokudb/PerconaFT/CMakeLists.txt | 3 +- .../cmake_modules/TokuSetupCompiler.cmake | 3 + .../tokudb/PerconaFT/ft/cachetable/cachetable.cc | 21 +- .../tokudb/PerconaFT/ft/cachetable/cachetable.h | 8 +- .../tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc | 3 - storage/tokudb/PerconaFT/ft/ft-test-helpers.cc | 3 - storage/tokudb/PerconaFT/ft/ft.h | 3 + storage/tokudb/PerconaFT/ft/node.cc | 2 + .../PerconaFT/ft/serialize/block_allocator.cc | 2 +- .../tokudb/PerconaFT/ft/tests/cachetable-4357.cc | 4 - .../tokudb/PerconaFT/ft/tests/cachetable-4365.cc | 4 - .../tokudb/PerconaFT/ft/tests/cachetable-5097.cc | 6 +- .../tokudb/PerconaFT/ft/tests/cachetable-5978-2.cc | 7 +- .../tokudb/PerconaFT/ft/tests/cachetable-5978.cc | 13 +- .../PerconaFT/ft/tests/cachetable-all-write.cc | 5 +- .../ft/tests/cachetable-checkpoint-pending.cc | 8 +- .../ft/tests/cachetable-checkpoint-pinned-nodes.cc | 6 +- .../ft/tests/cachetable-cleaner-checkpoint.cc | 5 +- .../ft/tests/cachetable-cleaner-checkpoint2.cc | 5 +- .../cachetable-cleaner-thread-attrs-accumulate.cc | 8 +- .../cachetable-cleaner-thread-everything-pinned.cc | 5 +- ...etable-cleaner-thread-nothing-needs-flushing.cc | 5 +- .../cachetable-cleaner-thread-same-fullhash.cc | 7 +- .../ft/tests/cachetable-cleaner-thread-simple.cc | 7 +- .../ft/tests/cachetable-clock-eviction.cc | 9 +- .../ft/tests/cachetable-clock-eviction2.cc | 9 +- .../ft/tests/cachetable-clock-eviction3.cc | 9 +- .../ft/tests/cachetable-clock-eviction4.cc | 9 +- .../ft/tests/cachetable-clone-checkpoint.cc | 5 +- .../cachetable-clone-partial-fetch-pinned-node.cc | 7 +- .../ft/tests/cachetable-clone-partial-fetch.cc | 7 +- .../ft/tests/cachetable-clone-pin-nonblocking.cc | 7 +- .../ft/tests/cachetable-clone-unpin-remove.cc | 5 +- .../ft/tests/cachetable-eviction-close-test.cc | 4 - .../ft/tests/cachetable-eviction-close-test2.cc | 4 - .../ft/tests/cachetable-eviction-getandpin-test.cc | 14 +- .../tests/cachetable-eviction-getandpin-test2.cc | 12 +- .../ft/tests/cachetable-fetch-inducing-evictor.cc | 15 +- .../ft/tests/cachetable-flush-during-cleaner.cc | 3 +- .../ft/tests/cachetable-getandpin-test.cc | 8 +- .../cachetable-kibbutz_and_flush_cachefile.cc | 3 +- .../PerconaFT/ft/tests/cachetable-partial-fetch.cc | 18 +- .../ft/tests/cachetable-pin-checkpoint.cc | 6 - .../cachetable-pin-nonblocking-checkpoint-clean.cc | 9 +- .../ft/tests/cachetable-prefetch-close-test.cc | 2 - .../ft/tests/cachetable-prefetch-getandpin-test.cc | 12 +- .../ft/tests/cachetable-put-checkpoint.cc | 9 - .../PerconaFT/ft/tests/cachetable-simple-clone.cc | 7 +- .../PerconaFT/ft/tests/cachetable-simple-clone2.cc | 5 +- .../PerconaFT/ft/tests/cachetable-simple-close.cc | 20 +- .../ft/tests/cachetable-simple-maybe-get-pin.cc | 3 +- .../ft/tests/cachetable-simple-pin-cheap.cc | 9 +- .../ft/tests/cachetable-simple-pin-dep-nodes.cc | 8 +- .../cachetable-simple-pin-nonblocking-cheap.cc | 19 +- .../ft/tests/cachetable-simple-pin-nonblocking.cc | 13 +- .../PerconaFT/ft/tests/cachetable-simple-pin.cc | 11 +- .../ft/tests/cachetable-simple-put-dep-nodes.cc | 6 +- .../cachetable-simple-read-pin-nonblocking.cc | 13 +- .../ft/tests/cachetable-simple-read-pin.cc | 13 +- .../cachetable-simple-unpin-remove-checkpoint.cc | 7 +- .../PerconaFT/ft/tests/cachetable-simple-verify.cc | 5 +- .../tokudb/PerconaFT/ft/tests/cachetable-test.cc | 22 +- .../ft/tests/cachetable-unpin-and-remove-test.cc | 4 +- .../cachetable-unpin-remove-and-checkpoint.cc | 6 +- .../PerconaFT/ft/tests/cachetable-unpin-test.cc | 2 - storage/tokudb/PerconaFT/ft/tests/test-TDB2-pe.cc | 178 + storage/tokudb/PerconaFT/ft/tests/test-TDB89.cc | 208 + storage/tokudb/PerconaFT/ft/txn/rollback-apply.cc | 2 + storage/tokudb/PerconaFT/ft/txn/rollback.cc | 2 +- storage/tokudb/PerconaFT/ftcxx/malloc_utils.cpp | 2 +- storage/tokudb/PerconaFT/ftcxx/malloc_utils.hpp | 2 +- storage/tokudb/PerconaFT/portability/memory.cc | 14 +- storage/tokudb/PerconaFT/portability/toku_assert.h | 2 +- .../tokudb/PerconaFT/portability/toku_debug_sync.h | 3 +- .../PerconaFT/portability/toku_instr_mysql.cc | 6 +- .../PerconaFT/portability/toku_instrumentation.h | 6 +- .../PerconaFT/portability/toku_portability.h | 2 +- .../tokudb/PerconaFT/portability/toku_race_tools.h | 2 +- storage/tokudb/PerconaFT/src/tests/get_last_key.cc | 32 +- storage/tokudb/PerconaFT/src/ydb.cc | 3 + storage/tokudb/PerconaFT/src/ydb_lib.cc | 2 +- storage/tokudb/PerconaFT/util/dmt.cc | 4 +- storage/tokudb/PerconaFT/util/minicron.cc | 3 +- storage/tokudb/PerconaFT/util/scoped_malloc.cc | 2 +- .../util/tests/minicron-change-period-data-race.cc | 66 + storage/tokudb/ha_tokudb.cc | 337 +- storage/tokudb/ha_tokudb.h | 100 +- storage/tokudb/ha_tokudb_admin.cc | 8 +- storage/tokudb/ha_tokudb_alter_55.cc | 4 + storage/tokudb/ha_tokudb_alter_56.cc | 265 +- storage/tokudb/ha_tokudb_alter_common.cc | 6 +- storage/tokudb/ha_tokudb_update.cc | 96 +- storage/tokudb/hatoku_cmp.cc | 33 +- storage/tokudb/hatoku_cmp.h | 14 +- storage/tokudb/hatoku_defines.h | 64 +- storage/tokudb/hatoku_hton.cc | 183 +- storage/tokudb/hatoku_hton.h | 25 +- storage/tokudb/mysql-test/rpl/disabled.def | 1 + .../r/rpl_mixed_replace_into.result | 0 .../rpl/r/rpl_parallel_tokudb_delete_pk.result | 5 - ...pl_parallel_tokudb_update_pk_uc0_lookup0.result | 5 - .../rpl/r/rpl_parallel_tokudb_write_pk.result | 2 - .../r/rpl_row_replace_into.result | 0 .../r/rpl_stmt_replace_into.result | 0 .../mysql-test/rpl/r/rpl_xa_interleave.result | 59 + .../t/rpl_mixed_replace_into.test | 0 .../t/rpl_row_replace_into.test | 0 .../t/rpl_stmt_replace_into.test | 0 .../tokudb/mysql-test/rpl/t/rpl_xa_interleave.test | 103 + .../tokudb/include/fast_update_gen_footer.inc | 2 + .../include/fast_update_gen_footer_silent.inc | 9 + .../tokudb/include/fast_update_gen_header.inc | 6 + .../mysql-test/tokudb/include/fast_update_int.inc | 48 + .../tokudb/include/fast_upsert_gen_header.inc | 6 + .../mysql-test/tokudb/include/fast_upsert_int.inc | 19 + .../tokudb/mysql-test/tokudb/include/have_mrr.inc | 0 .../tokudb/include/setup_fast_update_upsert.inc | 8 + .../tokudb/mysql-test/tokudb/r/compressions.result | 11 + .../tokudb/r/fast_update_binlog_mixed.result | 225 +- .../tokudb/r/fast_update_binlog_row.result | 19 +- .../tokudb/r/fast_update_binlog_statement.result | 222 +- .../mysql-test/tokudb/r/fast_update_blobs.result | 18253 +--------- .../r/fast_update_blobs_fixed_varchar.result | 33026 ------------------ .../tokudb/r/fast_update_blobs_with_varchar.result | 32771 +----------------- .../mysql-test/tokudb/r/fast_update_char.result | 60 +- .../tokudb/r/fast_update_deadlock.result | 19 +- .../tokudb/r/fast_update_decr_floor.result | 314 +- .../r/fast_update_disable_slow_update.result | 7 - .../mysql-test/tokudb/r/fast_update_error.result | 12 +- .../mysql-test/tokudb/r/fast_update_int.result | 562 +- .../tokudb/r/fast_update_int_bounds.result | 52 +- .../mysql-test/tokudb/r/fast_update_key.result | 54 +- .../mysql-test/tokudb/r/fast_update_sqlmode.result | 21 +- .../tokudb/r/fast_update_uint_bounds.result | 36 +- .../mysql-test/tokudb/r/fast_update_varchar.result | 13575 +------- .../mysql-test/tokudb/r/fast_upsert_bin_pad.result | Bin 659 -> 738 bytes .../mysql-test/tokudb/r/fast_upsert_char.result | 24 +- .../tokudb/r/fast_upsert_deadlock.result | 19 +- .../mysql-test/tokudb/r/fast_upsert_int.result | 428 +- .../mysql-test/tokudb/r/fast_upsert_key.result | 43 +- .../mysql-test/tokudb/r/fast_upsert_sqlmode.result | 23 +- .../mysql-test/tokudb/r/fast_upsert_values.result | 18 +- .../tokudb/mysql-test/tokudb/r/tokudb_mrr.result | 326 + storage/tokudb/mysql-test/tokudb/suite.pm | 6 + .../tokudb/mysql-test/tokudb/t/compressions.test | 68 + storage/tokudb/mysql-test/tokudb/t/disabled.def | 24 - .../tokudb/t/fast_update_binlog_mixed-master.opt | 2 + .../tokudb/t/fast_update_binlog_mixed.test | 15 +- .../tokudb/t/fast_update_binlog_row-master.opt | 2 + .../tokudb/t/fast_update_binlog_row.test | 19 +- .../t/fast_update_binlog_statement-master.opt | 2 + .../tokudb/t/fast_update_binlog_statement.test | 15 +- .../mysql-test/tokudb/t/fast_update_blobs.py | 57 - .../mysql-test/tokudb/t/fast_update_blobs.test | 18575 +---------- .../tokudb/t/fast_update_blobs_fixed_varchar.py | 63 - .../tokudb/t/fast_update_blobs_fixed_varchar.test | 33287 ------------------- .../tokudb/t/fast_update_blobs_with_varchar.py | 62 - .../tokudb/t/fast_update_blobs_with_varchar.test | 33115 +----------------- .../mysql-test/tokudb/t/fast_update_char.test | 66 +- .../mysql-test/tokudb/t/fast_update_deadlock.test | 21 +- .../mysql-test/tokudb/t/fast_update_decr_floor.py | 58 - .../tokudb/t/fast_update_decr_floor.test | 409 +- .../tokudb/t/fast_update_disable_slow_update.test | 17 - .../mysql-test/tokudb/t/fast_update_error.test | 16 +- .../tokudb/mysql-test/tokudb/t/fast_update_int.py | 77 - .../mysql-test/tokudb/t/fast_update_int.test | 682 +- .../tokudb/t/fast_update_int_bounds.test | 55 +- .../mysql-test/tokudb/t/fast_update_key.test | 63 +- .../mysql-test/tokudb/t/fast_update_sqlmode.test | 25 +- .../tokudb/t/fast_update_uint_bounds.test | 42 +- .../mysql-test/tokudb/t/fast_update_varchar.py | 63 - .../mysql-test/tokudb/t/fast_update_varchar.test | 7390 +--- .../mysql-test/tokudb/t/fast_upsert_bin_pad.test | 19 +- .../mysql-test/tokudb/t/fast_upsert_char.test | 27 +- .../mysql-test/tokudb/t/fast_upsert_deadlock.test | 22 +- .../tokudb/mysql-test/tokudb/t/fast_upsert_int.py | 50 - .../mysql-test/tokudb/t/fast_upsert_int.test | 486 +- .../mysql-test/tokudb/t/fast_upsert_key.test | 46 +- .../mysql-test/tokudb/t/fast_upsert_sqlmode.test | 27 +- .../mysql-test/tokudb/t/fast_upsert_values.test | 21 +- storage/tokudb/mysql-test/tokudb/t/tokudb_mrr.test | 73 + .../tokudb/mysql-test/tokudb_bugs/r/PS-3773.result | 8 + .../r/alter_table_comment_rebuild_data.result | 177 + .../tokudb/mysql-test/tokudb_bugs/t/PS-3773.test | 26 + .../t/alter_table_comment_rebuild_data.test | 188 + storage/tokudb/tokudb_debug.h | 5 - storage/tokudb/tokudb_dir_cmd.h | 6 +- storage/tokudb/tokudb_information_schema.cc | 74 +- storage/tokudb/tokudb_sysvars.cc | 122 +- storage/tokudb/tokudb_sysvars.h | 16 +- storage/tokudb/tokudb_thread.h | 26 +- storage/tokudb/tokudb_update_fun.cc | 230 +- storage/xtradb/CMakeLists.txt | 10 +- storage/xtradb/buf/buf0buf.cc | 16 +- storage/xtradb/buf/buf0dump.cc | 5 +- storage/xtradb/buf/buf0lru.cc | 2 +- storage/xtradb/dict/dict0crea.cc | 17 +- storage/xtradb/dict/dict0dict.cc | 7 +- storage/xtradb/fts/fts0ast.cc | 9 +- storage/xtradb/fts/fts0blex.cc | 30 +- storage/xtradb/fts/fts0fts.cc | 24 +- storage/xtradb/fts/fts0pars.cc | 20 +- storage/xtradb/fts/fts0pars.y | 20 +- storage/xtradb/fts/fts0que.cc | 23 +- storage/xtradb/fts/fts0tlex.cc | 30 +- storage/xtradb/handler/ha_innodb.cc | 105 +- storage/xtradb/handler/ha_innodb.h | 2 +- storage/xtradb/handler/handler0alter.cc | 20 +- storage/xtradb/include/buf0buf.h | 1 + storage/xtradb/include/data0type.ic | 1 - storage/xtradb/include/dict0mem.h | 6 +- storage/xtradb/include/fts0ast.h | 5 +- storage/xtradb/include/fts0fts.h | 2 +- storage/xtradb/include/fts0types.h | 4 +- storage/xtradb/include/os0proc.h | 3 +- storage/xtradb/include/row0ftsort.h | 9 + storage/xtradb/include/univ.i | 2 +- storage/xtradb/log/log0online.cc | 4 +- storage/xtradb/os/os0proc.cc | 63 +- storage/xtradb/pars/lexyy.cc | 30 +- storage/xtradb/row/row0ftsort.cc | 1 - storage/xtradb/row/row0import.cc | 12 +- storage/xtradb/row/row0log.cc | 2 +- storage/xtradb/row/row0merge.cc | 13 +- storage/xtradb/row/row0mysql.cc | 180 +- storage/xtradb/row/row0sel.cc | 5 +- storage/xtradb/srv/srv0conc.cc | 1 + storage/xtradb/srv/srv0srv.cc | 1 - storage/xtradb/srv/srv0start.cc | 3 +- storage/xtradb/trx/trx0purge.cc | 2 +- storage/xtradb/trx/trx0trx.cc | 2 +- strings/ctype-uca.c | 116 +- strings/ctype-utf8.c | 46 +- 406 files changed, 7200 insertions(+), 195812 deletions(-) diff --cc mysql-test/t/alter_table.test index 9703b9a1455,aea1a880a81..30300efb34e --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@@ -1300,51 -1300,101 +1300,98 @@@ DROP TABLE t1 --echo # BUG#27788685: NO WARNING WHEN TRUNCATING A STRING WITH DATA LOSS --echo # + SET GLOBAL max_allowed_packet=17825792; + + --connect(con1, localhost, root,,) + CREATE TABLE t1 (t1_fld1 TEXT); + CREATE TABLE t2 (t2_fld1 MEDIUMTEXT); + CREATE TABLE t3 (t3_fld1 LONGTEXT); + + INSERT INTO t1 VALUES (REPEAT('a',300)); + INSERT INTO t2 VALUES (REPEAT('b',65680)); + INSERT INTO t3 VALUES (REPEAT('c',16777300)); + + SELECT LENGTH(t1_fld1) FROM t1; + SELECT LENGTH(t2_fld1) FROM t2; + SELECT LENGTH(t3_fld1) FROM t3; + + --echo # With strict mode + SET SQL_MODE='STRICT_ALL_TABLES'; + + --error ER_DATA_TOO_LONG + ALTER TABLE t1 CHANGE `t1_fld1` `my_t1_fld1` TINYTEXT; + --error ER_DATA_TOO_LONG + ALTER TABLE t2 CHANGE `t2_fld1` `my_t2_fld1` TEXT; + --error ER_DATA_TOO_LONG + ALTER TABLE t3 CHANGE `t3_fld1` `my_t3_fld1` MEDIUMTEXT; + + --echo # With non-strict mode + SET SQL_MODE=''; + + ALTER TABLE t1 CHANGE `t1_fld1` `my_t1_fld1` TINYTEXT; + ALTER TABLE t2 CHANGE `t2_fld1` `my_t2_fld1` TEXT; + ALTER TABLE t3 CHANGE `t3_fld1` `my_t3_fld1` MEDIUMTEXT; + + SELECT LENGTH(my_t1_fld1) FROM t1; + SELECT LENGTH(my_t2_fld1) FROM t2; + SELECT LENGTH(my_t3_fld1) FROM t3; + + # Cleanup + --disconnect con1 + --source include/wait_until_disconnected.inc + + --connection default + DROP TABLE t1, t2, t3; + + SET SQL_MODE=default; + SET GLOBAL max_allowed_packet=default; + -# -# Test of ALTER TABLE IF [NOT] EXISTS -# + -CREATE TABLE t1 ( - id INT(11) NOT NULL, - x_param INT(11) DEFAULT NULL, - PRIMARY KEY (id) -) ENGINE=MYISAM; +SET GLOBAL max_allowed_packet=17825792; + +--connect(con1, localhost, root,,) +CREATE TABLE t1 (t1_fld1 TEXT); +CREATE TABLE t2 (t2_fld1 MEDIUMTEXT); +CREATE TABLE t3 (t3_fld1 LONGTEXT); -ALTER TABLE t1 ADD COLUMN IF NOT EXISTS id INT, - ADD COLUMN IF NOT EXISTS lol INT AFTER id; -ALTER TABLE t1 ADD COLUMN IF NOT EXISTS lol INT AFTER id; -ALTER TABLE t1 DROP COLUMN IF EXISTS lol; -ALTER TABLE t1 DROP COLUMN IF EXISTS lol; +INSERT INTO t1 VALUES (REPEAT('a',300)); +INSERT INTO t2 VALUES (REPEAT('b',65680)); +INSERT INTO t3 VALUES (REPEAT('c',16777300)); -ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); -ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); -ALTER TABLE t1 MODIFY IF EXISTS lol INT; +SELECT LENGTH(t1_fld1) FROM t1; +SELECT LENGTH(t2_fld1) FROM t2; +SELECT LENGTH(t3_fld1) FROM t3; -DROP INDEX IF EXISTS x_param ON t1; -DROP INDEX IF EXISTS x_param ON t1; -CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); -CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); -SHOW CREATE TABLE t1; -DROP TABLE t1; +--echo # With strict mode +SET SQL_MODE='STRICT_ALL_TABLES'; -CREATE TABLE t1 ( - id INT(11) NOT NULL, - x_param INT(11) DEFAULT NULL, - PRIMARY KEY (id) -) ENGINE=INNODB; +--error ER_DATA_TOO_LONG +ALTER TABLE t1 CHANGE `t1_fld1` `my_t1_fld1` TINYTEXT; +--error ER_DATA_TOO_LONG +ALTER TABLE t2 CHANGE `t2_fld1` `my_t2_fld1` TEXT; +--error ER_DATA_TOO_LONG +ALTER TABLE t3 CHANGE `t3_fld1` `my_t3_fld1` MEDIUMTEXT; + +--echo # With non-strict mode +SET SQL_MODE=''; + +ALTER TABLE t1 CHANGE `t1_fld1` `my_t1_fld1` TINYTEXT; +ALTER TABLE t2 CHANGE `t2_fld1` `my_t2_fld1` TEXT; +ALTER TABLE t3 CHANGE `t3_fld1` `my_t3_fld1` MEDIUMTEXT; -CREATE TABLE t2 ( - id INT(11) NOT NULL) ENGINE=INNODB; +SELECT LENGTH(my_t1_fld1) FROM t1; +SELECT LENGTH(my_t2_fld1) FROM t2; +SELECT LENGTH(my_t3_fld1) FROM t3; -ALTER TABLE t1 ADD COLUMN IF NOT EXISTS id INT, - ADD COLUMN IF NOT EXISTS lol INT AFTER id; -ALTER TABLE t1 ADD COLUMN IF NOT EXISTS lol INT AFTER id; -ALTER TABLE t1 DROP COLUMN IF EXISTS lol; -ALTER TABLE t1 DROP COLUMN IF EXISTS lol; +# Cleanup +--disconnect con1 +--source include/wait_until_disconnected.inc -ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); -ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); -ALTER TABLE t1 MODIFY IF EXISTS lol INT; +--connection default +DROP TABLE t1, t2, t3; -DROP INDEX IF EXISTS x_param ON t1; -DROP INDEX IF EXISTS x_param ON t1; -CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); +SET SQL_MODE=default; +SET GLOBAL max_allowed_packet=default; CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); SHOW CREATE TABLE t1; diff --cc mysql-test/t/type_float.test index 297860f1e05,5dfb4a75bb3..ebed9550afe --- a/mysql-test/t/type_float.test +++ b/mysql-test/t/type_float.test @@@ -333,33 -333,63 +333,62 @@@ eval select concat((truncate((-1.797693 select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo; + --echo # + --echo # MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result + --echo # + + SELECT LEFT('a',EXP(50)); + SELECT LEFT('a', COALESCE(1e30)); + + CREATE TABLE t1 (a FLOAT); + INSERT INTO t1 VALUES (1e30); + SELECT LEFT('a',a), LEFT('a',1e30) FROM t1; + DROP TABLE t1; + + PREPARE stmt FROM 'SELECT LEFT(111,?)'; + SET @a=1e30; + EXECUTE stmt USING @a; + DEALLOCATE PREPARE stmt; + + CREATE TABLE t1 (a INT); + INSERT INTO t1 VALUES (1),(2),(3); + SELECT LEFT('a',(SELECT 1e30 FROM t1 LIMIT 1)); + DROP TABLE t1; + + CREATE TABLE t1 (a DOUBLE); + INSERT INTO t1 VALUES (1e30),(0); + SELECT LEFT('a', SUM(a)) FROM t1; + SELECT LEFT('a', AVG(a)) FROM t1; + DROP TABLE t1; + + --echo # ---echo # Bug #13500371 63704: CONVERSION OF '1.' TO A NUMBER GIVES ERROR 1265 ---echo # (WARN_DATA_TRUNCATED) +--echo # MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result --echo # -CREATE TABLE t1 (f FLOAT); -INSERT INTO t1 VALUES ('1.'); -INSERT INTO t1 VALUES ('2.0.'); -INSERT INTO t1 VALUES ('.'); -SELECT * FROM t1 ORDER BY f; +SELECT LEFT('a',EXP(50)); +SELECT LEFT('a', COALESCE(1e30)); + +CREATE TABLE t1 (a FLOAT); +INSERT INTO t1 VALUES (1e30); +SELECT LEFT('a',a), LEFT('a',1e30) FROM t1; DROP TABLE t1; +PREPARE stmt FROM 'SELECT LEFT(111,?)'; +SET @a=1e30; +EXECUTE stmt USING @a; +DEALLOCATE PREPARE stmt; ---echo # ---echo # Start of 10.0 tests ---echo # +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SELECT LEFT('a',(SELECT 1e30 FROM t1 LIMIT 1)); +DROP TABLE t1; ---echo # ---echo # MDEV-6950 Bad results with joins comparing DATE/DATETIME and INT/DECIMAL/DOUBLE/ENUM/VARCHAR columns ---echo # -CREATE TABLE t1 (a DATETIME PRIMARY KEY); -INSERT INTO t1 VALUES ('1999-01-01 00:00:00'); -CREATE TABLE t2 (a DOUBLE); -INSERT INTO t2 VALUES (19990101000000); -INSERT INTO t2 VALUES (990101000000); -SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a; -SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a; -ALTER TABLE t2 ADD PRIMARY KEY(a); +CREATE TABLE t1 (a DOUBLE); +INSERT INTO t1 VALUES (1e30),(0); +SELECT LEFT('a', SUM(a)) FROM t1; +SELECT LEFT('a', AVG(a)) FROM t1; +DROP TABLE t1; SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a; SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a; --echo # t2 should NOT be eliminated diff --cc sql/mysqld.cc index ab58928273a,21bfc3cead2..6194f539674 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@@ -1774,35 -1699,15 +1774,42 @@@ static void close_connections(void tmp->thread_id, (tmp->main_security_ctx.user ? tmp->main_security_ctx.user : "")); + /* + close_connection() might need a valid current_thd + for memory allocation tracking. + */ + THD* save_thd= current_thd; + set_current_thd(tmp); close_connection(tmp,ER_SERVER_SHUTDOWN); + set_current_thd(save_thd); } +#endif +#ifdef WITH_WSREP + /* + * TODO: this code block may turn out redundant. wsrep->disconnect() + * should terminate slave threads gracefully, and we don't need + * to signal them here. + * The code here makes sure mysqld will not hang during shutdown + * even if wsrep provider has problems in shutting down. + */ + if (WSREP(tmp) && tmp->wsrep_exec_mode==REPL_RECV) + { + sql_print_information("closing wsrep system thread"); + tmp->killed= KILL_CONNECTION; + MYSQL_CALLBACK(thread_scheduler, post_kill_notification, (tmp)); + if (tmp->mysys_var) + { + tmp->mysys_var->abort=1; + mysql_mutex_lock(&tmp->mysys_var->mutex); + if (tmp->mysys_var->current_cond) + { + mysql_mutex_lock(tmp->mysys_var->current_mutex); + mysql_cond_broadcast(tmp->mysys_var->current_cond); + mysql_mutex_unlock(tmp->mysys_var->current_mutex); + } + mysql_mutex_unlock(&tmp->mysys_var->mutex); + } + } #endif DBUG_PRINT("quit",("Unlocking LOCK_thread_count")); mysql_mutex_unlock(&LOCK_thread_count); diff --cc storage/tokudb/ha_tokudb.h index 9cf0c10e836,e322c3de18e..1831a71d1d5 --- a/storage/tokudb/ha_tokudb.h +++ b/storage/tokudb/ha_tokudb.h @@@ -1034,23 -1029,35 +1029,40 @@@ private void close_dsmrr(); void reset_dsmrr(); - #if TOKU_INCLUDE_WRITE_FRM_DATA + #if defined(TOKU_INCLUDE_WRITE_FRM_DATA) && TOKU_INCLUDE_WRITE_FRM_DATA int write_frm_data(const uchar *frm_data, size_t frm_len); - #endif - #if TOKU_INCLUDE_UPSERT - private: - int fast_update(THD *thd, List<Item> &update_fields, List<Item> &update_values, Item *conds); - bool check_fast_update(THD *thd, List<Item> &update_fields, List<Item> &update_values, Item *conds); - int send_update_message(List<Item> &update_fields, List<Item> &update_values, Item *conds, DB_TXN *txn); - int upsert(THD *thd, List<Item> &update_fields, List<Item> &update_values); - bool check_upsert(THD *thd, List<Item> &update_fields, List<Item> &update_values); - int send_upsert_message(THD *thd, List<Item> &update_fields, List<Item> &update_values, DB_TXN *txn); - #endif + #endif // defined(TOKU_INCLUDE_WRITE_FRM_DATA) && TOKU_INCLUDE_WRITE_FRM_DATA + +#ifdef WITH_WSREP - int wsrep_append_keys(THD *thd, bool shared, - const uchar* record0, const uchar* record1); ++ int wsrep_append_keys(THD *thd, bool shared, ++ const uchar* record0, const uchar* record1); +#endif + + private: + #if defined(TOKU_INCLUDE_UPSERT) && TOKU_INCLUDE_UPSERT + MY_NODISCARD int fast_update(THD *thd, + List<Item> &update_fields, + List<Item> &update_values, + Item *conds); + MY_NODISCARD bool check_fast_update(THD *thd, + List<Item> &update_fields, + List<Item> &update_values, + Item *conds); + MY_NODISCARD int send_update_message(List<Item> &update_fields, + List<Item> &update_values, + Item *conds, + DB_TXN *txn); + MY_NODISCARD int upsert(THD *thd, + List<Item> &update_fields, + List<Item> &update_values); + MY_NODISCARD bool check_upsert(THD *thd, + List<Item> &update_fields, + List<Item> &update_values); + MY_NODISCARD int send_upsert_message(List<Item> &update_fields, + List<Item> &update_values, + DB_TXN *txn); + #endif // defined(TOKU_INCLUDE_UPSERT) && TOKU_INCLUDE_UPSERT + public: // mysql sometimes retires a txn before a cursor that references the txn is closed. // for example, commit is sometimes called before index_end. the following methods diff --cc storage/xtradb/include/data0type.ic index a7e2eb0682c,63a0785744d..c55ec38ad43 --- a/storage/xtradb/include/data0type.ic +++ b/storage/xtradb/include/data0type.ic @@@ -603,7 -603,7 +603,6 @@@ dtype_get_min_size_low return(0); } #endif /* UNIV_DEBUG */ - /* fall through */ - // fallthrough case DATA_CHAR: case DATA_FIXBINARY: case DATA_INT: diff --cc storage/xtradb/srv/srv0srv.cc index 0c4f6f622e0,2200d9bc68f..515f7c46485 --- a/storage/xtradb/srv/srv0srv.cc +++ b/storage/xtradb/srv/srv0srv.cc @@@ -166,10 -158,7 +166,9 @@@ use simulated aio we build below with t Currently we support native aio on windows and linux */ /* make srv_use_native_aio to be visible for other plugins */ my_bool srv_use_native_aio = TRUE; - UNIV_INTERN my_bool srv_numa_interleave = FALSE; +UNIV_INTERN my_bool srv_lock_timeout_active = FALSE; + #ifdef __WIN__ /* Windows native condition variables. We use runtime loading / function pointers, because they are not available on Windows Server 2003 and